Commit 573b33d7 authored by Roberto Raggi's avatar Roberto Raggi

Jump at the matching class declaration.

parent ad5a0010
......@@ -646,8 +646,20 @@ CPPEditor::Link CPPEditor::findLinkAt(const QTextCursor &cursor,
typeOfExpression(expression, doc, lastSymbol);
if (!resolvedSymbols.isEmpty()) {
Symbol *symbol = resolvedSymbols.first().second;
if (symbol) {
TypeOfExpression::Result result = resolvedSymbols.first();
if (result.first->isForwardClassDeclarationType()) {
while (! resolvedSymbols.isEmpty()) {
TypeOfExpression::Result r = resolvedSymbols.takeFirst();
if (! r.first->isForwardClassDeclarationType()) {
result = r;
break;
}
}
}
if (Symbol *symbol = result.second) {
Symbol *def = 0;
if (lookupDefinition && !lastSymbol->isFunction())
def = findDefinition(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