From 0e10c0bde2baed7eb9290d4f1bf36ca6e1a9b03c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 26 Oct 2023 12:22:58 +0200 Subject: [PATCH] macOS: Remove dead code for activating application on startup We handle this in applicationDidFinishLaunching nowadays. Pick-to: 6.5 Change-Id: I447e8923fba3eac4cb0a2727f369fff21054f9a1 Reviewed-by: Timur Pocheptsov (cherry picked from commit b8879b4d2dea67d7b21e604e807095baa23c30e0) Reviewed-by: Qt Cherry-pick Bot --- src/plugins/platforms/cocoa/qcocoaintegration.mm | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm index 86b42060941..fe9fbadf13f 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.mm +++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm @@ -141,16 +141,6 @@ QCocoaIntegration::QCocoaIntegration(const QStringList ¶mList) // wants to be foreground applications so change the process type. (But // see the function implementation for exceptions.) 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