forked from qt-creator/qt-creator
		
	C++: show signal declarations when searching for functions
Instead of showing all function declarations when searching for methods, only show signal declarations. Otherwise, both function declarations and their definitions would show up, which is not too useful. Task-number: QTCREATORBUG-9543 Change-Id: Ia81e422e4c53dbc4199b30b1d362f4829b337a7f Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
		
				
					committed by
					
						
						Nikolai Kosjar
					
				
			
			
				
	
			
			
			
						parent
						
							327e7bdf6f
						
					
				
				
					commit
					e11ee89916
				
			@@ -139,9 +139,12 @@ bool SearchSymbols::visit(Namespace *symbol)
 | 
			
		||||
bool SearchSymbols::visit(Declaration *symbol)
 | 
			
		||||
{
 | 
			
		||||
    if (!(symbolsToSearchFor & SymbolSearcher::Declarations)) {
 | 
			
		||||
        // if we're searching for functions, still allow function declarations to show up.
 | 
			
		||||
        // if we're searching for functions, still allow signal declarations to show up.
 | 
			
		||||
        if (symbolsToSearchFor & SymbolSearcher::Functions) {
 | 
			
		||||
            if (!symbol->type()->asFunctionType())
 | 
			
		||||
            Function *funTy = symbol->type()->asFunctionType();
 | 
			
		||||
            if (!funTy)
 | 
			
		||||
                return false;
 | 
			
		||||
            if (!funTy->isSignal())
 | 
			
		||||
                return false;
 | 
			
		||||
        } else {
 | 
			
		||||
            return false;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user