ClangStaticAnalyzer: Improve debug output

* Normalize line endings from process output
* Do not print extra quotes

Change-Id: I39e055bed09c4fe52878d63fc443130d70be95cb
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2016-07-05 10:40:34 +02:00
parent dfe8bb0db7
commit ea837bb8d8
2 changed files with 5 additions and 3 deletions

View File

@@ -564,7 +564,8 @@ void ClangStaticAnalyzerRunControl::onRunnerFinishedWithSuccess(const QString &l
void ClangStaticAnalyzerRunControl::onRunnerFinishedWithFailure(const QString &errorMessage, void ClangStaticAnalyzerRunControl::onRunnerFinishedWithFailure(const QString &errorMessage,
const QString &errorDetails) const QString &errorDetails)
{ {
qCDebug(LOG) << "onRunnerFinishedWithFailure:" << errorMessage << errorDetails; qCDebug(LOG).noquote() << "onRunnerFinishedWithFailure:"
<< errorMessage << '\n' << errorDetails;
++m_filesNotAnalyzed; ++m_filesNotAnalyzed;
m_success = false; m_success = false;

View File

@@ -114,7 +114,7 @@ bool ClangStaticAnalyzerRunner::run(const QString &filePath, const QStringList &
compilerOptions); compilerOptions);
m_commandLine = Utils::QtcProcess::joinArgs(QStringList(m_clangExecutable) + arguments); m_commandLine = Utils::QtcProcess::joinArgs(QStringList(m_clangExecutable) + arguments);
qCDebug(LOG) << "Starting" << m_commandLine; qCDebug(LOG).noquote() << "Starting" << m_commandLine;
m_process.start(m_clangExecutable, arguments); m_process.start(m_clangExecutable, arguments);
return true; return true;
} }
@@ -177,7 +177,8 @@ QString ClangStaticAnalyzerRunner::processCommandlineAndOutput() const
"Output:\n%3") "Output:\n%3")
.arg(m_commandLine, .arg(m_commandLine,
QString::number(m_process.error()), QString::number(m_process.error()),
QString::fromLocal8Bit(m_processOutput)); Utils::SynchronousProcess::normalizeNewlines(
QString::fromLocal8Bit(m_processOutput)));
} }
QString ClangStaticAnalyzerRunner::actualLogFile() const QString ClangStaticAnalyzerRunner::actualLogFile() const