diff options
author | hjk <hjk@qt.io> | 2021-05-17 12:02:42 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2021-05-19 13:01:51 +0000 |
commit | 90ad9024861641b5535eaa6d2dd302e3f04559ea (patch) | |
tree | ab540b1d1fcb8b78a1f3dd2d9dd4145a70e4d883 /src/plugins/ios | |
parent | 2db9ebc61504c5455f1fb2b4ed2a1cb6115ccbfa (diff) |
Utils: Remove CommandLine argument from QtcProcess::run{,Blocking}
Makes run() more similar to what start() looks like.
Also add some asserts to make sure run() and related functions are
only called on SyncronousProcesses, as these are currently the only
ones where this works.
Change-Id: Idee6076c3f40a484db5c17f5bb348698cc83d220
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/ios')
-rw-r--r-- | src/plugins/ios/iosconfigurations.cpp | 4 | ||||
-rw-r--r-- | src/plugins/ios/iosprobe.cpp | 4 | ||||
-rw-r--r-- | src/plugins/ios/simulatorcontrol.cpp | 3 |
3 files changed, 6 insertions, 5 deletions
diff --git a/src/plugins/ios/iosconfigurations.cpp b/src/plugins/ios/iosconfigurations.cpp index 26c6db1a372..80b7ba766d0 100644 --- a/src/plugins/ios/iosconfigurations.cpp +++ b/src/plugins/ios/iosconfigurations.cpp @@ -235,8 +235,8 @@ static QByteArray decodeProvisioningProfile(const QString &path) Utils::SynchronousProcess p; p.setTimeoutS(3); // path is assumed to be valid file path to .mobileprovision - const QStringList args = {"smime", "-inform", "der", "-verify", "-in", path}; - p.runBlocking({"openssl", args}); + p.setCommand({"openssl", {"smime", "-inform", "der", "-verify", "-in", path}}); + p.runBlocking(); if (p.result() != Utils::QtcProcess::Finished) qCDebug(iosCommonLog) << "Reading signed provisioning file failed" << path; return p.stdOut().toLatin1(); diff --git a/src/plugins/ios/iosprobe.cpp b/src/plugins/ios/iosprobe.cpp index d0b369947dc..bfcb923ae71 100644 --- a/src/plugins/ios/iosprobe.cpp +++ b/src/plugins/ios/iosprobe.cpp @@ -67,8 +67,8 @@ void XcodeProbe::detectDeveloperPaths() { Utils::SynchronousProcess selectedXcode; selectedXcode.setTimeoutS(5); - const CommandLine xcodeSelect{"/usr/bin/xcode-select", {"--print-path"}}; - selectedXcode.run(xcodeSelect); + selectedXcode.setCommand({"/usr/bin/xcode-select", {"--print-path"}}); + selectedXcode.run(); if (selectedXcode.result() != QtcProcess::Finished) qCWarning(probeLog) << QString::fromLatin1("Could not detect selected Xcode using xcode-select"); diff --git a/src/plugins/ios/simulatorcontrol.cpp b/src/plugins/ios/simulatorcontrol.cpp index 8c433d96ec3..d0ff9f2c1e9 100644 --- a/src/plugins/ios/simulatorcontrol.cpp +++ b/src/plugins/ios/simulatorcontrol.cpp @@ -83,7 +83,8 @@ static bool runCommand(const CommandLine &command, QString *stdOutput, QString * { SynchronousProcess p; p.setTimeoutS(-1); - p.runBlocking(command); + p.setCommand(command); + p.runBlocking(); if (stdOutput) *stdOutput = p.stdOut(); if (allOutput) |