Use new AnalyzerUtils::logToIssuesPane().

Change-Id: I9820a81f67c06b7bb54720772467263bfa9fc8f3
Reviewed-by: Andre Poenitz <andre.poenitz@theqtcompany.com>
This commit is contained in:
Christian Kandeler
2015-03-04 17:33:06 +01:00
committed by Andre Poenitz
parent d2fa3e9902
commit 5b1a7f3756

View File

@@ -23,8 +23,8 @@
#include "clangstaticanalyzersettings.h"
#include "clangstaticanalyzerutils.h"
#include <analyzerbase/analyzerconstants.h>
#include <analyzerbase/analyzermanager.h>
#include <analyzerbase/analyzerutils.h>
#include <clangcodemodel/clangutils.h>
@@ -53,14 +53,6 @@ static Q_LOGGING_CATEGORY(LOG, "qtc.clangstaticanalyzer.runcontrol")
namespace ClangStaticAnalyzer {
namespace Internal {
static void logToIssuesPane(Task::TaskType type, const QString &message)
{
TaskHub::addTask(type, message, Analyzer::Constants::ANALYZERTASK_ID);
if (type == Task::Error)
TaskHub::requestPopup();
}
ClangStaticAnalyzerRunControl::ClangStaticAnalyzerRunControl(
const Analyzer::AnalyzerStartParameters &startParams,
ProjectExplorer::RunConfiguration *runConfiguration,
@@ -204,7 +196,7 @@ bool ClangStaticAnalyzerRunControl::startEngine()
const QString errorMessage = tr("Clang Static Analyzer: Invalid executable \"%1\", stop.")
.arg(executable);
appendMessage(errorMessage + QLatin1Char('\n'), Utils::ErrorMessageFormat);
logToIssuesPane(Task::Error, errorMessage);
AnalyzerUtils::logToIssuesPane(Task::Error, errorMessage);
emit finished();
return false;
}
@@ -217,7 +209,7 @@ bool ClangStaticAnalyzerRunControl::startEngine()
const QString errorMessage
= tr("Clang Static Analyzer: Failed to create temporary dir, stop.");
appendMessage(errorMessage + QLatin1Char('\n'), Utils::ErrorMessageFormat);
logToIssuesPane(Task::Error, errorMessage);
AnalyzerUtils::logToIssuesPane(Task::Error, errorMessage);
emit finished();
return false;
}
@@ -287,8 +279,8 @@ void ClangStaticAnalyzerRunControl::analyzeNextFile()
+ QLatin1Char('\n'),
Utils::NormalMessageFormat);
if (m_filesAnalyzed == 0 && m_filesNotAnalyzed != 0) {
logToIssuesPane(Task::Error,
tr("Clang Static Analyzer: Failed to analyze any files."));
AnalyzerUtils::logToIssuesPane(Task::Error,
tr("Clang Static Analyzer: Failed to analyze any files."));
}
m_progress.reportFinished();
emit finished();
@@ -353,8 +345,8 @@ void ClangStaticAnalyzerRunControl::onRunnerFinishedWithFailure(const QString &e
+ QLatin1Char('\n')
, Utils::StdErrFormat);
appendMessage(errorDetails, Utils::StdErrFormat);
logToIssuesPane(Task::Warning, errorMessage);
logToIssuesPane(Task::Warning, errorDetails);
AnalyzerUtils::logToIssuesPane(Task::Warning, errorMessage);
AnalyzerUtils::logToIssuesPane(Task::Warning, errorDetails);
handleFinished();
}