Core: make useMacShortcut constexpr

Change-Id: I293b96428784b6efecac6dae4f2f9690af0027da
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
David Schulz
2018-02-02 13:39:18 +01:00
parent 1611d016a1
commit 0eb7bab20c
33 changed files with 112 additions and 112 deletions

View File

@@ -104,7 +104,7 @@ bool TextEditorPlugin::initialize(const QStringList &arguments, QString *errorMe
// Add shortcut for invoking automatic completion
QAction *completionAction = new QAction(tr("Trigger Completion"), this);
Command *command = ActionManager::registerAction(completionAction, Constants::COMPLETE_THIS, context);
command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+Space") : tr("Ctrl+Space")));
command->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+Space") : tr("Ctrl+Space")));
connect(completionAction, &QAction::triggered, []() {
if (BaseTextEditor *editor = BaseTextEditor::currentTextEditor())
editor->editorWidget()->invokeAssist(Completion);