diff options
author | Jake Petroules <jake.petroules@qt.io> | 2017-07-05 20:21:32 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2017-07-10 16:49:11 +0000 |
commit | 091ae3db3137f3a57fbae7cce728beda5be17b1d (patch) | |
tree | 9939c3f5c24cb1599f2174e03fbf3cb1fc751872 /src/plugins | |
parent | e1de989e16ee913dca41062d26313f675e1bdfcc (diff) | |
download | qt-creator-091ae3db3137f3a57fbae7cce728beda5be17b1d.tar.gz |
Remove the last usage of deprecated Carbon APIs from Qt Creator
Change-Id: I05c8345e5f1618e7ecbb8a9c27feb5b9a321dc11
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/projectexplorer/projectexplorer.pro | 2 | ||||
-rw-r--r-- | src/plugins/projectexplorer/projectexplorer.qbs | 4 | ||||
-rw-r--r-- | src/plugins/projectexplorer/runconfiguration.cpp | 25 | ||||
-rw-r--r-- | src/plugins/projectexplorer/runconfiguration.h | 1 |
4 files changed, 1 insertions, 31 deletions
diff --git a/src/plugins/projectexplorer/projectexplorer.pro b/src/plugins/projectexplorer/projectexplorer.pro index 31987ee6ee..21d97fb2c2 100644 --- a/src/plugins/projectexplorer/projectexplorer.pro +++ b/src/plugins/projectexplorer/projectexplorer.pro @@ -330,8 +330,6 @@ journald { LIBS += -lsystemd } -macx:LIBS += -framework Carbon - RESOURCES += projectexplorer.qrc # Some way to override the architecture used in Abi: diff --git a/src/plugins/projectexplorer/projectexplorer.qbs b/src/plugins/projectexplorer/projectexplorer.qbs index f61ab5a221..47bc9d3947 100644 --- a/src/plugins/projectexplorer/projectexplorer.qbs +++ b/src/plugins/projectexplorer/projectexplorer.qbs @@ -15,10 +15,6 @@ Project { Depends { name: "TextEditor" } cpp.defines: base.concat("QTC_CPU=X86Architecture") - Properties { - condition: qbs.targetOS.contains("macos") - cpp.frameworks: base.concat(["Carbon"]) - } Group { name: "General" diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp index 1f4b9eee23..ab597a98fb 100644 --- a/src/plugins/projectexplorer/runconfiguration.cpp +++ b/src/plugins/projectexplorer/runconfiguration.cpp @@ -704,11 +704,6 @@ public: RunControlState state = RunControlState::Initialized; QList<QPointer<RunWorker>> m_workers; - -#ifdef Q_OS_OSX - // This is used to bring apps in the foreground on Mac - int foregroundCount; -#endif }; } // Internal @@ -1242,25 +1237,7 @@ void RunControlPrivate::debugMessage(const QString &msg) */ void RunControl::bringApplicationToForeground() { -#ifdef Q_OS_OSX - d->foregroundCount = 0; - bringApplicationToForegroundInternal(); -#endif -} - -void RunControl::bringApplicationToForegroundInternal() -{ -#ifdef Q_OS_OSX - ProcessSerialNumber psn; - GetProcessForPID(d->applicationProcessHandle.pid(), &psn); - if (SetFrontProcess(&psn) == procNotFound && d->foregroundCount < 15) { - // somehow the mac/carbon api says - // "-600 no eligible process with specified process id" - // if we call SetFrontProcess too early - ++d->foregroundCount; - QTimer::singleShot(200, this, &RunControl::bringApplicationToForegroundInternal); - } -#endif + d->applicationProcessHandle.activate(); } void RunControl::appendMessage(const QString &msg, Utils::OutputFormat format) diff --git a/src/plugins/projectexplorer/runconfiguration.h b/src/plugins/projectexplorer/runconfiguration.h index 08efd90f09..31c0e88692 100644 --- a/src/plugins/projectexplorer/runconfiguration.h +++ b/src/plugins/projectexplorer/runconfiguration.h @@ -488,7 +488,6 @@ private: friend class Internal::RunWorkerPrivate; static void addWorkerFactory(const WorkerFactory &workerFactory); - void bringApplicationToForegroundInternal(); Internal::RunControlPrivate *d; }; |