summaryrefslogtreecommitdiff
path: root/src/plugins/coreplugin
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/coreplugin
parentf50859e856b911ba0667fc9aaa5df4c8882f8679 (diff)
downloadqt-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/coreplugin')
-rw-r--r--src/plugins/coreplugin/externaltool.cpp2
-rw-r--r--src/plugins/coreplugin/locator/executefilter.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/coreplugin/externaltool.cpp b/src/plugins/coreplugin/externaltool.cpp
index 24a40db3eb..b339dddd3d 100644
--- a/src/plugins/coreplugin/externaltool.cpp
+++ b/src/plugins/coreplugin/externaltool.cpp
@@ -663,7 +663,7 @@ void ExternalToolRunner::run()
this, &ExternalToolRunner::readStandardError);
if (!m_resolvedWorkingDirectory.isEmpty())
m_process->setWorkingDirectory(m_resolvedWorkingDirectory);
- m_process->setCommand(m_resolvedExecutable.toString(), m_resolvedArguments);
+ m_process->setCommand(CommandLine(m_resolvedExecutable, m_resolvedArguments));
m_process->setEnvironment(m_resolvedEnvironment);
MessageManager::write(tr("Starting external tool \"%1\" %2")
.arg(m_resolvedExecutable.toUserOutput(), m_resolvedArguments),
diff --git a/src/plugins/coreplugin/locator/executefilter.cpp b/src/plugins/coreplugin/locator/executefilter.cpp
index 2d451a5b6e..bc4a4b65a7 100644
--- a/src/plugins/coreplugin/locator/executefilter.cpp
+++ b/src/plugins/coreplugin/locator/executefilter.cpp
@@ -169,7 +169,7 @@ void ExecuteFilter::runHeadCommand()
}
MessageManager::write(tr("Starting command \"%1\".").arg(headCommand()));
m_process->setWorkingDirectory(d.workingDirectory);
- m_process->setCommand(fullPath.toString(), d.arguments);
+ m_process->setCommand(Utils::CommandLine(fullPath, d.arguments));
m_process->start();
m_process->closeWriteChannel();
if (!m_process->waitForStarted(1000)) {