Qt6 port:

Fix deprecation warnings with version 6.3 or 6.4
This commit is contained in:
wmayer
2023-07-23 17:23:23 +02:00
committed by Chris Hennes
parent 68101ac933
commit 7d0926d0b3
9 changed files with 51 additions and 40 deletions

View File

@@ -653,7 +653,8 @@ void ReportOutput::contextMenuEvent ( QContextMenuEvent * e )
// Use Qt's internal translation of the Copy & Select All commands
const char* context = "QWidgetTextControl";
QString copyStr = QCoreApplication::translate(context, "&Copy");
QAction* copy = menu->addAction(copyStr, this, &ReportOutput::copy, QKeySequence(QKeySequence::Copy));
QAction* copy = menu->addAction(copyStr, this, &ReportOutput::copy);
copy->setShortcut(QKeySequence(QKeySequence::Copy));
copy->setEnabled(textCursor().hasSelection());
QIcon icon = QIcon::fromTheme(QString::fromLatin1("edit-copy"));
if (!icon.isNull())
@@ -661,7 +662,8 @@ void ReportOutput::contextMenuEvent ( QContextMenuEvent * e )
menu->addSeparator();
QString selectStr = QCoreApplication::translate(context, "Select All");
menu->addAction(selectStr, this, &ReportOutput::selectAll, QKeySequence(QKeySequence::SelectAll));
QAction* select = menu->addAction(selectStr, this, &ReportOutput::selectAll);
select->setShortcut(QKeySequence(QKeySequence::SelectAll));
menu->addAction(tr("Clear"), this, &ReportOutput::clear);
menu->addSeparator();