summaryrefslogtreecommitdiffstats
path: root/generator.cpp
diff options
context:
space:
mode:
authorrenatofilho <renato.filho@openbossa.org>2010-10-04 19:26:42 -0300
committerrenatofilho <renato.filho@openbossa.org>2010-10-05 10:20:19 -0300
commite0eb744489cfe4914bef235880f8219984d7d43d (patch)
treee3954450e52d2bcaa10dd2a9c522ddbf0ffcbd33 /generator.cpp
parent67da904f47c450ce5e5c5cd037680d002035549f (diff)
downloadgeneratorrunner-e0eb744489cfe4914bef235880f8219984d7d43d.tar.gz
generatorrunner-e0eb744489cfe4914bef235880f8219984d7d43d.tar.xz
generatorrunner-e0eb744489cfe4914bef235880f8219984d7d43d.zip
Implemented support to OriginalName flag on typeName function.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'generator.cpp')
-rw-r--r--generator.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/generator.cpp b/generator.cpp
index 0f56b45..e6fbfab 100644
--- a/generator.cpp
+++ b/generator.cpp
@@ -293,7 +293,10 @@ QString Generator::translateType(const AbstractMetaType *cType,
else
s = cType->cppSignature();
} else {
- s = cType->cppSignature();
+ if (options & Generator::OriginalName)
+ s = cType->originalTypeDescription();
+ else
+ s = cType->cppSignature();
if (cType->isConstant() && (options & Generator::ExcludeConst)) {
// Remove just the first ‘const’, avoiding removal of template attr.
int pos = s.indexOf("const");