Commit 077f5039 authored by Christian Kamm's avatar Christian Kamm

C++: Use minimal names in 'insert local declaration' quickfix.

Change-Id: Ia8362bc9a4b319ab4bb65f3fb1a36dc769e28ccd
Reviewed-on: http://codereview.qt.nokia.com/2953Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@nokia.com>
parent 676036a1
......@@ -1536,8 +1536,9 @@ private:
TypeOfExpression typeOfExpression;
typeOfExpression.init(assistInterface()->semanticInfo().doc,
assistInterface()->snapshot(), assistInterface()->context().bindings());
Scope *scope = currentFile->scopeAt(binaryAST->firstToken());
const QList<LookupItem> result = typeOfExpression(currentFile->textOf(binaryAST->right_expression),
currentFile->scopeAt(binaryAST->firstToken()),
scope,
TypeOfExpression::Preprocess);
if (! result.isEmpty()) {
......@@ -1545,7 +1546,10 @@ private:
SubstitutionEnvironment env;
env.setContext(assistInterface()->context());
env.switchScope(result.first().scope());
UseQualifiedNames q;
ClassOrNamespace *con = typeOfExpression.context().lookupType(scope);
if (!con)
con = typeOfExpression.context().globalNamespace();
UseMinimalNames q(con);
env.enter(&q);
Control *control = assistInterface()->context().control().data();
......
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