diff options
author | Peter Yard <peter.yard@nokia.com> | 2009-07-24 04:20:16 (GMT) |
---|---|---|
committer | Peter Yard <peter.yard@nokia.com> | 2009-07-24 04:20:16 (GMT) |
commit | ed159f974aa99e2ba3cc3112f7e3a1ced26b14b1 (patch) | |
tree | a0fbfb009316f8fb9b2600db7a86fadbeef966e4 /src/gui/widgets/qmenu_mac.mm | |
parent | 3d272951dc9f055e9fc5064098f6a165a8c3e623 (diff) | |
parent | 9ec431c161202d9f06f3a7c59181cb0ab523958a (diff) | |
download | Qt-ed159f974aa99e2ba3cc3112f7e3a1ced26b14b1.zip Qt-ed159f974aa99e2ba3cc3112f7e3a1ced26b14b1.tar.gz Qt-ed159f974aa99e2ba3cc3112f7e3a1ced26b14b1.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/gui/widgets/qmenu_mac.mm')
-rw-r--r-- | src/gui/widgets/qmenu_mac.mm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/widgets/qmenu_mac.mm b/src/gui/widgets/qmenu_mac.mm index 77e98c4..87f6f82 100644 --- a/src/gui/widgets/qmenu_mac.mm +++ b/src/gui/widgets/qmenu_mac.mm @@ -1376,8 +1376,9 @@ QMenuPrivate::QMacMenuPrivate::syncAction(QMacMenuAction *action) accel = qt_mac_menu_merge_accel(action); } } + // Show multiple key sequences as part of the menu text. if (accel.count() > 1) - text += QLatin1String(" (****)"); //just to denote a multi stroke shortcut + text += QLatin1String(" (") + accel.toString(QKeySequence::NativeText) + QLatin1String(")"); QString finalString = qt_mac_removeMnemonics(text); @@ -1459,14 +1460,15 @@ 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]; } #else [item setSubmenu:0]; - if (!accel.isEmpty()) { + // No key equivalent set for multiple key QKeySequence. + if (accel.count() == 1) { [item setKeyEquivalent:keySequenceToKeyEqivalent(accel)]; [item setKeyEquivalentModifierMask:keySequenceModifierMask(accel)]; } else { |