macOS: Remove dead code for activating application on startup

We handle this in applicationDidFinishLaunching nowadays.

Pick-to: 6.5 6.6
Change-Id: I447e8923fba3eac4cb0a2727f369fff21054f9a1
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
Tor Arne Vestbø 2023-10-26 12:22:58 +02:00
parent 709d2848e1
commit b8879b4d2d

View File

@ -141,16 +141,6 @@ QCocoaIntegration::QCocoaIntegration(const QStringList &paramList)
// wants to be foreground applications so change the process type. (But // wants to be foreground applications so change the process type. (But
// see the function implementation for exceptions.) // see the function implementation for exceptions.)
qt_mac_transformProccessToForegroundApplication(); qt_mac_transformProccessToForegroundApplication();
// Move the application window to front to make it take focus, also when launching
// from the terminal. On 10.12+ this call has been moved to applicationDidFinishLauching
// to work around issues with loss of focus at startup.
if (QOperatingSystemVersion::current() < QOperatingSystemVersion::MacOSSierra) {
// Ignoring other apps is necessary (we must ignore the terminal), but makes
// Qt apps play slightly less nice with other apps when lanching from Finder
// (See the activateIgnoringOtherApps docs.)
[cocoaApplication activateIgnoringOtherApps : YES];
}
} }
// Qt 4 also does not set the application delegate, so that behavior // Qt 4 also does not set the application delegate, so that behavior