diff options
author | Norwegian Rock Cat <qt-info@nokia.com> | 2009-04-07 11:17:05 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2009-04-08 02:08:46 (GMT) |
commit | 6beee76eae6420b16095bdfbe60b188b18e4468f (patch) | |
tree | 5c22209df58e56de41f03d6eaf2c01dd72ed1a1e /src | |
parent | 6accd6061dd680745d1f8f64edfb9ab4ce54a585 (diff) | |
download | Qt-6beee76eae6420b16095bdfbe60b188b18e4468f.zip Qt-6beee76eae6420b16095bdfbe60b188b18e4468f.tar.gz Qt-6beee76eae6420b16095bdfbe60b188b18e4468f.tar.bz2 |
BT: Send the keyevent after we send the shortcutoverride in menu
In our Cocoa menu we check if we need to send the key event to the
qwidget before the menu has a chance at it, because logically in Qt, the
key event should go to the widget and not the menubar first (a bit
different than what happens on the mac). The way to determine this is to
send a shortcut override event and see if it accepts it. If it does,
that means we should just send it the key event. Previously we were
sending the shortcut override, but not following through on the key
event because we thought (however foolishly). That returning "YES" but
not setting an action would somehow forward the event (it doesn't).
There still seems to be some problems if you have a Dvorak-QWERTY+CWD
layout, but this probably needs to be dealt with at the key mapper
level.
Reviewed-by: Prasanth Ullattil
(cherry picked from commit acff913a6287ad50b0ac782d817d51072ccb479c)
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/widgets/qcocoamenu_mac.mm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/widgets/qcocoamenu_mac.mm b/src/gui/widgets/qcocoamenu_mac.mm index 64da141..bae270a 100644 --- a/src/gui/widgets/qcocoamenu_mac.mm +++ b/src/gui/widgets/qcocoamenu_mac.mm @@ -161,6 +161,7 @@ QT_END_NAMESPACE if (accel_ev.isAccepted()) { *target = nil; *action = nil; + [qt_mac_nativeview_for(widget) keyDown:event]; return YES; } } |