Jump at the function's definition.

This commit is contained in:
Roberto Raggi
2010-05-14 09:11:05 +02:00
parent 5d13a206e2
commit 1302de086a
2 changed files with 3 additions and 6 deletions

View File

@@ -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;