aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@theqtcompany.com>2014-10-24 10:21:32 +0200
committerNikolai Kosjar <nikolai.kosjar@theqtcompany.com>2014-10-24 11:27:56 +0300
commita8f06e858f4019c025b108b4585c2dfc16f3cc4a (patch)
treee97590bd7608fd617674f9785922fc0d48e79fab
parent3f8314024cdd6bfd76629826805b680f6756d117 (diff)
RunControl: Use the project from the RunConfiguration
Change-Id: I9f9214bc82e9d3ebecb3974ff5197f4af885fa07 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
-rw-r--r--plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp b/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp
index 7710571eff..f4ba4eb975 100644
--- a/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp
+++ b/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp
@@ -34,8 +34,8 @@
#include <cpptools/cppprojects.h>
#include <cpptools/cppprojectfile.h>
-#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/project.h>
+#include <projectexplorer/target.h>
#include <QLoggingCategory>
#include <QTemporaryDir>
@@ -84,8 +84,12 @@ bool ClangStaticAnalyzerRunControl::startEngine()
{
emit starting(this);
- Project *currentProject = ProjectExplorerPlugin::currentProject();
- QTC_ASSERT(currentProject, emit finished(); return false);
+ RunConfiguration *runConfig = runConfiguration();
+ QTC_ASSERT(runConfig, emit finished(); return false);
+ Target *target = runConfig->target();
+ QTC_ASSERT(target, emit finished(); return false);
+ Project *project = target->project();
+ QTC_ASSERT(project, emit finished(); return false);
// Check clang executable
bool isValidClangExecutable;
@@ -111,7 +115,7 @@ bool ClangStaticAnalyzerRunControl::startEngine()
m_clangLogFileDir = temporaryDir.path();
// Collect files
- const QList<SourceFileConfiguration> filesToProcess = calculateFilesToProcess(currentProject);
+ const QList<SourceFileConfiguration> filesToProcess = calculateFilesToProcess(project);
qCDebug(LOG()) << "Files to process:";
foreach (const SourceFileConfiguration &fileConfig, filesToProcess) {
qCDebug(LOG()) << fileConfig.file.path + QLatin1String(" [")