From 4098be05b23dd20aaf752fb9aec79fe8d90a4220 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 28 May 2019 18:59:45 +0200 Subject: 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 --- src/plugins/cppcheck/cppcheckrunner.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/plugins/cppcheck/cppcheckrunner.cpp') diff --git a/src/plugins/cppcheck/cppcheckrunner.cpp b/src/plugins/cppcheck/cppcheckrunner.cpp index 9c3e72bddb..9b9872097a 100644 --- a/src/plugins/cppcheck/cppcheckrunner.cpp +++ b/src/plugins/cppcheck/cppcheckrunner.cpp @@ -32,6 +32,8 @@ #include +using namespace Utils; + namespace Cppcheck { namespace Internal { @@ -153,7 +155,7 @@ void CppcheckRunner::checkQueued() else m_queue.begin().value() = files; - m_process->setCommand(m_binary, arguments); + m_process->setCommand(CommandLine(FilePath::fromString(m_binary), arguments)); m_process->start(); } -- cgit v1.2.1