Skip to content

Commit

Permalink
ClangStaticAnalyzer: Print shell quoted command line
Browse files Browse the repository at this point in the history
...by using QtcProcess::quoteArg().

Change-Id: Ic7c160d0332456e94e0d5fa1ca51320b8c1dd394
Reviewed-by: Christian Kandeler <[email protected]>
  • Loading branch information
nikolaivk committed Jul 5, 2016
1 parent 57c2c59 commit 64c7f28
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/plugins/clangstaticanalyzer/clangstaticanalyzerrunner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include "clangstaticanalyzerconstants.h"

#include <utils/qtcprocess.h>
#include <utils/synchronousprocess.h>

#include <QDebug>
Expand Down Expand Up @@ -111,7 +112,7 @@ bool ClangStaticAnalyzerRunner::run(const QString &filePath, const QStringList &
QTC_ASSERT(!m_logFile.isEmpty(), return false);
const QStringList arguments = constructCommandLineArguments(filePath, m_logFile,
compilerOptions);
m_commandLine = (QStringList(m_clangExecutable) + arguments).join(QLatin1String("\" \""));
m_commandLine = Utils::QtcProcess::joinArgs(QStringList(m_clangExecutable) + arguments);

qCDebug(LOG) << "Starting" << m_commandLine;
m_process.start(m_clangExecutable, arguments);
Expand Down Expand Up @@ -171,7 +172,7 @@ QString ClangStaticAnalyzerRunner::createLogFile(const QString &filePath) const

QString ClangStaticAnalyzerRunner::processCommandlineAndOutput() const
{
return tr("Command line: \"%1\"\n"
return tr("Command line: %1\n"
"Process Error: %2\n"
"Output:\n%3")
.arg(m_commandLine,
Expand Down

0 comments on commit 64c7f28

Please sign in to comment.