summaryrefslogtreecommitdiffstats
path: root/generator.cpp
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 /generator.cpp
parentfbd3347beb6f727da67fc8b3792f726e26c0f472 (diff)
downloadgeneratorrunner-7785318737ddabf759060277e069557367d5061a.tar.gz
generatorrunner-7785318737ddabf759060277e069557367d5061a.tar.xz
generatorrunner-7785318737ddabf759060277e069557367d5061a.zip
Obey ExcludeConst and ExcludeReference for primitive types on translateType function.
Diffstat (limited to 'generator.cpp')
-rw-r--r--generator.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/generator.cpp b/generator.cpp
index 3798eff..11b4a95 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();