From 7785318737ddabf759060277e069557367d5061a Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Thu, 28 Oct 2010 14:00:52 -0200 Subject: Obey ExcludeConst and ExcludeReference for primitive types on translateType function. --- generator.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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(); -- cgit v1.2.3