summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@digia.com>2014-01-06 13:10:25 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-07 12:53:16 +0100
commit183a3ca2ec5b81771cddec104baf37540661ac96 (patch)
treef05bbdad3810d67a89984f7a38bf3d1e5daf4894 /src
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 <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/kernel/qshortcut.cpp7
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;
-#else
+ if (a->shortcut().count() <= 1)
+ continue;
+#endif
QAction *a = menu->menuAction();
if (correctActionContext(context, a, active_window))
return true;
-#endif
} else
#endif
if (correctWidgetContext(context, w, active_window))