forked from qt-creator/qt-creator
C++: Make 'follow symbol' work with forward declared classes.
If it encounters a forward declaration, it tries to find the class declaration globally now. Task-number: QTCREATORBUG-20
This commit is contained in:
@@ -1315,6 +1315,10 @@ CPPEditor::Link CPPEditor::findLinkAt(const QTextCursor &cursor,
|
||||
def = 0; // jump to declaration then.
|
||||
}
|
||||
|
||||
if (symbol->isForwardClassDeclaration()) {
|
||||
def = snapshot.findMatchingClassDeclaration(symbol);
|
||||
}
|
||||
|
||||
link = linkToSymbol(def ? def : symbol);
|
||||
link.begin = beginOfToken;
|
||||
link.end = endOfToken;
|
||||
|
||||
Reference in New Issue
Block a user