C++: fix StarBindFlags behavior

Without Overview::BindToIdentifier, a space between
return type(endsWithPtrOrRef) and identifier should be added.

Change-Id: I3cd2d053bf137b35a58e7422f45cbd5b96eeb151
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Xiaofeng Wang
2018-12-19 20:10:27 +08:00
parent 8b5b12c381
commit 4dd4d088c5
2 changed files with 9 additions and 5 deletions

View File

@@ -401,7 +401,7 @@ void TypePrettyPrinter::visit(Function *type)
if (_overview->showReturnTypes) {
const QString returnType = _overview->prettyType(type->returnType());
if (!returnType.isEmpty()) {
if (!endsWithPtrOrRef(returnType))
if (!endsWithPtrOrRef(returnType) || !(_overview->starBindFlags & Overview::BindToIdentifier))
_text.prepend(QLatin1Char(' '));
_text.prepend(returnType);
}