diff options
author | hjk <hjk@qt.io> | 2019-05-28 18:59:45 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2019-05-29 14:36:46 +0000 |
commit | 4098be05b23dd20aaf752fb9aec79fe8d90a4220 (patch) | |
tree | b593688a2f5808fb42221dcf4127faeba0d8c6c6 /src/plugins/winrt | |
parent | f50859e856b911ba0667fc9aaa5df4c8882f8679 (diff) | |
download | qt-creator-4098be05b23dd20aaf752fb9aec79fe8d90a4220.tar.gz |
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/winrt')
-rw-r--r-- | src/plugins/winrt/winrtdevice.cpp | 2 | ||||
-rw-r--r-- | src/plugins/winrt/winrtrunnerhelper.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/winrt/winrtdevice.cpp b/src/plugins/winrt/winrtdevice.cpp index 672947f9cd..9ceba3b323 100644 --- a/src/plugins/winrt/winrtdevice.cpp +++ b/src/plugins/winrt/winrtdevice.cpp @@ -160,7 +160,7 @@ void WinRtDeviceFactory::autoDetect() } const QString args = QStringLiteral("--list-devices"); - m_process->setCommand(runnerFilePath, args); + m_process->setCommand(CommandLine(FilePath::fromString(runnerFilePath), args)); qCDebug(winrtDeviceLog) << __FUNCTION__ << "Starting process" << runnerFilePath << "with arguments" << args; MessageManager::write(runnerFilePath + QLatin1Char(' ') + args); diff --git a/src/plugins/winrt/winrtrunnerhelper.cpp b/src/plugins/winrt/winrtrunnerhelper.cpp index 4ef9b5972b..8a9793fa56 100644 --- a/src/plugins/winrt/winrtrunnerhelper.cpp +++ b/src/plugins/winrt/winrtrunnerhelper.cpp @@ -224,7 +224,7 @@ void WinRtRunnerHelper::startWinRtRunner(const RunConf &conf) } process->setUseCtrlCStub(true); - process->setCommand(m_runnerFilePath, runnerArgs); + process->setCommand(CommandLine(FilePath::fromString(m_runnerFilePath), runnerArgs)); process->setEnvironment(m_environment); process->setWorkingDirectory(QFileInfo(m_executableFilePath).absolutePath()); process->start(); |