aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/android
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-05-28 18:59:45 +0200
committerhjk <hjk@qt.io>2019-05-29 14:36:46 +0000
commit4098be05b23dd20aaf752fb9aec79fe8d90a4220 (patch)
treeb593688a2f5808fb42221dcf4127faeba0d8c6c6 /src/plugins/android
parentf50859e856b911ba0667fc9aaa5df4c8882f8679 (diff)
Utils: Extract a CommandLine structure from a QtcProcess
We regularly pass around strings or filenames or pairs of strings or filenames and stringlist etc the in the end will be used as a kind of "command line", with quite a bit of ad-hoc user code and QtcProcess::addArg etc to set them up and manipulate them. Let's have a class for that concept. Change-Id: I288ab939d853b32c717135a65242c584c2beab50 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/android')
-rw-r--r--src/plugins/android/androiddeployqtstep.cpp2
-rw-r--r--src/plugins/android/androidsdkmanager.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/android/androiddeployqtstep.cpp b/src/plugins/android/androiddeployqtstep.cpp
index 77ea540e6f5..94a016478c2 100644
--- a/src/plugins/android/androiddeployqtstep.cpp
+++ b/src/plugins/android/androiddeployqtstep.cpp
@@ -366,7 +366,7 @@ AndroidDeployQtStep::DeployErrorCode AndroidDeployQtStep::runDeploy()
}
m_process = new Utils::QtcProcess;
- m_process->setCommand(m_command, args);
+ m_process->setCommand(Utils::CommandLine(Utils::FilePath::fromString(m_command), args));
m_process->setWorkingDirectory(m_workingDirectory);
m_process->setEnvironment(m_environment);
diff --git a/src/plugins/android/androidsdkmanager.cpp b/src/plugins/android/androidsdkmanager.cpp
index 5d0333f5f87..8b58cdd1add 100644
--- a/src/plugins/android/androidsdkmanager.cpp
+++ b/src/plugins/android/androidsdkmanager.cpp
@@ -930,7 +930,7 @@ void AndroidSdkManagerPrivate::getPendingLicense(SdkCmdFutureInterface &fi)
QtcProcess licenseCommand;
licenseCommand.setProcessEnvironment(AndroidConfigurations::toolsEnvironment(m_config));
bool reviewingLicenses = false;
- licenseCommand.setCommand(m_config.sdkManagerToolPath().toString(), {"--licenses"});
+ licenseCommand.setCommand(CommandLine(m_config.sdkManagerToolPath(), "--licenses"));
if (Utils::HostOsInfo::isWindowsHost())
licenseCommand.setUseCtrlCStub(true);
licenseCommand.start();