forked from qt-creator/qt-creator
Jump at the matching class declaration.
This commit is contained in:
@@ -646,8 +646,20 @@ CPPEditor::Link CPPEditor::findLinkAt(const QTextCursor &cursor,
|
|||||||
typeOfExpression(expression, doc, lastSymbol);
|
typeOfExpression(expression, doc, lastSymbol);
|
||||||
|
|
||||||
if (!resolvedSymbols.isEmpty()) {
|
if (!resolvedSymbols.isEmpty()) {
|
||||||
Symbol *symbol = resolvedSymbols.first().second;
|
TypeOfExpression::Result result = resolvedSymbols.first();
|
||||||
if (symbol) {
|
|
||||||
|
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;
|
Symbol *def = 0;
|
||||||
if (lookupDefinition && !lastSymbol->isFunction())
|
if (lookupDefinition && !lastSymbol->isFunction())
|
||||||
def = findDefinition(symbol);
|
def = findDefinition(symbol);
|
||||||
|
|||||||
Reference in New Issue
Block a user