aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/cplusplus/TypePrettyPrinter.cpp
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2010-08-11 14:24:28 +0200
committerRoberto Raggi <roberto.raggi@nokia.com>2010-08-11 15:25:19 +0200
commit41b4af05010ef9ae564fcff00b904f22c5f617e0 (patch)
tree915171245238821c9b3559ae269d3d8e4b4081e1 /src/libs/cplusplus/TypePrettyPrinter.cpp
parentf74ba9daef50a0b267056c8753819d59621fc000 (diff)
Get rid of the prefix findOrInsert for the functions in CPlusPlus::Control.
Diffstat (limited to 'src/libs/cplusplus/TypePrettyPrinter.cpp')
-rw-r--r--src/libs/cplusplus/TypePrettyPrinter.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/libs/cplusplus/TypePrettyPrinter.cpp b/src/libs/cplusplus/TypePrettyPrinter.cpp
index 61e18f5e7e..30b9e040cb 100644
--- a/src/libs/cplusplus/TypePrettyPrinter.cpp
+++ b/src/libs/cplusplus/TypePrettyPrinter.cpp
@@ -140,6 +140,28 @@ void TypePrettyPrinter::visit(Namespace *type)
prependCv(_fullySpecifiedType);
}
+void TypePrettyPrinter::visit(Template *type)
+{
+ const unsigned argc = type->templateParameterCount();
+ QString decl;
+ decl += QLatin1String("template <");
+ for (unsigned i = 0; i < argc; ++i) {
+ if (i != 0)
+ decl += QLatin1String(", ");
+
+ decl += QLatin1String("T");
+ decl += QString::number(i + 1);
+ }
+ decl += QLatin1Char('<');
+ if (Symbol *d = type->declaration()) {
+ decl += QLatin1Char(' ');
+ decl += overview()->prettyType(d->type(), d->name());
+ }
+ _text.prepend(decl);
+ qWarning() << "here:" << decl;
+ prependCv(_fullySpecifiedType);
+}
+
void TypePrettyPrinter::visit(Class *classTy)
{
_text.prepend(overview()->prettyName(classTy->name()));