diff options
| author | Roberto Raggi <roberto.raggi@nokia.com> | 2010-07-16 11:03:39 +0200 |
|---|---|---|
| committer | Roberto Raggi <roberto.raggi@nokia.com> | 2010-07-16 11:04:52 +0200 |
| commit | fff4203a46559e0afc751785e25eb702d8c8a608 (patch) | |
| tree | 53e4a813426e6f2d4fc4603936e34601c8e30c11 /src/libs/cplusplus/CppDocument.cpp | |
| parent | 41236d29d328950d9240d4e3a5e2c98d3214b65b (diff) | |
| download | qt-creator-fff4203a46559e0afc751785e25eb702d8c8a608.tar.gz | |
Introduced helpers to rewrite types and names.
Done-with: Erik Verbruggen
Diffstat (limited to 'src/libs/cplusplus/CppDocument.cpp')
| -rw-r--r-- | src/libs/cplusplus/CppDocument.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libs/cplusplus/CppDocument.cpp b/src/libs/cplusplus/CppDocument.cpp index 94832cc142..cb9598614b 100644 --- a/src/libs/cplusplus/CppDocument.cpp +++ b/src/libs/cplusplus/CppDocument.cpp @@ -740,11 +740,12 @@ Symbol *Snapshot::findMatchingDefinition(Symbol *declaration) const continue; // nothing to do foreach (Function *fun, result) { - const QList<Symbol *> declarations = context.lookup(fun->name(), fun->scope()); + const QList<LookupItem> declarations = context.lookup(fun->name(), fun->scope()); if (declarations.isEmpty()) continue; - else if (enclosingType == context.lookupType(declarations.first())) + const LookupItem best = declarations.first(); + if (enclosingType == context.lookupType(best.declaration())) viableFunctions.append(fun); } |
