diff options
author | Eike Ziller <eike.ziller@theqtcompany.com> | 2015-08-20 13:22:22 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@theqtcompany.com> | 2015-08-20 13:22:25 +0200 |
commit | 501aad8d2c5af964e4a27f4bf969929c1395a3dd (patch) | |
tree | 01a7bf2bbd51c3027a0e6bc9e9238d0c0ca129b4 | |
parent | 2cb5281c2cf9215b8649445b681359c0cb673406 (diff) | |
parent | 48e5deabb7cda02beda6f09a3dfc59a2789b4b9f (diff) | |
download | qt-creator-501aad8d2c5af964e4a27f4bf969929c1395a3dd.tar.gz |
Merge remote-tracking branch 'origin/3.5'
Change-Id: I037c343c4024a568c10040b836b1efe236100474
-rw-r--r-- | plugins/clangstaticanalyzer/clangstaticanalyzerruncontrolfactory.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrolfactory.cpp b/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrolfactory.cpp index 7c2c61b8e8..95bc9e628a 100644 --- a/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrolfactory.cpp +++ b/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrolfactory.cpp @@ -24,6 +24,8 @@ #include <analyzerbase/analyzerruncontrol.h> #include <analyzerbase/analyzerstartparameters.h> +#include <coreplugin/icontext.h> + #include <cpptools/cppmodelmanager.h> #include <cpptools/cppprojects.h> @@ -31,6 +33,8 @@ #include <projectexplorer/gcctoolchain.h> #include <projectexplorer/kit.h> #include <projectexplorer/kitinformation.h> +#include <projectexplorer/project.h> +#include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/session.h> #include <projectexplorer/target.h> #include <projectexplorer/toolchain.h> @@ -58,6 +62,12 @@ bool ClangStaticAnalyzerRunControlFactory::canRun(RunConfiguration *runConfigura if (runMode != Constants::CLANGSTATICANALYZER_RUN_MODE) return false; + Project *project = runConfiguration->target()->project(); + QTC_ASSERT(project, return false); + const Core::Context context = project->projectLanguages(); + if (!context.contains(ProjectExplorer::Constants::LANG_CXX)) + return false; + Target *target = runConfiguration->target(); QTC_ASSERT(target, return false); Kit *kit = target->kit(); |