CppTools: added template function params to completions

Change-Id: I67e9685406a0bf9a7cc358ce24f0e862d7938be6
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
Sergey Shambir
2013-04-04 11:27:06 +04:00
committed by Erik Verbruggen
parent adda69278f
commit a2730a4570
4 changed files with 67 additions and 2 deletions

View File

@@ -1354,8 +1354,11 @@ void CppCompletionAssistProcessor::globalCompletion(CPlusPlus::Scope *currentSco
for (unsigned i = 0, argc = fun->argumentCount(); i < argc; ++i) {
addCompletionItem(fun->argumentAt(i), FunctionArgumentsOrder);
}
break;
} else {
} else if (scope->isTemplate()) {
Template *templ = scope->asTemplate();
for (unsigned i = 0, argc = templ->templateParameterCount(); i < argc; ++i) {
addCompletionItem(templ->templateParameterAt(i), FunctionArgumentsOrder);
}
break;
}
}