diff options
author | Liang Qi <liang.qi@qt.io> | 2017-10-23 09:24:00 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-10-23 09:40:54 +0200 |
commit | 32f50225c4913de1af145ef2da9a11ffffac3ded (patch) | |
tree | c2ecd51223706f3ad1234af883af9fdf33d846a2 /src/widgets | |
parent | 88e6f8cff2974c46b1262f3a1a61e1440c664e0c (diff) | |
parent | 9c58dd15885d813aeb5d83d2869c0f3a3ee5fcfe (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')
-rw-r--r-- | src/widgets/kernel/qshortcut.cpp | 4 |
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(); |