forked from qt-creator/qt-creator
C++: Accept language features in BackwardsScanner et al
Change-Id: Id97ca27fa909979573efca12dc0cd14b28eacd17 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
1a37605f91
commit
d63624afe0
@@ -38,6 +38,7 @@
|
||||
using namespace CPlusPlus;
|
||||
|
||||
BackwardsScanner::BackwardsScanner(const QTextCursor &cursor,
|
||||
const LanguageFeatures &languageFeatures,
|
||||
int maxBlockCount,
|
||||
const QString &suffix,
|
||||
bool skipComments)
|
||||
@@ -46,13 +47,7 @@ BackwardsScanner::BackwardsScanner(const QTextCursor &cursor,
|
||||
, _block(cursor.block())
|
||||
, _maxBlockCount(maxBlockCount)
|
||||
{
|
||||
// FIXME: Why these defaults?
|
||||
LanguageFeatures features;
|
||||
features.qtMocRunEnabled = true;
|
||||
features.qtEnabled = true;
|
||||
features.qtKeywordsEnabled = true;
|
||||
features.objCEnabled = true;
|
||||
_tokenize.setLanguageFeatures(features);
|
||||
_tokenize.setLanguageFeatures(languageFeatures);
|
||||
_tokenize.setSkipComments(skipComments);
|
||||
_text = _block.text().left(cursor.position() - cursor.block().position());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user