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

@@ -150,8 +150,10 @@ void PythonEditor::contextMenuEvent ( QContextMenuEvent * e )
QMenu* menu = createStandardContextMenu();
if (!isReadOnly()) {
menu->addSeparator();
menu->addAction( tr("Comment"), this, &PythonEditor::onComment, QKeySequence(QString::fromLatin1("ALT+C")));
menu->addAction( tr("Uncomment"), this, &PythonEditor::onUncomment, QKeySequence(QString::fromLatin1("ALT+U")));
QAction* comment = menu->addAction( tr("Comment"), this, &PythonEditor::onComment);
comment->setShortcut(QKeySequence(QString::fromLatin1("ALT+C")));
QAction* uncomment = menu->addAction( tr("Uncomment"), this, &PythonEditor::onUncomment);
uncomment->setShortcut(QKeySequence(QString::fromLatin1("ALT+U")));
}
menu->exec(e->globalPos());