C++: fix highlighting type when there is using Namespace::Class

If type is not found we try to find 'using' declaration for this type.

Task-number: QTCREATORBUG-7903

Change-Id: I569db9e1a8504a5da3115ebbed2e823d5924f6ca
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
Przemyslaw Gorszkowski
2013-04-25 18:46:34 +02:00
committed by Erik Verbruggen
parent e245f2d5f9
commit d14767a6af
8 changed files with 317 additions and 4 deletions

View File

@@ -210,7 +210,7 @@ bool FindUsages::checkCandidates(const QList<LookupItem> &candidates) const
if (s->enclosingScope()->isTemplate()) {
if (s->enclosingScope()->enclosingScope() != _declSymbol->enclosingScope())
return false;
} else if (s->enclosingScope() != _declSymbol->enclosingScope()) {
} else if (! s->isUsingDeclaration() && s->enclosingScope() != _declSymbol->enclosingScope()) {
return false;
}
}