diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2010-08-11 14:24:28 +0200 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2010-08-11 15:25:19 +0200 |
commit | 41b4af05010ef9ae564fcff00b904f22c5f617e0 (patch) | |
tree | 915171245238821c9b3559ae269d3d8e4b4081e1 /src/libs/cplusplus/TypePrettyPrinter.cpp | |
parent | f74ba9daef50a0b267056c8753819d59621fc000 (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.cpp | 22 |
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())); |