summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppcodecompletion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cpptools/cppcodecompletion.cpp')
-rw-r--r--src/plugins/cpptools/cppcodecompletion.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/cpptools/cppcodecompletion.cpp b/src/plugins/cpptools/cppcodecompletion.cpp
index 87f7b5bfaf..4e6f013d79 100644
--- a/src/plugins/cpptools/cppcodecompletion.cpp
+++ b/src/plugins/cpptools/cppcodecompletion.cpp
@@ -1055,7 +1055,7 @@ void CppCodeCompletion::globalCompletion(Scope *currentScope)
QList<ClassOrNamespace *> usingBindings;
ClassOrNamespace *currentBinding = 0;
- for (Scope *scope = currentScope; scope; scope = scope->scope()) {
+ for (Scope *scope = currentScope; scope; scope = scope->enclosingScope()) {
if (scope->isBlock()) {
if (ClassOrNamespace *binding = context.lookupType(scope)) {
for (unsigned i = 0; i < scope->memberCount(); ++i) {
@@ -1074,7 +1074,7 @@ void CppCodeCompletion::globalCompletion(Scope *currentScope)
}
}
- for (Scope *scope = currentScope; scope; scope = scope->scope()) {
+ for (Scope *scope = currentScope; scope; scope = scope->enclosingScope()) {
if (scope->isBlock()) {
for (unsigned i = 0; i < scope->memberCount(); ++i) {
addCompletionItem(scope->memberAt(i));
@@ -1153,7 +1153,7 @@ bool CppCodeCompletion::completeConstructorOrFunction(const QList<LookupItem> &r
if (! fun->name())
continue;
- else if (! functions.isEmpty() && functions.first()->scope() != fun->scope())
+ else if (! functions.isEmpty() && functions.first()->enclosingScope() != fun->enclosingScope())
continue; // skip fun, it's an hidden declaration.
bool newOverload = true;