diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-09-16 19:37:58 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-09-16 19:37:58 -0300 |
commit | c0ed7e6f62a2e983f85bf5ef68184f9eec5ca3eb (patch) | |
tree | 21505be9e75642cc244fde1fc95ad39609778e96 /shibokengenerator.cpp | |
parent | e004df0d457f008d9f23c6b9708c5a37cc446f32 (diff) |
generated converters uses 'const' for all Object-Type parameters
Diffstat (limited to 'shibokengenerator.cpp')
-rw-r--r-- | shibokengenerator.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/shibokengenerator.cpp b/shibokengenerator.cpp index b53a9b97f..5fc41a7b2 100644 --- a/shibokengenerator.cpp +++ b/shibokengenerator.cpp @@ -240,6 +240,14 @@ QString ShibokenGenerator::writeBaseConversion(QTextStream& s, const AbstractMet } else { typeName = translateTypeForWrapperMethod(type, context); } + + + // If the type is an Object (and a pointer) remove its constness + // (len("const ") == 6) since it is already inserted for everyone + // in the generated converter declaration. + if ((type->isQObject() || type->isObject()) && typeName.startsWith("const ")) + typeName.remove(0, 6); + s << "Shiboken::Converter< " << typeName << " >::"; return typeName; } |