Commit 286f863f authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

CppTools: Use correct language features in createHighlighter

Change-Id: Ia8971dbc9be18575a1b22d46dac5bb8c18c63c7a
Reviewed-by: default avatarNikolai Kosjar <>
parent c947f1f8
......@@ -78,23 +78,20 @@ CppTools::CheckSymbols *createHighlighter(const CPlusPlus::Document::Ptr &doc,
const LanguageFeatures features = doc->languageFeatures();
// Get macro uses
foreach (const Document::MacroUse &macro, doc->macroUses()) {
const QString name = macro.macro().nameToQString();
//Filter out QtKeywords
if (isQtKeyword(QStringRef(&name)))
if (features.qtKeywordsEnabled && isQtKeyword(QStringRef(&name)))
// Filter out C++ keywords
// FIXME: Check default values or get from document.
LanguageFeatures features;
features.cxx11Enabled = true;
features.c99Enabled = true;
SimpleLexer tokenize;
// Filter out C++ keywords
const Tokens tokens = tokenize(name);
if (tokens.length() && ( ||
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment