diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-10-28 14:00:52 -0200 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-10-28 14:41:44 -0200 |
commit | 7785318737ddabf759060277e069557367d5061a (patch) | |
tree | 7f26587a24cc23df8ff04f996733801909d0e716 /generator.cpp | |
parent | fbd3347beb6f727da67fc8b3792f726e26c0f472 (diff) |
Obey ExcludeConst and ExcludeReference for primitive types on translateType function.
Diffstat (limited to 'generator.cpp')
-rw-r--r-- | generator.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/generator.cpp b/generator.cpp index 3798eff51..11b4a9586 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(); |