summaryrefslogtreecommitdiff
path: root/shared/cplusplus/PrettyPrinter.cpp
diff options
context:
space:
mode:
authorRoberto Raggi <qtc-committer@nokia.com>2009-01-07 10:35:53 +0100
committerRoberto Raggi <qtc-committer@nokia.com>2009-01-07 10:35:53 +0100
commit0449c67f033c59c10fe86e0ca869a8e8b77f333c (patch)
tree4af41e56756540756198285dabdd850a0001b7aa /shared/cplusplus/PrettyPrinter.cpp
parent0030f87e9c8e2a2cf529ffebac94ebb2fc72bf44 (diff)
downloadqt-creator-0449c67f033c59c10fe86e0ca869a8e8b77f333c.tar.gz
Fixed the pretty printing of class specifiers and base clauses.
Diffstat (limited to 'shared/cplusplus/PrettyPrinter.cpp')
-rw-r--r--shared/cplusplus/PrettyPrinter.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/shared/cplusplus/PrettyPrinter.cpp b/shared/cplusplus/PrettyPrinter.cpp
index 4adc69e78c..891a63020c 100644
--- a/shared/cplusplus/PrettyPrinter.cpp
+++ b/shared/cplusplus/PrettyPrinter.cpp
@@ -145,12 +145,16 @@ bool PrettyPrinter::visit(AttributeAST *ast)
bool PrettyPrinter::visit(BaseSpecifierAST *ast)
{
if (ast->token_virtual && ast->token_access_specifier) {
- out << "virtual ";
+ out << "virtual";
+ out << ' ';
out << spell(ast->token_access_specifier);
+ out << ' ';
} else if (ast->token_virtual) {
out << "virtual";
+ out << ' ';
} else if (ast->token_access_specifier) {
out << spell(ast->token_access_specifier);
+ out << ' ';
}
accept(ast->name);
return false;
@@ -234,6 +238,7 @@ bool PrettyPrinter::visit(ClassSpecifierAST *ast)
out << ", ";
}
}
+ newline();
out << '{';
if (ast->member_specifiers) {
indent();