diff --git a/src/plugins/clangtools/clangtoolrunner.cpp b/src/plugins/clangtools/clangtoolrunner.cpp index bc44f41b7a3..ed046e9fc60 100644 --- a/src/plugins/clangtools/clangtoolrunner.cpp +++ b/src/plugins/clangtools/clangtoolrunner.cpp @@ -39,6 +39,8 @@ static Q_LOGGING_CATEGORY(LOG, "qtc.clangtools.runner", QtWarningMsg) +using namespace Utils; + namespace ClangTools { namespace Internal { @@ -141,11 +143,10 @@ bool ClangToolRunner::run(const QString &fileToAnalyze, const QStringList &compi m_outputFilePath = createOutputFilePath(m_outputDirPath, fileToAnalyze); QTC_ASSERT(!m_outputFilePath.isEmpty(), return false); - const QStringList arguments = m_argsCreator(compilerOptions); - m_commandLine = Utils::QtcProcess::joinArgs(QStringList(m_executable) + arguments); + m_commandLine = {m_executable, m_argsCreator(compilerOptions)}; - qCDebug(LOG).noquote() << "Starting" << m_commandLine; - m_process->setCommand({m_executable, arguments}); + qCDebug(LOG).noquote() << "Starting" << m_commandLine.toUserOutput(); + m_process->setCommand(m_commandLine); m_process->start(); return true; } @@ -184,7 +185,7 @@ QString ClangToolRunner::commandlineAndOutput() const return tr("Command line: %1\n" "Process Error: %2\n" "Output:\n%3") - .arg(m_commandLine, + .arg(m_commandLine.toUserOutput(), QString::number(m_process->error()), Utils::SynchronousProcess::normalizeNewlines(QString::fromLocal8Bit(m_processOutput))); } diff --git a/src/plugins/clangtools/clangtoolrunner.h b/src/plugins/clangtools/clangtoolrunner.h index 84368f4f775..d42967da354 100644 --- a/src/plugins/clangtools/clangtoolrunner.h +++ b/src/plugins/clangtools/clangtoolrunner.h @@ -90,7 +90,7 @@ private: QString m_fileToAnalyze; QString m_outputFilePath; - QString m_commandLine; + Utils::CommandLine m_commandLine; }; } // namespace Internal