CPlusPlus: Make (sub-)languague selection more generic

Change-Id: I4e2df6992b446adec662ab07671acd41715e41fd
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
hjk
2013-10-06 02:41:22 +02:00
parent 0a600e041a
commit 2b532c73ee
23 changed files with 272 additions and 320 deletions

View File

@@ -1055,9 +1055,14 @@ int CodeFormatter::tokenizeBlock(const QTextBlock &block, bool *endedJoined)
startState = 0;
QTC_ASSERT(startState != -1, return 0);
LanguageFeatures features;
features.qtEnabled = true;
features.qtMocRunEnabled = true;
features.qtKeywordsEnabled = true;
features.objCEnabled = true;
SimpleLexer tokenize;
tokenize.setQtMocRunEnabled(true);
tokenize.setObjCEnabled(true);
tokenize.setLanguageFeatures(features);
m_currentLine = block.text();
// to determine whether a line was joined, Tokenizer needs a