diff options
author | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2009-07-23 09:59:30 (GMT) |
---|---|---|
committer | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2009-07-23 11:11:34 (GMT) |
commit | 7ade13540e6caa6449c02a8832e670a499e97189 (patch) | |
tree | 17407699f28ced4683e78a2d9573959fe3ea51c2 /src | |
parent | 588f8daeb52cfea461cbcb8c128de5997ab5a6cf (diff) | |
download | Qt-7ade13540e6caa6449c02a8832e670a499e97189.zip Qt-7ade13540e6caa6449c02a8832e670a499e97189.tar.gz Qt-7ade13540e6caa6449c02a8832e670a499e97189.tar.bz2 |
"Emacs" style keyboard shortcuts don't work on Carbon.
Set the native key equivalent for menu items only for single key
shortcuts. Qt's shortcut mechanism will take care of sending the
multiple key shortcut events.
Task-number: 258438
Reviewed-by: Norwegian Rock Cat
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/widgets/qmenu_mac.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/widgets/qmenu_mac.mm b/src/gui/widgets/qmenu_mac.mm index a562076..87f6f82 100644 --- a/src/gui/widgets/qmenu_mac.mm +++ b/src/gui/widgets/qmenu_mac.mm @@ -1460,7 +1460,7 @@ QMenuPrivate::QMacMenuPrivate::syncAction(QMacMenuAction *action) data.whichData |= kMenuItemDataCmdKey; data.whichData |= kMenuItemDataCmdKeyModifiers; data.whichData |= kMenuItemDataCmdKeyGlyph; - if (!accel.isEmpty()) { + if (accel.count() == 1) { qt_mac_get_accel(accel[0], (quint32*)&data.cmdKeyModifiers, (quint32*)&data.cmdKeyGlyph); if (data.cmdKeyGlyph == 0) data.cmdKey = (UniChar)accel[0]; @@ -1468,7 +1468,7 @@ QMenuPrivate::QMacMenuPrivate::syncAction(QMacMenuAction *action) #else [item setSubmenu:0]; // No key equivalent set for multiple key QKeySequence. - if (!accel.isEmpty() && accel.count() == 1) { + if (accel.count() == 1) { [item setKeyEquivalent:keySequenceToKeyEqivalent(accel)]; [item setKeyEquivalentModifierMask:keySequenceModifierMask(accel)]; } else { |