summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2024-03-05 13:52:40 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2024-03-14 14:50:36 +0100
commitd8371ebbd2b405bb1361836523a2b15a54780607 (patch)
tree055a5414172cb672bcec25ee55350dfc45526556 /src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
parentb0d9b2278b4060185e6bcba25d91a6ed12e5f023 (diff)
macOS: Forward application{Will,Did}FinishLaunching to reflection delegate
If a custom application delegate is installed prior to creating the Qt application delegate we will forward callbacks to the delegate, but this has to be done manually for any callback we implement. Fixes: QTBUG-122996 Pick-to: 6.7 6.6 6.5 Change-Id: Ia25e2c4b8cac37130d604c772c875c5d76c66764 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm')
-rw-r--r--src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
index 2a7e972003..d7f8a1665e 100644
--- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
+++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
@@ -148,7 +148,8 @@ QT_USE_NAMESPACE
- (void)applicationWillFinishLaunching:(NSNotification *)notification
{
- Q_UNUSED(notification);
+ if ([reflectionDelegate respondsToSelector:_cmd])
+ [reflectionDelegate applicationWillFinishLaunching:notification];
/*
From the Cocoa documentation: "A good place to install event handlers
@@ -185,7 +186,9 @@ QT_USE_NAMESPACE
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
- Q_UNUSED(aNotification);
+ if ([reflectionDelegate respondsToSelector:_cmd])
+ [reflectionDelegate applicationDidFinishLaunching:aNotification];
+
inLaunch = false;
if (qEnvironmentVariableIsEmpty("QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM")) {