Reimplemented Type::as*Type() using virtual methods.

This commit is contained in:
Roberto Raggi
2009-02-09 17:44:06 +01:00
parent ce22a96041
commit d01795d933
15 changed files with 175 additions and 181 deletions

View File

@@ -63,11 +63,13 @@ Icons::Icons()
QIcon Icons::iconForSymbol(const Symbol *symbol) const
{
if (symbol->isFunction() || (symbol->isDeclaration() && symbol->type()->isFunction()))
FullySpecifiedType symbolType = symbol->type();
if (symbol->isFunction() || (symbol->isDeclaration() && symbolType &&
symbolType->isFunctionType()))
{
const Function *function = symbol->asFunction();
if (!function)
function = symbol->type()->asFunction();
function = symbol->type()->asFunctionType();
if (function->isSlot()) {
if (function->isPublic()) {