forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user