summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cpphighlightingsupportinternal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cpptools/cpphighlightingsupportinternal.cpp')
-rw-r--r--src/plugins/cpptools/cpphighlightingsupportinternal.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/plugins/cpptools/cpphighlightingsupportinternal.cpp b/src/plugins/cpptools/cpphighlightingsupportinternal.cpp
index 4ad285258b..3009d45c16 100644
--- a/src/plugins/cpptools/cpphighlightingsupportinternal.cpp
+++ b/src/plugins/cpptools/cpphighlightingsupportinternal.cpp
@@ -73,11 +73,14 @@ QFuture<TextEditor::HighlightingResult> CppHighlightingSupportInternal::highligh
if (isQtKeyword(QStringRef(&name)))
continue;
- //Filter out C++ keywords
+ // Filter out C++ keywords
+ // FIXME: Check default values or get from document.
+ LanguageFeatures features;
+ features.cxx11Enabled = true;
+
SimpleLexer tokenize;
- tokenize.setQtMocRunEnabled(false);
- tokenize.setObjCEnabled(false);
- tokenize.setCxx0xEnabled(true);
+ tokenize.setLanguageFeatures(features);
+
const QList<Token> tokens = tokenize(name);
if (tokens.length() && (tokens.at(0).isKeyword() || tokens.at(0).isObjCAtKeyword()))
continue;