forked from qt-creator/qt-creator
Jump at the function's definition.
This commit is contained in:
@@ -555,6 +555,7 @@ bool ResolveExpression::visit(MemberAccessAST *ast)
|
||||
// The candidate types for the base expression are stored in
|
||||
// _results.
|
||||
const QList<LookupItem> baseResults = _results;
|
||||
_results.clear();
|
||||
|
||||
// Evaluate the expression-id that follows the access operator.
|
||||
const Name *memberName = 0;
|
||||
|
||||
@@ -1427,7 +1427,7 @@ CPPEditor::Link CPPEditor::findLinkAt(const QTextCursor &cursor,
|
||||
|
||||
TypeOfExpression typeOfExpression;
|
||||
typeOfExpression.init(doc, snapshot);
|
||||
QList<LookupItem> resolvedSymbols = typeOfExpression(expression, scope, TypeOfExpression::Preprocess);
|
||||
const QList<LookupItem> resolvedSymbols = typeOfExpression(expression, scope, TypeOfExpression::Preprocess);
|
||||
|
||||
if (!resolvedSymbols.isEmpty()) {
|
||||
const LookupItem result = skipForwardDeclarations(resolvedSymbols);
|
||||
@@ -1435,12 +1435,8 @@ CPPEditor::Link CPPEditor::findLinkAt(const QTextCursor &cursor,
|
||||
if (Symbol *symbol = result.declaration()) {
|
||||
Symbol *def = 0;
|
||||
|
||||
qWarning() << "find definition?";
|
||||
#warning port me
|
||||
#if 0
|
||||
if (resolveTarget && !lastSymbol->isFunction())
|
||||
if (resolveTarget)
|
||||
def = findDefinition(symbol, snapshot);
|
||||
#endif
|
||||
|
||||
link = linkToSymbol(def ? def : symbol);
|
||||
link.begin = beginOfToken;
|
||||
|
||||
Reference in New Issue
Block a user