Reduce calls to SessionManager:startupProject()

Might fix race conditions.

Change-Id: I70f7f28c88afe328468332898919b69fc432098b
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2015-04-16 12:29:24 +02:00
parent da33795496
commit fce0b85106
2 changed files with 11 additions and 7 deletions

View File

@@ -74,8 +74,12 @@ RunControl *ClangStaticAnalyzerRunControlFactory::create(RunConfiguration *runCo
const ProjectInfo projectInfoBeforeBuild = m_tool->projectInfoBeforeBuild();
QTC_ASSERT(projectInfoBeforeBuild.isValid(), return 0);
Project *project = SessionManager::startupProject();
QTC_ASSERT(runConfiguration, return 0);
Target * const target = runConfiguration->target();
QTC_ASSERT(target, return 0);
Project * const project = target->project();
QTC_ASSERT(project, return 0);
const ProjectInfo projectInfoAfterBuild = CppModelManager::instance()->projectInfo(project);
if (projectInfoAfterBuild.configurationOrFilesChanged(projectInfoBeforeBuild)) {