Commit 22130aae authored by Christian Kamm's avatar Christian Kamm

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
parent e46a99bc
......@@ -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);
......
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