Introduced support for forward class declarations.

This commit is contained in:
Roberto Raggi
2009-02-16 15:43:24 +01:00
parent 2788d77229
commit ba78e075da
13 changed files with 142 additions and 4 deletions

View File

@@ -156,6 +156,9 @@ static QString buildHelpId(const FullySpecifiedType &type,
} else if (const Enum *e = type->asEnumType()) {
name = e->name();
scope = e->scope();
} else if (const ForwardClassDeclaration *fwd = type->asForwardClassDeclarationType()) {
name = fwd->name();
scope = fwd->scope();
} else if (const NamedType *t = type->asNamedType()) {
name = t->name();
} else if (symbol && symbol->isDeclaration()) {
@@ -178,14 +181,19 @@ static QString buildHelpId(const FullySpecifiedType &type,
qualifiedNames.prepend(overview.prettyName(name));
for (; scope; scope = scope->enclosingScope()) {
if (scope->owner() && scope->owner()->name() && !scope->isEnumScope()) {
Name *name = scope->owner()->name();
Symbol *owner = scope->owner();
if (owner && owner->name() && ! scope->isEnumScope()) {
Name *name = owner->name();
Identifier *id = 0;
if (NameId *nameId = name->asNameId()) {
id = nameId->identifier();
} else if (TemplateNameId *nameId = name->asTemplateNameId()) {
id = nameId->identifier();
}
if (id)
qualifiedNames.prepend(QString::fromLatin1(id->chars(), id->size()));
}