summaryrefslogtreecommitdiff
path: root/plugins/clangstaticanalyzer
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@theqtcompany.com>2015-03-04 17:33:06 +0100
committerAndre Poenitz <andre.poenitz@theqtcompany.com>2015-03-05 09:36:27 +0200
commit5b1a7f37560d24821e9bea705aaba26f71b604ab (patch)
tree472b9ac651cadbbc791b5c3e87daec8021650aa8 /plugins/clangstaticanalyzer
parentd2fa3e9902c31db2fc72e20c1641c29cc512013d (diff)
downloadqt-creator-5b1a7f37560d24821e9bea705aaba26f71b604ab.tar.gz
Use new AnalyzerUtils::logToIssuesPane().
Change-Id: I9820a81f67c06b7bb54720772467263bfa9fc8f3 Reviewed-by: Andre Poenitz <andre.poenitz@theqtcompany.com>
Diffstat (limited to 'plugins/clangstaticanalyzer')
-rw-r--r--plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp22
1 files changed, 7 insertions, 15 deletions
diff --git a/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp b/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp
index e0576299e4..c99060d13c 100644
--- a/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp
+++ b/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp
@@ -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();
}