CppEditor: Resolve templates in AssignToLocalVariable

Task-number: QTCREATORBUG-9525

Change-Id: Ibe6c054c289f564a073a455f9b200bfffe5868eb
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
Lorenz Haas
2013-06-12 17:40:11 +02:00
committed by Nikolai Kosjar
parent c56c63a832
commit e986646905
3 changed files with 41 additions and 0 deletions

View File

@@ -4081,6 +4081,7 @@ public:
TypeOfExpression typeOfExpression;
typeOfExpression.init(assistInterface()->semanticInfo().doc, snapshot(),
assistInterface()->context().bindings());
typeOfExpression.setExpandTemplates(true);
Scope *scope = file->scopeAt(m_ast->firstToken());
const QList<LookupItem> result = typeOfExpression(file->textOf(m_ast).toUtf8(),
scope, TypeOfExpression::Preprocess);
@@ -4220,6 +4221,7 @@ void AssignToLocalVariable::match(const CppQuickFixInterface &interface, QuickFi
TypeOfExpression typeOfExpression;
typeOfExpression.init(interface->semanticInfo().doc, interface->snapshot(),
interface->context().bindings());
typeOfExpression.setExpandTemplates(true);
// If items are empty, AssignToLocalVariableOperation will fail.
items = typeOfExpression(file->textOf(outerAST).toUtf8(),