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
@@ -107,11 +107,13 @@ static FullySpecifiedType fnTy(const QString &name, const FullySpecifiedType &re
|
||||
return FullySpecifiedType(fn);
|
||||
}
|
||||
|
||||
static FullySpecifiedType templTy(const FullySpecifiedType &declTy, bool isClassDeclarator)
|
||||
static FullySpecifiedType templTy(FullySpecifiedType declTy, bool isClassDeclarator)
|
||||
{
|
||||
Template *templ = new Template(0, 0, nameId(""));
|
||||
templ->addMember(typenameArg("T", isClassDeclarator));
|
||||
templ->addMember(decl(declTy));
|
||||
if (Function *func = declTy->asFunctionType())
|
||||
func->setEnclosingScope(templ);
|
||||
return FullySpecifiedType(templ);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user