diff options
author | Gabriel de Dietrich <gabriel.dedietrich@digia.com> | 2013-09-24 19:37:39 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-25 18:23:01 +0200 |
commit | 9a683bfb84464bbf051236c4e3c2710219cbf0d5 (patch) | |
tree | 9f32844d84f5c69fd0ff13175147f479d51608d0 /src | |
parent | 466e0dff4bb686e51d0ab3f905631fcb7dd8bfef (diff) |
QCocoaApplicationDelegate: Play nice with the user's application delegate
We tended to ignore the original application delegate a bit too often.
Change-Id: I0844c8658d128e4fbb9a6fc5000025f55e5293c2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm index 423d552627..f9767ce716 100644 --- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm +++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm @@ -210,9 +210,10 @@ static void cleanupCocoaApplicationDelegate() - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender { // The reflection delegate gets precedence - if (reflectionDelegate - && [reflectionDelegate respondsToSelector:@selector(applicationShouldTerminate:)]) { - return [reflectionDelegate applicationShouldTerminate:sender]; + if (reflectionDelegate) { + if ([reflectionDelegate respondsToSelector:@selector(applicationShouldTerminate:)]) + return [reflectionDelegate applicationShouldTerminate:sender]; + return NSTerminateNow; } if ([self canQuit]) { @@ -327,12 +328,11 @@ static void cleanupCocoaApplicationDelegate() - (void)applicationDidBecomeActive:(NSNotification *)notification { - Q_UNUSED(notification); -/* if (reflectionDelegate && [reflectionDelegate respondsToSelector:@selector(applicationDidBecomeActive:)]) [reflectionDelegate applicationDidBecomeActive:notification]; +/* onApplicationChangedActivation(true); if (!QWidget::mouseGrabber()){ @@ -351,12 +351,11 @@ static void cleanupCocoaApplicationDelegate() - (void)applicationDidResignActive:(NSNotification *)notification { - Q_UNUSED(notification); -/* if (reflectionDelegate && [reflectionDelegate respondsToSelector:@selector(applicationDidResignActive:)]) [reflectionDelegate applicationDidResignActive:notification]; +/* onApplicationChangedActivation(false); if (!QWidget::mouseGrabber()) |