forked from qt-creator/qt-creator
ClangStaticAnalyzer: Print shell quoted command line
...by using QtcProcess::quoteArg(). Change-Id: Ic7c160d0332456e94e0d5fa1ca51320b8c1dd394 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
|
||||
#include "clangstaticanalyzerconstants.h"
|
||||
|
||||
#include <utils/qtcprocess.h>
|
||||
#include <utils/synchronousprocess.h>
|
||||
|
||||
#include <QDebug>
|
||||
@@ -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);
|
||||
@@ -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,
|
||||
|
Reference in New Issue
Block a user