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:
@@ -558,8 +558,6 @@ restart_search:
|
||||
usages.clear();
|
||||
foreach (const Document::MacroUse &use, doc->macroUses()) {
|
||||
const Macro &useMacro = use.macro();
|
||||
if (useMacro.isPredefined())
|
||||
continue;
|
||||
|
||||
if (useMacro.fileName() == macro.fileName()) { // Check if this is a match, but possibly against an outdated document.
|
||||
if (source.isEmpty())
|
||||
|
||||
@@ -58,9 +58,6 @@ QFuture<TextEditor::HighlightingResult> CppHighlightingSupportInternal::highligh
|
||||
|
||||
// Get macro definitions
|
||||
foreach (const CPlusPlus::Macro& macro, doc->definedMacros()) {
|
||||
if (macro.isPredefined())
|
||||
continue; // No "real" definition location
|
||||
|
||||
int line, column;
|
||||
editor()->convertPosition(macro.offset(), &line, &column);
|
||||
++column; //Highlighting starts at (column-1) --> compensate here
|
||||
|
||||
Reference in New Issue
Block a user