forked from qt-creator/qt-creator
Fix find-usages in template classes.
The problem was that the scope of the class declaration in a template-class declaration is the template, not the scope in which that template is defined. The scope-check was not taking this into account. Task-number: QTCREATORBUG-3183 Reviewed-by: Roberto Raggi
This commit is contained in:
@@ -229,8 +229,12 @@ bool FindUsages::checkCandidates(const QList<LookupItem> &candidates) const
|
||||
}
|
||||
|
||||
if (isLocalScope(_declSymbol->enclosingScope()) || isLocalScope(s->enclosingScope())) {
|
||||
if (s->enclosingScope() != _declSymbol->enclosingScope())
|
||||
if (s->enclosingScope()->isTemplate()) {
|
||||
if (s->enclosingScope()->enclosingScope() != _declSymbol->enclosingScope())
|
||||
return false;
|
||||
} else if (s->enclosingScope() != _declSymbol->enclosingScope()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (compareFullyQualifiedName(LookupContext::fullyQualifiedName(s), _declSymbolFullyQualifiedName))
|
||||
|
||||
Reference in New Issue
Block a user