Gui: fix C++20 warning: bitwise operation between different enumeration types [-Wdeprecated-enum-enum-conversion]

This commit is contained in:
wmayer
2021-12-02 09:59:31 +01:00
parent 2e5bcae6b8
commit 4f12416fa0
4 changed files with 14 additions and 16 deletions

View File

@@ -1255,7 +1255,7 @@ void PythonConsole::contextMenuEvent ( QContextMenuEvent * e )
ParameterGrp::handle hGrp = App::GetApplication().GetUserParameter().
GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("General");
a = menu.addAction(tr("&Copy"), this, SLOT(copy()), Qt::CTRL+Qt::Key_C);
a = menu.addAction(tr("&Copy"), this, SLOT(copy()), QKeySequence(QString::fromLatin1("CTRL+C")));
a->setEnabled(textCursor().hasSelection());
a = menu.addAction(tr("&Copy command"), this, SLOT(onCopyCommand()));
@@ -1274,11 +1274,11 @@ void PythonConsole::contextMenuEvent ( QContextMenuEvent * e )
menu.addSeparator();
a = menu.addAction(tr("&Paste"), this, SLOT(paste()), Qt::CTRL+Qt::Key_V);
a = menu.addAction(tr("&Paste"), this, SLOT(paste()), QKeySequence(QString::fromLatin1("CTRL+V")));
const QMimeData *md = QApplication::clipboard()->mimeData();
a->setEnabled( mayPasteHere && md && canInsertFromMimeData(md));
a = menu.addAction(tr("Select All"), this, SLOT(selectAll()), Qt::CTRL+Qt::Key_A);
a = menu.addAction(tr("Select All"), this, SLOT(selectAll()), QKeySequence(QString::fromLatin1("CTRL+A")));
a->setEnabled(!document()->isEmpty());
a = menu.addAction(tr("Clear console"), this, SLOT(onClearConsole()));