forked from qt-creator/qt-creator
		
	C++: Fix findMatchingDeclaration for functions not in a class.
That fixes navigation and the 'function signature update' quickfix for global functions and functions in namespaces. Task-number: QTCREATORBUG-6413 Change-Id: Ifc68a88a34eb363f4e84c72e9f72444d22df1086 Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
This commit is contained in:
		@@ -918,11 +918,11 @@ void CPlusPlus::findMatchingDeclaration(const LookupContext &context,
 | 
			
		||||
        return;
 | 
			
		||||
 | 
			
		||||
    foreach (Symbol *s, binding->symbols()) {
 | 
			
		||||
        Class *matchingClass = s->asClass();
 | 
			
		||||
        if (!matchingClass)
 | 
			
		||||
        Scope *scope = s->asScope();
 | 
			
		||||
        if (!scope)
 | 
			
		||||
            continue;
 | 
			
		||||
 | 
			
		||||
        for (Symbol *s = matchingClass->find(funcId); s; s = s->next()) {
 | 
			
		||||
        for (Symbol *s = scope->find(funcId); s; s = s->next()) {
 | 
			
		||||
            if (! s->name())
 | 
			
		||||
                continue;
 | 
			
		||||
            else if (! funcId->isEqualTo(s->identifier()))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user