From b43e22b8f40ad19ead26c6e9c1d2f3ca070afd06 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Thu, 23 Nov 2017 16:11:07 +0200 Subject: [PATCH] CppTools: Disable Qt keywords for C files Task-number: QTCREATORBUG-1478 Change-Id: I29afc0f38e5f86ca2c30d5b6551974df68ee7512 Reviewed-by: Nikolai Kosjar --- src/plugins/cpptools/projectpart.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/cpptools/projectpart.cpp b/src/plugins/cpptools/projectpart.cpp index e77e079c808..4dc871e87ea 100644 --- a/src/plugins/cpptools/projectpart.cpp +++ b/src/plugins/cpptools/projectpart.cpp @@ -35,9 +35,10 @@ namespace CppTools { void ProjectPart::updateLanguageFeatures() { - const bool hasQt = qtVersion != NoQt; + const bool hasCxx = languageVersion >= CXX98; + const bool hasQt = hasCxx && qtVersion != NoQt; languageFeatures.cxx11Enabled = languageVersion >= CXX11; - languageFeatures.cxxEnabled = languageVersion >= CXX98; + languageFeatures.cxxEnabled = hasCxx; languageFeatures.c99Enabled = languageVersion >= C99; languageFeatures.objCEnabled = languageExtensions.testFlag(ObjectiveCExtensions); languageFeatures.qtEnabled = hasQt;