forked from qt-creator/qt-creator
Revert "C++: Fix highlighting for lines with predefined macros"
This takes too much memory. For qtcreator.pro the numbers are as
follows:
Patch applied: ~ 1600MB (RES)
Patch reverted: ~ 510MB (RES)
This reverts commit 4c2daa90ce.
Task-number: QTCREATORBUG-10973
Change-Id: I843bd7c1ea4a26a1ec55ddc14c2a34a98d040922
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
@@ -797,12 +797,10 @@ const Macro *CPPEditorWidget::findCanonicalMacro(const QTextCursor &cursor, Docu
|
||||
if (const Macro *macro = doc->findMacroDefinitionAt(line)) {
|
||||
QTextCursor macroCursor = cursor;
|
||||
const QByteArray name = identifierUnderCursor(¯oCursor).toLatin1();
|
||||
if (macro->name() == name && !macro->isPredefined())
|
||||
if (macro->name() == name)
|
||||
return macro;
|
||||
} else if (const Document::MacroUse *use = doc->findMacroUseAt(cursor.position())) {
|
||||
const Macro ¯o = use->macro();
|
||||
if (!macro.isPredefined())
|
||||
return ¯o;
|
||||
return &use->macro();
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user