forked from qt-creator/qt-creator
Utils: Join SynchronousProcess::run and runBlocking implementations
Make functionality dependent on an (intentionally ugly) setProcessUserEventWhileRunning call. Also, back-paddle a bit on API combination of QtcProcess and SynchronousPrceoss for now and prevent the QtcProcess-and- runBlocking and SynchronousProcess-and-start combinations. Goal is still to have all in QtcProcess in the end, but this may take a while. Change-Id: Ic146ec5db0ab8dc9613e5b2af5f4dc90bc7465ca Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -155,7 +155,8 @@ static bool sdkManagerCommand(const AndroidConfig &config, const QStringList &ar
|
||||
proc.setTimeoutS(timeout);
|
||||
proc.setTimeOutMessageBoxEnabled(true);
|
||||
proc.setCommand({config.sdkManagerToolPath(), newArgs});
|
||||
proc.run();
|
||||
proc.setProcessUserEventWhileRunning();
|
||||
proc.runBlocking();
|
||||
if (output)
|
||||
*output = proc.allOutput();
|
||||
return proc.result() == QtcProcess::Finished;
|
||||
@@ -196,7 +197,8 @@ static void sdkManagerCommand(const AndroidConfig &config, const QStringList &ar
|
||||
&proc, &SynchronousProcess::stopProcess);
|
||||
}
|
||||
proc.setCommand({config.sdkManagerToolPath(), newArgs});
|
||||
proc.run();
|
||||
proc.setProcessUserEventWhileRunning();
|
||||
proc.runBlocking();
|
||||
if (assertionFound) {
|
||||
output.success = false;
|
||||
output.stdOutput = proc.stdOut();
|
||||
|
||||
Reference in New Issue
Block a user