summaryrefslogtreecommitdiff
path: root/tests/manual/cplusplus-dump
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@nokia.com>2010-03-23 11:59:32 +0100
committerErik Verbruggen <erik.verbruggen@nokia.com>2010-03-23 14:15:45 +0100
commitf45ff92c28817558509aaca6a5e2f56bcb14bbef (patch)
tree79c3b4dd8634432d6de2309c49631296e4b55a5d /tests/manual/cplusplus-dump
parent989681a0e927e10e01e08e2dd6e038a7bc62917d (diff)
downloadqt-creator-f45ff92c28817558509aaca6a5e2f56bcb14bbef.tar.gz
Added dumping of deprecated attribute on symbols.
Diffstat (limited to 'tests/manual/cplusplus-dump')
-rw-r--r--tests/manual/cplusplus-dump/main.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/manual/cplusplus-dump/main.cpp b/tests/manual/cplusplus-dump/main.cpp
index 7acfb78843..a87adfe364 100644
--- a/tests/manual/cplusplus-dump/main.cpp
+++ b/tests/manual/cplusplus-dump/main.cpp
@@ -205,13 +205,15 @@ public:
protected:
QByteArray name(Symbol *s) {
- QByteArray name = abi::__cxa_demangle(typeid(*s).name(), 0, 0, 0) + 11;
+ QByteArray result = abi::__cxa_demangle(typeid(*s).name(), 0, 0, 0) + 11;
if (s->identifier()) {
- name.append("\\nid: ");
- name.append(s->identifier()->chars());
+ result.append("\\nid: ");
+ result.append(s->identifier()->chars());
}
+ if (s->isDeprecated())
+ result.append("\\n(deprecated)");
- return name;
+ return result;
}
virtual bool preVisit(Symbol *s) {
@@ -272,6 +274,8 @@ protected:
} else {
out << "NO ID";
}
+ if (symbol->isDeprecated())
+ out << "\\n(deprecated)";
out << "\"];" << std::endl;
return true;
@@ -286,6 +290,8 @@ protected:
out << qPrintable(o(symbol->name()));
out << ": ";
out << qPrintable(o(symbol->type()));
+ if (symbol->isDeprecated())
+ out << "\\n(deprecated)";
out << "\"];" << std::endl;
return true;
@@ -297,6 +303,8 @@ protected:
virtual bool visit(BaseClass *symbol) {
out << _id[symbol].constData() << " [label=\"BaseClass\\n";
out << qPrintable(o(symbol->name()));
+ if (symbol->isDeprecated())
+ out << "\\n(deprecated)";
out << "\"];" << std::endl;
return true;