From 8f71788ee0ccf64f6fa468cc2051b34bcdac8f86 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Wed, 29 Jun 2016 16:41:46 -0700 Subject: [PATCH] QCocoaWindow: Fix usage on deprecated API Most APIs related to ProcessSerialNumber have been deprecated since 10.9. Change-Id: I6be5ae92cfe2c8f80d557af6c6a79c0cd016ba90 Reviewed-by: Jake Petroules Reviewed-by: Timur Pocheptsov --- src/plugins/platforms/cocoa/qcocoawindow.mm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 86df38c583..19a04b2f4b 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -1023,9 +1023,7 @@ void QCocoaWindow::raise() } static bool raiseProcess = qt_mac_resolveOption(true, "QT_MAC_SET_RAISE_PROCESS"); if (raiseProcess) { - ProcessSerialNumber psn; - GetCurrentProcess(&psn); - SetFrontProcessWithOptions(&psn, kSetFrontProcessFrontWindowOnly); + [NSApp activateIgnoringOtherApps:YES]; } } }