forked from qt-creator/qt-creator
C++: Enable showEnclosingTemplate also for function type
Do not require directly passing the enclosing template. Change-Id: Ie03bc58338fe003677a5f5311d86d70f499373ee Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
50a6c47830
commit
39aff55d8a
@@ -2510,13 +2510,8 @@ QString InsertDeclOperation::generateDeclaration(const Function *function)
|
||||
oo.showArgumentNames = true;
|
||||
oo.showEnclosingTemplate = true;
|
||||
|
||||
const Symbol *symbol = function;
|
||||
if (const Scope *enclosingScope = function->enclosingScope()) {
|
||||
if (const Template *templ = enclosingScope->asTemplate())
|
||||
symbol = templ;
|
||||
}
|
||||
QString decl;
|
||||
decl += oo.prettyType(symbol->type(), function->unqualifiedName());
|
||||
decl += oo.prettyType(function->type(), function->unqualifiedName());
|
||||
decl += QLatin1String(";\n");
|
||||
|
||||
return decl;
|
||||
|
||||
Reference in New Issue
Block a user