diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2010-08-11 12:26:02 +0200 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2010-08-11 15:25:18 +0200 |
commit | 354b9712e4655040930a9f18de4e6b4c71dc42d9 (patch) | |
tree | 474bab43aa8a84893f38b8a0552f8071404e6a12 /src/plugins/cpptools/abstracteditorsupport.cpp | |
parent | 5accc9664ea247a5b9e1fa6097a04252fb57f01b (diff) |
Merged ScopedSymbol and Scope.
Diffstat (limited to 'src/plugins/cpptools/abstracteditorsupport.cpp')
-rw-r--r-- | src/plugins/cpptools/abstracteditorsupport.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/plugins/cpptools/abstracteditorsupport.cpp b/src/plugins/cpptools/abstracteditorsupport.cpp index d1edabf72d..938e23c0ed 100644 --- a/src/plugins/cpptools/abstracteditorsupport.cpp +++ b/src/plugins/cpptools/abstracteditorsupport.cpp @@ -68,15 +68,14 @@ QString AbstractEditorSupport::functionAt(const CppModelManagerInterface *modelM return QString(); if (const CPlusPlus::Symbol *symbol = document->lastVisibleSymbolAt(line, column)) if (const CPlusPlus::Scope *scope = symbol->scope()) - if (const CPlusPlus::Scope *functionScope = scope->enclosingPrototypeScope()) - if (const CPlusPlus::Symbol *function = functionScope->owner()) { + if (const CPlusPlus::Scope *functionScope = scope->enclosingFunction()) + if (const CPlusPlus::Symbol *function = functionScope) { const CPlusPlus::Overview o; QString rc = o.prettyName(function->name()); // Prepend namespace "Foo::Foo::foo()" up to empty root namespace for (const CPlusPlus::Symbol *owner = function; ; ) { - if (const CPlusPlus::Scope *nameSpace = owner->enclosingNamespaceScope()) { - owner = nameSpace->owner(); - const QString name = o.prettyName(owner->name()); + if (const CPlusPlus::Scope *nameSpace = owner->enclosingNamespace()) { + const QString name = o.prettyName(nameSpace->name()); if (name.isEmpty()) { break; } else { |