diff options
author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2010-09-27 11:41:38 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@nokia.com> | 2010-09-27 11:41:38 +0200 |
commit | 2271315eb46665b0a9e61ff0525340713163c1b6 (patch) | |
tree | d0068e34924eca85eb6af4089b3f443a89c929f6 /src/gui/kernel/qcocoaapplication_mac.mm | |
parent | 33e7ee9d1866f12a9b92fe4b5549c31e30974d8e (diff) | |
parent | 53d010a989aed878c21522cbaf0d75c7cf821b42 (diff) |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt
Conflicts:
configure
src/corelib/global/qglobal.h
Diffstat (limited to 'src/gui/kernel/qcocoaapplication_mac.mm')
-rw-r--r-- | src/gui/kernel/qcocoaapplication_mac.mm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gui/kernel/qcocoaapplication_mac.mm b/src/gui/kernel/qcocoaapplication_mac.mm index 9270213279..1b30efd597 100644 --- a/src/gui/kernel/qcocoaapplication_mac.mm +++ b/src/gui/kernel/qcocoaapplication_mac.mm @@ -183,6 +183,17 @@ QT_USE_NAMESPACE [super sendEvent:event]; } +- (void)qtDispatcherToQAction:(id)sender +{ + // Forward actions sendt from the menu bar (e.g. quit) to the menu loader. + // Having this method here means that we are the last stop in the responder + // chain, and that we are able to handle menu actions even when no window is + // visible on screen. Note: If Qt is used as a plugin, Qt will not use a + // native menu bar. Hence, we will also not need to do any redirection etc. as + // we do with sendEvent. + [[NSApp QT_MANGLE_NAMESPACE(qt_qcocoamenuLoader)] qtDispatcherToQAction:sender]; +} + @end QT_BEGIN_NAMESPACE |