diff options
author | hjk <hjk121@nokiamail.com> | 2013-10-06 02:41:22 +0200 |
---|---|---|
committer | hjk <hjk121@nokiamail.com> | 2013-10-15 16:22:28 +0200 |
commit | 2b532c73ee96314c4af5d7ff0ecd4c31c6f81730 (patch) | |
tree | 3d7d4fc1adb7800a13fdf2ca37fee9f1ed485d76 /src/plugins/cpptools/cpphighlightingsupportinternal.cpp | |
parent | 0a600e041afd7478aef528c61776a0fc660fd175 (diff) | |
download | qt-creator-2b532c73ee96314c4af5d7ff0ecd4c31c6f81730.tar.gz |
CPlusPlus: Make (sub-)languague selection more generic
Change-Id: I4e2df6992b446adec662ab07671acd41715e41fd
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Diffstat (limited to 'src/plugins/cpptools/cpphighlightingsupportinternal.cpp')
-rw-r--r-- | src/plugins/cpptools/cpphighlightingsupportinternal.cpp | 11 |
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; |