diff options
authorLiang Qi <>2014-01-06 13:10:25 +0100
committerThe Qt Project <>2014-01-07 12:53:16 +0100
commit183a3ca2ec5b81771cddec104baf37540661ac96 (patch)
parent702bda5cc9138d31cfe6ed25ead2edfda1fa623d (diff)
Cocoa: fix gnu emacs style shortcut for action in menu
The regression was introduced in bdebec4e2ef79f1771d2dcc22f9a919eb4487567. Cocoa QPA plugin only could handle the shortcut with one key sequence, not the multiple key sequences. We just let Qt to handle those cases. Task-number: QTBUG-33627 Change-Id: I3898308d9f4ecda8bd716d8b286f05f9f311774a Reviewed-by: Gabriel de Dietrich <>
1 files changed, 3 insertions, 4 deletions
diff --git a/src/widgets/kernel/qshortcut.cpp b/src/widgets/kernel/qshortcut.cpp
index f7f7cf1039..dcf6aed591 100644
--- a/src/widgets/kernel/qshortcut.cpp
+++ b/src/widgets/kernel/qshortcut.cpp
@@ -279,13 +279,12 @@ static bool correctActionContext(Qt::ShortcutContext context, QAction *a, QWidge
// (and reaches this point), then the menu item itself has been disabled.
// This occurs at the QPA level on Mac, were we disable all the Cocoa menus
// when showing a modal window.
- Q_UNUSED(menu);
- continue;
+ if (a->shortcut().count() <= 1)
+ continue;
QAction *a = menu->menuAction();
if (correctActionContext(context, a, active_window))
return true;
} else
if (correctWidgetContext(context, w, active_window))