forked from qt-creator/qt-creator
CPlusPlus: Make (sub-)languague selection more generic
Change-Id: I4e2df6992b446adec662ab07671acd41715e41fd Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
@@ -45,9 +45,14 @@ BackwardsScanner::BackwardsScanner(const QTextCursor &cursor,
|
||||
, _block(cursor.block())
|
||||
, _maxBlockCount(maxBlockCount)
|
||||
{
|
||||
_tokenize.setQtMocRunEnabled(true);
|
||||
// FIXME: Why these defaults?
|
||||
LanguageFeatures features;
|
||||
features.qtMocRunEnabled = true;
|
||||
features.qtEnabled = true;
|
||||
features.qtKeywordsEnabled = true;
|
||||
features.objCEnabled = true;
|
||||
_tokenize.setLanguageFeatures(features);
|
||||
_tokenize.setSkipComments(skipComments);
|
||||
_tokenize.setObjCEnabled(true);
|
||||
_text = _block.text().left(cursor.position() - cursor.block().position());
|
||||
|
||||
if (! suffix.isEmpty())
|
||||
|
||||
Reference in New Issue
Block a user