aboutsummaryrefslogtreecommitdiffstats
path: root/generator/cppgenerator.cpp
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-10-29 17:05:46 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:08:55 -0300
commit7e51b29827d887e8156e0cd48d864ffe356412cc (patch)
treecc5485d985622eff3377bfa8221b57789f3798aa /generator/cppgenerator.cpp
parent78d5b68b37b206c81932f188e106b7f239b25cab (diff)
Don't use ref. on primitive types when using Converter<T>::toPython.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Renato Araújo <renato.filho@openbossa.org>
Diffstat (limited to 'generator/cppgenerator.cpp')
-rw-r--r--generator/cppgenerator.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp
index d01beca9b..1ea5b15d6 100644
--- a/generator/cppgenerator.cpp
+++ b/generator/cppgenerator.cpp
@@ -1477,15 +1477,7 @@ void CppGenerator::writeArgumentConversion(QTextStream& s,
bool isWrappedCppClass = type->isValue() || type->isObject();
// exclude const on Objects
- Options flags;
- bool isCStr = isCString(argType);
- if (argType->indirections() && !isCStr)
- flags = ExcludeConst;
- else if (type->isPrimitive() && !isCStr)
- flags = ExcludeConst | ExcludeReference;
- else if (type->isValue() && argType->isConstant() && argType->isReference())
- flags = ExcludeConst | ExcludeReference; // const refs become just the value, but pure refs must remain pure.
-
+ Options flags = getConverterOptions(argType);
typeName = translateTypeForWrapperMethod(argType, context, flags).trimmed();
if (isWrappedCppClass)