diff options
author | hjk <qthjk@ovi.com> | 2012-10-10 22:09:44 +0200 |
---|---|---|
committer | hjk <qthjk@ovi.com> | 2012-10-11 23:16:51 +0200 |
commit | 6dfe3207d26ece972a43fedaf439a17e34b92dcb (patch) | |
tree | e904f376541d72e29bad1959cb7d85e0268de566 /src/libs/cplusplus/TypePrettyPrinter.cpp | |
parent | 52e381b8e84b81b022ecaf79eae8f0c0346efde5 (diff) |
Cpp: No need for accessors for simple structs
Change-Id: Ie09c1fc59dd54d2302a78cfc9769d5cda6012be7
Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/libs/cplusplus/TypePrettyPrinter.cpp')
-rw-r--r-- | src/libs/cplusplus/TypePrettyPrinter.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/libs/cplusplus/TypePrettyPrinter.cpp b/src/libs/cplusplus/TypePrettyPrinter.cpp index 7031c7c777..dc3e0108f9 100644 --- a/src/libs/cplusplus/TypePrettyPrinter.cpp +++ b/src/libs/cplusplus/TypePrettyPrinter.cpp @@ -143,7 +143,7 @@ void TypePrettyPrinter::visit(Namespace *type) void TypePrettyPrinter::visit(Template *type) { if (Symbol *d = type->declaration()) { - if (overview()->showTemplateParameters() && ! _name.isEmpty()) { + if (overview()->showTemplateParameters && ! _name.isEmpty()) { _name += QLatin1Char('<'); for (unsigned index = 0; index < type->templateParameterCount(); ++index) { if (index) @@ -309,13 +309,13 @@ void TypePrettyPrinter::visit(Function *type) } _text.append(QLatin1Char(')')); _needsParens = false; - } else if (! _name.isEmpty() && _overview->showFunctionSignatures()) { + } else if (! _name.isEmpty() && _overview->showFunctionSignatures) { appendSpace(); _text.append(_name); _name.clear(); } - if (_overview->showReturnTypes()) { + if (_overview->showReturnTypes) { const QString returnType = _overview->prettyType(type->returnType()); if (!returnType.isEmpty()) { if (!endsWithPtrOrRef(returnType)) @@ -324,11 +324,11 @@ void TypePrettyPrinter::visit(Function *type) } } - if (_overview->showFunctionSignatures()) { + if (_overview->showFunctionSignatures) { Overview argumentText; - argumentText.setShowReturnTypes(true); - argumentText.setShowArgumentNames(false); - argumentText.setShowFunctionSignatures(true); + argumentText.showReturnTypes = true; + argumentText.showArgumentNames = false; + argumentText.showFunctionSignatures = true; _text += QLatin1Char('('); @@ -337,25 +337,25 @@ void TypePrettyPrinter::visit(Function *type) _text += QLatin1String(", "); if (Argument *arg = type->argumentAt(index)->asArgument()) { - if (index + 1 == _overview->markedArgument()) - const_cast<Overview*>(_overview)->setMarkedArgumentBegin(_text.length()); + if (index + 1 == _overview->markedArgument) + const_cast<Overview*>(_overview)->markedArgumentBegin = _text.length(); const Name *name = 0; - if (_overview->showArgumentNames()) + if (_overview->showArgumentNames) name = arg->name(); _text += argumentText(arg->type(), name); - if (_overview->showDefaultArguments()) { + if (_overview->showDefaultArguments) { if (const StringLiteral *initializer = arg->initializer()) { _text += QLatin1String(" ="); _text += QString::fromUtf8(initializer->chars(), initializer->size()); } } - if (index + 1 == _overview->markedArgument()) - const_cast<Overview*>(_overview)->setMarkedArgumentEnd(_text.length()); + if (index + 1 == _overview->markedArgument) + const_cast<Overview*>(_overview)->markedArgumentEnd = _text.length(); } } |