Skip to content
Snippets Groups Projects
Commit f6eb8349 authored by Nikolai Kosjar's avatar Nikolai Kosjar
Browse files

RunControl: Announce starting and finishing in Application output pane


Change-Id: I040f848dbdd6ef92ce03525e91c4b536390df9b4
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
parent 4acbedf8
No related branches found
No related tags found
No related merge requests found
...@@ -90,12 +90,16 @@ bool ClangStaticAnalyzerRunControl::startEngine() ...@@ -90,12 +90,16 @@ bool ClangStaticAnalyzerRunControl::startEngine()
Project *project = target->project(); Project *project = target->project();
QTC_ASSERT(project, emit finished(); return false); QTC_ASSERT(project, emit finished(); return false);
const QString projectFile = project->projectFilePath().toString();
appendMessage(tr("Running Clang Static Analyzer on %1").arg(projectFile) + QLatin1Char('\n'),
Utils::NormalMessageFormat);
// Check clang executable // Check clang executable
bool isValidClangExecutable; bool isValidClangExecutable;
const QString executable = clangExecutableFromSettings(&isValidClangExecutable); const QString executable = clangExecutableFromSettings(&isValidClangExecutable);
if (!isValidClangExecutable) { if (!isValidClangExecutable) {
emit appendMessage(tr("Clang Static Analyzer: Invalid executable \"%1\", stop.\n") emit appendMessage(tr("Clang Static Analyzer: Invalid executable \"%1\", stop.")
.arg(executable), .arg(executable) + QLatin1Char('\n'),
Utils::ErrorMessageFormat); Utils::ErrorMessageFormat);
emit finished(); emit finished();
return false; return false;
...@@ -106,8 +110,8 @@ bool ClangStaticAnalyzerRunControl::startEngine() ...@@ -106,8 +110,8 @@ bool ClangStaticAnalyzerRunControl::startEngine()
QTemporaryDir temporaryDir(QDir::tempPath() + QLatin1String("/qtc-clangstaticanalyzer-XXXXXX")); QTemporaryDir temporaryDir(QDir::tempPath() + QLatin1String("/qtc-clangstaticanalyzer-XXXXXX"));
temporaryDir.setAutoRemove(false); temporaryDir.setAutoRemove(false);
if (!temporaryDir.isValid()) { if (!temporaryDir.isValid()) {
emit appendMessage(tr("Clang Static Analyzer: Failed to create temporary dir, stop.\n"), emit appendMessage(tr("Clang Static Analyzer: Failed to create temporary dir, stop.")
Utils::ErrorMessageFormat); + QLatin1Char('\n'), Utils::ErrorMessageFormat);
emit finished(); emit finished();
return false; return false;
} }
...@@ -162,6 +166,8 @@ void ClangStaticAnalyzerRunControl::analyzeNextFile() ...@@ -162,6 +166,8 @@ void ClangStaticAnalyzerRunControl::analyzeNextFile()
if (m_filesToProcess.isEmpty()) { if (m_filesToProcess.isEmpty()) {
if (m_runners.size() == 0) { if (m_runners.size() == 0) {
appendMessage(tr("Clang Static Analyzer finished.") + QLatin1Char('\n'),
Utils::NormalMessageFormat);
m_progress.reportFinished(); m_progress.reportFinished();
emit finished(); emit finished();
} }
...@@ -199,6 +205,7 @@ void ClangStaticAnalyzerRunControl::onRunnerFinishedWithSuccess(const QString &l ...@@ -199,6 +205,7 @@ void ClangStaticAnalyzerRunControl::onRunnerFinishedWithSuccess(const QString &l
QString errorMessage; QString errorMessage;
const QList<Diagnostic> diagnostics = LogFileReader::read(logFilePath, &errorMessage); const QList<Diagnostic> diagnostics = LogFileReader::read(logFilePath, &errorMessage);
QTC_CHECK(errorMessage.isEmpty());
if (!errorMessage.isEmpty()) if (!errorMessage.isEmpty())
qCDebug(LOG) << "onRunnerFinishedWithSuccess: Error reading log file:" << errorMessage; qCDebug(LOG) << "onRunnerFinishedWithSuccess: Error reading log file:" << errorMessage;
if (!diagnostics.isEmpty()) if (!diagnostics.isEmpty())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment