Commit e11ee899 authored by Erik Verbruggen's avatar Erik Verbruggen Committed by Nikolai Kosjar

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: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
parent 327e7bdf
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment