From 6b77dea65a66a83dbeb24c9f0b01cb6a9fece5a5 Mon Sep 17 00:00:00 2001
From: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Date: Wed, 13 Apr 2016 16:21:18 +0200
Subject: [PATCH] Clang Static Analyzer: Enable action only for supported
 project managers

Change-Id: Iebdfabe7d81cd81a780ba6c2c6513ca866ef7bd7
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
---
 .../clangstaticanalyzerruncontrolfactory.cpp                  | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrolfactory.cpp b/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrolfactory.cpp
index 017a87cefdd..f9058f42fb2 100644
--- a/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrolfactory.cpp
+++ b/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrolfactory.cpp
@@ -70,6 +70,10 @@ bool ClangStaticAnalyzerRunControlFactory::canRun(RunConfiguration *runConfigura
 
     Project *project = runConfiguration->target()->project();
     QTC_ASSERT(project, return false);
+
+    if (project->id() != "Qt4ProjectManager.Qt4Project" && project->id() != "Qbs.QbsProject")
+        return false;
+
     const Core::Context context = project->projectLanguages();
     if (!context.contains(ProjectExplorer::Constants::LANG_CXX))
         return false;
-- 
GitLab