aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor/cpphighlighter.cpp
diff options
context:
space:
mode:
authorhjk <hjk121@nokiamail.com>2013-10-06 02:41:22 +0200
committerhjk <hjk121@nokiamail.com>2013-10-15 16:22:28 +0200
commit2b532c73ee96314c4af5d7ff0ecd4c31c6f81730 (patch)
tree3d7d4fc1adb7800a13fdf2ca37fee9f1ed485d76 /src/plugins/cppeditor/cpphighlighter.cpp
parent0a600e041afd7478aef528c61776a0fc660fd175 (diff)
CPlusPlus: Make (sub-)languague selection more generic
Change-Id: I4e2df6992b446adec662ab07671acd41715e41fd Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Diffstat (limited to 'src/plugins/cppeditor/cpphighlighter.cpp')
-rw-r--r--src/plugins/cppeditor/cpphighlighter.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/cppeditor/cpphighlighter.cpp b/src/plugins/cppeditor/cpphighlighter.cpp
index 7e16616ed2..ec143ee6d0 100644
--- a/src/plugins/cppeditor/cpphighlighter.cpp
+++ b/src/plugins/cppeditor/cpphighlighter.cpp
@@ -74,10 +74,12 @@ void CppHighlighter::highlightBlock(const QString &text)
int braceDepth = initialBraceDepth;
+ // FIXME: Check defaults or get from document.
+ LanguageFeatures features;
+ features.cxx11Enabled = true;
+
SimpleLexer tokenize;
- tokenize.setQtMocRunEnabled(false);
- tokenize.setObjCEnabled(false);
- tokenize.setCxx0xEnabled(true);
+ tokenize.setLanguageFeatures(features);
int initialState = state;
const QList<Token> tokens = tokenize(text, initialState);