forked from qt-creator/qt-creator
C++: Fix completion for typedefs for templates in namespaces.
Change-Id: Ib96551388c94731d97eb8f9728613b120b0b86a9 Reviewed-on: http://codereview.qt.nokia.com/3262 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
@@ -712,10 +712,20 @@ ClassOrNamespace *ResolveExpression::baseExpression(const QList<LookupItem> &bas
|
||||
if (ClassOrNamespace *retBinding = findClass(ptrTy->elementType(), overload->enclosingScope()))
|
||||
return retBinding;
|
||||
|
||||
else if (scope != overload->enclosingScope()) {
|
||||
if (scope != overload->enclosingScope()) {
|
||||
if (ClassOrNamespace *retBinding = findClass(ptrTy->elementType(), scope))
|
||||
return retBinding;
|
||||
}
|
||||
|
||||
if (ClassOrNamespace *origin = binding->instantiationOrigin()) {
|
||||
foreach (Symbol *originSymbol, origin->symbols()) {
|
||||
Scope *originScope = originSymbol->asScope();
|
||||
if (originScope && originScope != scope && originScope != overload->enclosingScope()) {
|
||||
if (ClassOrNamespace *retBinding = findClass(ptrTy->elementType(), originScope))
|
||||
return retBinding;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user