From e203893fd1def7fc5927045fcf3fefd669197924 Mon Sep 17 00:00:00 2001 From: Francois Ferrand Date: Fri, 15 Jun 2012 12:04:21 +0200 Subject: [PATCH] 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 --- src/libs/cplusplus/OverviewModel.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libs/cplusplus/OverviewModel.cpp b/src/libs/cplusplus/OverviewModel.cpp index 2a2ba9560b8..dec167dd38d 100644 --- a/src/libs/cplusplus/OverviewModel.cpp +++ b/src/libs/cplusplus/OverviewModel.cpp @@ -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; }