macOS: Remove usage of deprecated API

`NSApplicationActivateIgnoringOtherApps` is deprecated and doesn't have
any effect any more. Switch this to `NSApplicationActivateAllWindows`
which we actually want when running an application, and remove an
unneeded cast.

Change-Id: I75849533e4b172db577d5484ef12c8ee4df20d59
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
Eike Ziller
2024-03-18 14:23:43 +01:00
parent 27ce963481
commit 1573a92150

View File

@@ -10,8 +10,7 @@ bool ProcessHandle::activate()
{ {
NSRunningApplication *app = [NSRunningApplication NSRunningApplication *app = [NSRunningApplication
runningApplicationWithProcessIdentifier:pid()]; runningApplicationWithProcessIdentifier:pid()];
return app && [app activateWithOptions:static_cast<NSApplicationActivationOptions>( return app && [app activateWithOptions:NSApplicationActivateAllWindows];
NSApplicationActivateIgnoringOtherApps)];
} }
} // Utils } // Utils