From 90a91851373deef4ef524e85b190507b89cfdb33 Mon Sep 17 00:00:00 2001 From: Artem Sokolovskii Date: Wed, 25 Aug 2021 13:46:27 +0200 Subject: [PATCH] iOS: Use QtcProcess Change-Id: I758a5de16d51124eeaff15385abae094df548096 Reviewed-by: Qt CI Bot Reviewed-by: Eike Ziller --- src/plugins/ios/simulatorcontrol.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/ios/simulatorcontrol.cpp b/src/plugins/ios/simulatorcontrol.cpp index c843f02407a..993a245716e 100644 --- a/src/plugins/ios/simulatorcontrol.cpp +++ b/src/plugins/ios/simulatorcontrol.cpp @@ -100,15 +100,15 @@ static bool runSimCtlCommand(QStringList args, QString *output, QString *allOutp static bool launchSimulator(const QString &simUdid) { QTC_ASSERT(!simUdid.isEmpty(), return false); - const QString simulatorAppPath = IosConfigurations::developerPath() - .pathAppended("Applications/Simulator.app/Contents/MacOS/Simulator").toString(); + const FilePath simulatorAppPath = IosConfigurations::developerPath() + .pathAppended("Applications/Simulator.app/Contents/MacOS/Simulator"); if (IosConfigurations::xcodeVersion() >= QVersionNumber(9)) { // For XCode 9 boot the second device instead of launching simulator app twice. QString psOutput; if (runCommand({"ps", {"-A", "-o", "comm"}}, &psOutput)) { for (const QString &comm : psOutput.split('\n')) { - if (comm == simulatorAppPath) + if (comm == simulatorAppPath.toString()) return runSimCtlCommand({"boot", simUdid}, nullptr); } } else { @@ -118,7 +118,7 @@ static bool launchSimulator(const QString &simUdid) { } } - return QProcess::startDetached(simulatorAppPath, {"--args", "-CurrentDeviceUDID", simUdid}); + return QtcProcess::startDetached({simulatorAppPath, {"--args", "-CurrentDeviceUDID", simUdid}}); } static bool isAvailable(const QJsonObject &object)