forked from qt-creator/qt-creator
Macros: Fix shortcut display on macOS
Some "NativeText" parameters were missing. Change-Id: Id08b8281d1458c05ff302011e32d8babbaf7b2bc Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -280,10 +280,15 @@ void MacroManager::startMacro()
|
|||||||
foreach (IMacroHandler *handler, d->handlers)
|
foreach (IMacroHandler *handler, d->handlers)
|
||||||
handler->startRecording(d->currentMacro);
|
handler->startRecording(d->currentMacro);
|
||||||
|
|
||||||
QString endShortcut = Core::ActionManager::command(Constants::END_MACRO)->keySequence().toString();
|
const QString endShortcut = Core::ActionManager::command(Constants::END_MACRO)
|
||||||
QString executeShortcut = Core::ActionManager::command(Constants::EXECUTE_LAST_MACRO)->keySequence().toString();
|
->keySequence()
|
||||||
QString help = tr("Macro mode. Type \"%1\" to stop recording and \"%2\" to play the macro.")
|
.toString(QKeySequence::NativeText);
|
||||||
.arg(endShortcut).arg(executeShortcut);
|
const QString executeShortcut = Core::ActionManager::command(Constants::EXECUTE_LAST_MACRO)
|
||||||
|
->keySequence()
|
||||||
|
.toString(QKeySequence::NativeText);
|
||||||
|
const QString help
|
||||||
|
= tr("Macro mode. Type \"%1\" to stop recording and \"%2\" to play the macro.")
|
||||||
|
.arg(endShortcut, executeShortcut);
|
||||||
Core::EditorManager::showEditorStatusBar(Constants::M_STATUS_BUFFER, help,
|
Core::EditorManager::showEditorStatusBar(Constants::M_STATUS_BUFFER, help,
|
||||||
tr("Stop Recording Macro"),
|
tr("Stop Recording Macro"),
|
||||||
this, [this] { endMacro(); });
|
this, [this] { endMacro(); });
|
||||||
|
@@ -96,8 +96,10 @@ void MacroOptionsWidget::createTable()
|
|||||||
|
|
||||||
Core::Command *command =
|
Core::Command *command =
|
||||||
Core::ActionManager::command(base.withSuffix(macro->displayName()));
|
Core::ActionManager::command(base.withSuffix(macro->displayName()));
|
||||||
if (command && command->action())
|
if (command && command->action()) {
|
||||||
macroItem->setText(2, command->action()->shortcut().toString());
|
macroItem->setText(2,
|
||||||
|
command->action()->shortcut().toString(QKeySequence::NativeText));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user