diff options
| author | Francois Ferrand <[email protected]> | 2012-06-15 12:04:21 +0200 |
|---|---|---|
| committer | Leandro Melo <[email protected]> | 2012-07-17 19:05:43 +0200 |
| commit | e203893fd1def7fc5927045fcf3fefd669197924 (patch) | |
| tree | 56a4db7618284ed4d5c86e2fdbc3271e8531b910 /src/libs/cplusplus/OverviewModel.cpp | |
| parent | b44e0e1a237c93d5a8d3e63896a1868cf4bc7356 (diff) | |
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 <[email protected]>
Diffstat (limited to 'src/libs/cplusplus/OverviewModel.cpp')
| -rw-r--r-- | src/libs/cplusplus/OverviewModel.cpp | 7 |
1 files 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; } |
