Fix QKeySequence construction on macOS

Constructing a QKeySequence with the string "Cmd+Opt+Shift+V" leads
to an invalid, non-empty QKeySequence when compiling Design Studio
on macOS. This triggers an assertion later in the code path.
Using “Ctrl+Alt+Shift+V” instead works as expected.

Change-Id: I7cb185d18f9ffbb7454c61f28a93cdd307121882
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Knud Dollereder
2021-06-04 13:50:31 +02:00
parent 637837edf1
commit 2fa63a2801

View File

@@ -273,7 +273,7 @@ void TextEditorActionHandlerPrivate::createActions()
QKeySequence(tr("Ctrl+Shift+V")), G_EDIT_COPYPASTE, editMenu); QKeySequence(tr("Ctrl+Shift+V")), G_EDIT_COPYPASTE, editMenu);
m_modifyingActions << registerAction(NO_FORMAT_PASTE, m_modifyingActions << registerAction(NO_FORMAT_PASTE,
[] (TextEditorWidget *w) { w->pasteWithoutFormat(); }, false, tr("Paste Without Formatting"), [] (TextEditorWidget *w) { w->pasteWithoutFormat(); }, false, tr("Paste Without Formatting"),
QKeySequence(Core::useMacShortcuts ? tr("Cmd+Opt+Shift+V") : QString()), G_EDIT_COPYPASTE, editMenu); QKeySequence(Core::useMacShortcuts ? tr("Ctrl+Alt+Shift+V") : QString()), G_EDIT_COPYPASTE, editMenu);
// register "Edit -> Advanced" Menu Actions // register "Edit -> Advanced" Menu Actions
Core::ActionContainer *advancedEditMenu = Core::ActionManager::actionContainer(M_EDIT_ADVANCED); Core::ActionContainer *advancedEditMenu = Core::ActionManager::actionContainer(M_EDIT_ADVANCED);