Macros: Disambiguate short cut

On an English keyboard Alt+( and Alt+) are basically
the same as Alt+Shift+9 and Alt+Shift+0.
On Windows and Linux these are already assigned to
(more prominent) actions, so re-assign macro recording
related short cuts.

Change-Id: I1057a08a617adf8027e28936feeb6347fbeb2c4e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Christian Stenger
2018-11-09 13:44:17 +01:00
parent e3cc0ce694
commit 3068bd3b80

View File

@@ -74,14 +74,14 @@ 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);