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>
bb10
Tor Arne Vestbø 2024-03-05 13:52:40 +01:00
parent b0d9b2278b
commit d8371ebbd2
1 changed files with 5 additions and 2 deletions

View File

@ -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")) {