forked from qt-creator/qt-creator
C++ editor: Fix performance problem when using the mouse to find links.
It is unnecessary to try hard to resolve a class forward declaration when all you want to know is whether it is a valid link or not. Task-number: QTCREATORBUG-2688 Reviewed-by: Thorbjorn Lindeijer
This commit is contained in:
@@ -1313,10 +1313,10 @@ CPPEditor::Link CPPEditor::findLinkAt(const QTextCursor &cursor,
|
||||
|
||||
if (def == lastVisibleSymbol)
|
||||
def = 0; // jump to declaration then.
|
||||
}
|
||||
|
||||
if (symbol->isForwardClassDeclaration()) {
|
||||
def = snapshot.findMatchingClassDeclaration(symbol);
|
||||
if (symbol->isForwardClassDeclaration()) {
|
||||
def = snapshot.findMatchingClassDeclaration(symbol);
|
||||
}
|
||||
}
|
||||
|
||||
link = linkToSymbol(def ? def : symbol);
|
||||
|
||||
Reference in New Issue
Block a user