Merge remote-tracking branch 'origin/3.0'

Conflicts:
	src/plugins/cpptools/cppcompletion_test.cpp
	src/plugins/cpptools/cpptoolsplugin.h

Change-Id: I4e786745e8abab8d15b75fd962c21b4b28620d47
This commit is contained in:
Eike Ziller
2014-01-21 14:18:22 +01:00

View File

@@ -1342,10 +1342,14 @@ void CppCompletionAssistProcessor::globalCompletion(CPlusPlus::Scope *currentSco
ClassOrNamespace *currentBinding = 0;
for (Scope *scope = currentScope; scope; scope = scope->enclosingScope()) {
if (scope->isBlock()) {
if (Block *block = scope->asBlock()) {
if (ClassOrNamespace *binding = context.lookupType(scope)) {
for (unsigned i = 0; i < scope->memberCount(); ++i) {
Symbol *member = scope->memberAt(i);
if (member->isEnum()) {
if (ClassOrNamespace *b = binding->findBlock(block))
completeNamespace(b);
}
if (!member->name())
continue;
if (UsingNamespaceDirective *u = member->asUsingNamespaceDirective()) {