forked from qt-creator/qt-creator
Highlight macro definitions like other uses.
Change-Id: I5a0852e5c1e154b52d712f1dfcfe2fc04e0eb9fb Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
committed by
Erik Verbruggen
parent
f128a92485
commit
83dff048cf
@@ -53,8 +53,18 @@ QFuture<CppHighlightingSupport::Use> CppHighlightingSupportInternal::highlightin
|
||||
const Document::Ptr &doc,
|
||||
const Snapshot &snapshot) const
|
||||
{
|
||||
//Get macro uses
|
||||
QList<CheckSymbols::Use> macroUses;
|
||||
|
||||
//Get macro definitions
|
||||
foreach (const CPlusPlus::Macro& macro, doc->definedMacros()) {
|
||||
int line, column;
|
||||
editor()->convertPosition(macro.offset(), &line, &column);
|
||||
++column; //Highlighting starts at (column-1) --> compensate here
|
||||
CheckSymbols::Use use(line, column, macro.name().size(), SemanticInfo::MacroUse);
|
||||
macroUses.append(use);
|
||||
}
|
||||
|
||||
//Get macro uses
|
||||
foreach (Document::MacroUse macro, doc->macroUses()) {
|
||||
const QString name = QString::fromUtf8(macro.macro().name());
|
||||
|
||||
|
Reference in New Issue
Block a user