summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorNorwegian Rock Cat <qt-info@nokia.com>2009-04-08 08:45:41 (GMT)
committerNorwegian Rock Cat <qt-info@nokia.com>2009-04-08 08:50:01 (GMT)
commitc131208e59f5b2dd517b00c4539458760b8fd8aa (patch)
tree8c4b74c15310f8ce02b51db36429f7ad5bf2045d /src/gui/widgets
parent510ce6fa8a3a30063744eaaf004850679610060e (diff)
downloadQt-c131208e59f5b2dd517b00c4539458760b8fd8aa.zip
Qt-c131208e59f5b2dd517b00c4539458760b8fd8aa.tar.gz
Qt-c131208e59f5b2dd517b00c4539458760b8fd8aa.tar.bz2
BT: Fix infinite recursion potential from change acff913a6287ad50b0ac782
It seems there is a potential for recursion because calling keyDown: can bubble up to the window which will start the process all over again. keyDown: will actually call qt_dispatchKeyEvent(), we may as well short it out here. All the previous cases I tried continue to work and we don't crash Creator if you are really impatient hitting keys.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qcocoamenu_mac.mm9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/widgets/qcocoamenu_mac.mm b/src/gui/widgets/qcocoamenu_mac.mm
index bae270a..bd62a00 100644
--- a/src/gui/widgets/qcocoamenu_mac.mm
+++ b/src/gui/widgets/qcocoamenu_mac.mm
@@ -159,10 +159,11 @@ QT_END_NAMESPACE
accel_ev.ignore();
qt_sendSpontaneousEvent(widget, &accel_ev);
if (accel_ev.isAccepted()) {
- *target = nil;
- *action = nil;
- [qt_mac_nativeview_for(widget) keyDown:event];
- return YES;
+ if (qt_dispatchKeyEvent(event, widget)) {
+ *target = nil;
+ *action = nil;
+ return YES;
+ }
}
}
}