Merge branch '1.3'

This commit is contained in:
Thorbjørn Lindeijer
2010-01-06 14:45:35 +01:00
4 changed files with 66 additions and 13 deletions

View File

@@ -361,8 +361,10 @@ QList<Scope *> LookupContext::visibleScopes(const LookupItem &result) const
QList<Scope *> LookupContext::visibleScopes(Symbol *symbol) const
{
QList<Scope *> scopes;
for (Scope *scope = symbol->scope(); scope; scope = scope->enclosingScope())
scopes.append(scope);
if (symbol) {
for (Scope *scope = symbol->scope(); scope; scope = scope->enclosingScope())
scopes.append(scope);
}
scopes += visibleScopes();
scopes = expand(scopes);
return scopes;