forked from qt-creator/qt-creator
Add function return type in outline.
Append the function return type in outline (after arguments), consistently with variable type indication. Change-Id: I1cc6d69634fc83227eb7fc9e3a0ee2ad6ca6ace8 Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
This commit is contained in:
committed by
Leandro Melo
parent
b44e0e1a23
commit
e203893fd1
@@ -181,11 +181,12 @@ QVariant OverviewModel::data(const QModelIndex &index, int role) const
|
||||
name = QLatin1Char('-') + name;
|
||||
} else if (! symbol->isScope() || symbol->isFunction()) {
|
||||
QString type = _overview.prettyType(symbol->type());
|
||||
if (! type.isEmpty()) {
|
||||
if (! symbol->type()->isFunctionType())
|
||||
name += QLatin1String(": ");
|
||||
if (Function *f = symbol->type()->asFunctionType()) {
|
||||
name += type;
|
||||
type = _overview.prettyType(f->returnType());
|
||||
}
|
||||
if (! type.isEmpty())
|
||||
name += QLatin1String(": ") + type;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user