Use Utils::FilePath in SynchronousProcess

Adapt callers and surrounding code.

Change-Id: Ie6c1883a44169cf9d790d06b660f46d24dc24c89
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2019-06-06 16:27:55 +02:00
parent 021d3a6c59
commit ca4ba34229
48 changed files with 202 additions and 221 deletions

View File

@@ -60,10 +60,9 @@ public:
static bool androidToolCommand(Utils::FilePath toolPath, const QStringList &args,
const QProcessEnvironment &environment, QString *output)
{
QString androidToolPath = toolPath.toString();
SynchronousProcess proc;
proc.setProcessEnvironment(environment);
SynchronousProcessResponse response = proc.runBlocking(androidToolPath, args);
SynchronousProcessResponse response = proc.runBlocking({toolPath, args});
if (response.result == SynchronousProcessResponse::Finished) {
if (output)
*output = response.allOutput();
@@ -131,8 +130,7 @@ bool AndroidToolManager::removeAvd(const QString &name) const
proc.setTimeoutS(5);
proc.setProcessEnvironment(AndroidConfigurations::toolsEnvironment(m_config));
SynchronousProcessResponse response
= proc.runBlocking(m_config.androidToolPath().toString(),
QStringList({"delete", "avd", "-n", name}));
= proc.runBlocking({m_config.androidToolPath(), {"delete", "avd", "-n", name}});
return response.result == SynchronousProcessResponse::Finished && response.exitCode == 0;
}