summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-10-28 14:00:52 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2010-10-28 14:41:44 -0200
commit7785318737ddabf759060277e069557367d5061a (patch)
tree7f26587a24cc23df8ff04f996733801909d0e716
parentfbd3347beb6f727da67fc8b3792f726e26c0f472 (diff)
Obey ExcludeConst and ExcludeReference for primitive types on translateType function.
-rw-r--r--generator.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/generator.cpp b/generator.cpp
index 3798eff5..11b4a958 100644
--- a/generator.cpp
+++ b/generator.cpp
@@ -293,6 +293,12 @@ QString Generator::translateType(const AbstractMetaType *cType,
s = "int";
else
s = cType->cppSignature();
+ } else if (cType->typeEntry()->isPrimitive()) {
+ s = cType->cppSignature();
+ if ((options & Generator::ExcludeConst) && cType->isConstant())
+ s.remove(0, 5);
+ if ((options & Generator::ExcludeReference) && cType->isReference())
+ s.chop(1);
} else {
if (options & Generator::OriginalName) {
s = cType->originalTypeDescription().trimmed();