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>
This commit is contained in:
parent
466e0dff4b
commit
9a683bfb84
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user