QtcProcess: Get rid of setProcessUserEventWhileRunning()

Introduce EventLoopMode enum and pass it to the
QtcProcess::runBlocking() instead. There is no need to
store this setting. By default this value is NoEventLoop.

Change-Id: Icad98b77bec5280b79039b7e5aa4ec408261521c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Jarek Kobus
2022-01-24 19:57:52 +01:00
parent 8260074c67
commit 5127d155d2
11 changed files with 25 additions and 40 deletions

View File

@@ -136,8 +136,7 @@ static bool sdkManagerCommand(const AndroidConfig &config, const QStringList &ar
proc.setTimeoutS(timeout);
proc.setTimeOutMessageBoxEnabled(true);
proc.setCommand({config.sdkManagerToolPath(), newArgs});
proc.setProcessUserEventWhileRunning();
proc.runBlocking();
proc.runBlocking(QtcProcess::WithEventLoop);
if (output)
*output = proc.allOutput();
return proc.result() == QtcProcess::FinishedWithSuccess;
@@ -178,8 +177,7 @@ static void sdkManagerCommand(const AndroidConfig &config, const QStringList &ar
&proc, &QtcProcess::stopProcess);
}
proc.setCommand({config.sdkManagerToolPath(), newArgs});
proc.setProcessUserEventWhileRunning();
proc.runBlocking();
proc.runBlocking(QtcProcess::WithEventLoop);
if (assertionFound) {
output.success = false;
output.stdOutput = proc.stdOut();