summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qshortcut.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-10-23 09:24:00 +0200
committerLiang Qi <liang.qi@qt.io>2017-10-23 09:40:54 +0200
commit32f50225c4913de1af145ef2da9a11ffffac3ded (patch)
treec2ecd51223706f3ad1234af883af9fdf33d846a2 /src/widgets/kernel/qshortcut.cpp
parent88e6f8cff2974c46b1262f3a1a61e1440c664e0c (diff)
parent9c58dd15885d813aeb5d83d2869c0f3a3ee5fcfe (diff)
Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts: src/plugins/platforms/direct2d/direct2d.pro src/plugins/platforms/ios/qiosclipboard.mm src/plugins/platforms/windows/windows.pro Change-Id: Idffa03b3990bd642784f528821c5446b2e1008ef
Diffstat (limited to 'src/widgets/kernel/qshortcut.cpp')
-rw-r--r--src/widgets/kernel/qshortcut.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/widgets/kernel/qshortcut.cpp b/src/widgets/kernel/qshortcut.cpp
index 0585a59e89..f944a7097b 100644
--- a/src/widgets/kernel/qshortcut.cpp
+++ b/src/widgets/kernel/qshortcut.cpp
@@ -289,8 +289,10 @@ static bool correctActionContext(Qt::ShortcutContext context, QAction *a, QWidge
// not the QMenu.) Since we can also reach this code by climbing the menu
// hierarchy (see below), or when the shortcut is not a key-equivalent, we
// need to check whether the QPA menu is actually disabled.
+ // When there is no QPA menu, there will be no QCocoaMenuDelegate checking
+ // for the actual shortcuts. We can then fallback to our own logic.
QPlatformMenu *pm = menu->platformMenu();
- if (!pm || !pm->isEnabled())
+ if (pm && !pm->isEnabled())
continue;
#endif
QAction *a = menu->menuAction();