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:
@@ -74,20 +74,20 @@ bool MacrosPlugin::initialize(const QStringList &arguments, QString *errorMessag
|
||||
|
||||
QAction *startMacro = new QAction(tr("Record Macro"), this);
|
||||
Core::Command *command = Core::ActionManager::registerAction(startMacro, Constants::START_MACRO, textContext);
|
||||
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Ctrl+(") : tr("Alt+(")));
|
||||
command->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? tr("Ctrl+(") : tr("Alt+(")));
|
||||
mmacrotools->addAction(command);
|
||||
connect(startMacro, &QAction::triggered, m_macroManager, &MacroManager::startMacro);
|
||||
|
||||
QAction *endMacro = new QAction(tr("Stop Recording Macro"), this);
|
||||
endMacro->setEnabled(false);
|
||||
command = Core::ActionManager::registerAction(endMacro, Constants::END_MACRO);
|
||||
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Ctrl+)") : tr("Alt+)")));
|
||||
command->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? tr("Ctrl+)") : tr("Alt+)")));
|
||||
mmacrotools->addAction(command);
|
||||
connect(endMacro, &QAction::triggered, m_macroManager, &MacroManager::endMacro);
|
||||
|
||||
QAction *executeLastMacro = new QAction(tr("Play Last Macro"), this);
|
||||
command = Core::ActionManager::registerAction(executeLastMacro, Constants::EXECUTE_LAST_MACRO, textContext);
|
||||
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+R") : tr("Alt+R")));
|
||||
command->setDefaultKeySequence(QKeySequence(Core::useMacShortcuts ? tr("Meta+R") : tr("Alt+R")));
|
||||
mmacrotools->addAction(command);
|
||||
connect(executeLastMacro, &QAction::triggered, m_macroManager, &MacroManager::executeLastMacro);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user