forked from qt-creator/qt-creator
Core: make useMacShortcut constexpr
Change-Id: I293b96428784b6efecac6dae4f2f9690af0027da Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -1201,7 +1201,7 @@ bool FakeVimPluginPrivate::initialize()
|
||||
Command *cmd = nullptr;
|
||||
cmd = ActionManager::registerAction(theFakeVimSetting(ConfigUseFakeVim),
|
||||
INSTALL_HANDLER, Context(Core::Constants::C_GLOBAL), true);
|
||||
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? Tr::tr("Meta+Shift+V,Meta+Shift+V") : Tr::tr("Alt+V,Alt+V")));
|
||||
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+Shift+V,Meta+Shift+V") : Tr::tr("Alt+V,Alt+V")));
|
||||
|
||||
ActionContainer *advancedMenu =
|
||||
ActionManager::actionContainer(Core::Constants::M_EDIT_ADVANCED);
|
||||
@@ -1212,7 +1212,7 @@ bool FakeVimPluginPrivate::initialize()
|
||||
auto act = new QAction(this);
|
||||
act->setText(Tr::tr("Execute User Action #%1").arg(i));
|
||||
cmd = ActionManager::registerAction(act, base.withSuffix(i));
|
||||
cmd->setDefaultKeySequence(QKeySequence((UseMacShortcuts ? Tr::tr("Meta+Shift+V,%1") : Tr::tr("Alt+V,%1")).arg(i)));
|
||||
cmd->setDefaultKeySequence(QKeySequence((useMacShortcuts ? Tr::tr("Meta+Shift+V,%1") : Tr::tr("Alt+V,%1")).arg(i)));
|
||||
connect(act, &QAction::triggered, this, [this, i] { userActionTriggered(i); });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user