From a8f06e858f4019c025b108b4585c2dfc16f3cc4a Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Fri, 24 Oct 2014 10:21:32 +0200 Subject: [PATCH] RunControl: Use the project from the RunConfiguration Change-Id: I9f9214bc82e9d3ebecb3974ff5197f4af885fa07 Reviewed-by: Nikolai Kosjar --- .../clangstaticanalyzerruncontrol.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp b/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp index 7710571effc..f4ba4eb9751 100644 --- a/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp +++ b/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp @@ -34,8 +34,8 @@ #include #include -#include #include +#include #include #include @@ -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 filesToProcess = calculateFilesToProcess(currentProject); + const QList filesToProcess = calculateFilesToProcess(project); qCDebug(LOG()) << "Files to process:"; foreach (const SourceFileConfiguration &fileConfig, filesToProcess) { qCDebug(LOG()) << fileConfig.file.path + QLatin1String(" [")