aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cpptools/projectpart.cpp
diff options
context:
space:
mode:
authorFrancois Ferrand <thetypz@gmail.com>2016-02-26 18:48:39 +0100
committerFrancois Ferrand <thetypz@gmail.com>2016-08-23 12:35:04 +0000
commit7b2c09a1186f2cf69f276017ba08da89560f55be (patch)
treee336ae35ba2779b4051d1fcdfb9003b40792b88a /src/plugins/cpptools/projectpart.cpp
parent285c8a7543aae0d71949451f04c99a4924900104 (diff)
C++: Disable C++ keywords in C files
In some (legacy) C files, new and delete may be used for regular identifier. There are some limitations: * Header files have no 'implicit' type, and may be parsed as C++ or ObjC depending on the other files in the project. * QMakeProject use a single ProjectPart for C and C++ files, so there will still be the issue. Change-Id: Iec11687b35f7ccf1e7c0d091b143ae90d950e440 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Diffstat (limited to 'src/plugins/cpptools/projectpart.cpp')
-rw-r--r--src/plugins/cpptools/projectpart.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/cpptools/projectpart.cpp b/src/plugins/cpptools/projectpart.cpp
index e091c50483e..85ea324c9f8 100644
--- a/src/plugins/cpptools/projectpart.cpp
+++ b/src/plugins/cpptools/projectpart.cpp
@@ -45,6 +45,9 @@ void ProjectPart::updateLanguageFeatures()
{
const bool hasQt = qtVersion != NoQt;
languageFeatures.cxx11Enabled = languageVersion >= CXX11;
+ languageFeatures.cxxEnabled = languageVersion >= CXX98;
+ languageFeatures.c99Enabled = languageVersion >= C99;
+ languageFeatures.objCEnabled = languageExtensions & ObjectiveCExtensions;
languageFeatures.qtEnabled = hasQt;
languageFeatures.qtMocRunEnabled = hasQt;
if (!hasQt) {