forked from qt-creator/qt-creator
		
	CppTools: Fix completion for nested enums
Task-number: QTCREATORBUG-5456 Change-Id: I0bb4756e3cdf3c87a4c2b0fbfe6953faaa5e1c52 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
		
				
					committed by
					
						 Orgad Shaneh
						Orgad Shaneh
					
				
			
			
				
	
			
			
			
						parent
						
							1ce5b1273a
						
					
				
				
					commit
					80a3caa396
				
			| @@ -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()) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user