Adapt to key sequence changes in Qt6

Use operator| instead of operator+ which was removed.
Individual keys in QKeySequence are now QKeyCombinations instead of
ints.

Task-number: QTCREATORBUG-24098
Change-Id: I43a6122cf660e6a6de7edbf3ac9954e0a39cec06
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Eike Ziller
2020-09-28 16:23:15 +02:00
parent 5722ab8706
commit 47955ed4fa
6 changed files with 24 additions and 16 deletions

View File

@@ -191,8 +191,8 @@ QmlJSEditorPluginPrivate::QmlJSEditorPluginPrivate()
QAction *showQuickToolbar = new QAction(QmlJSEditorPlugin::tr("Show Qt Quick Toolbar"), this);
cmd = ActionManager::registerAction(showQuickToolbar, Constants::SHOW_QT_QUICK_HELPER, context);
cmd->setDefaultKeySequence(useMacShortcuts ? QKeySequence(Qt::META + Qt::ALT + Qt::Key_Space)
: QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Space));
cmd->setDefaultKeySequence(useMacShortcuts ? QKeySequence(Qt::META | Qt::ALT | Qt::Key_Space)
: QKeySequence(Qt::CTRL | Qt::ALT | Qt::Key_Space));
connect(showQuickToolbar, &QAction::triggered, this, &QmlJSEditorPluginPrivate::showContextPane);
contextMenu->addAction(cmd);
qmlToolsMenu->addAction(cmd);