summaryrefslogtreecommitdiffstats
path: root/generator/shibokengenerator.cpp
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-11-19 17:56:10 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2010-11-23 13:37:10 -0200
commitea46607ca87ce2233529c8177ab51424337613d2 (patch)
treec26635ef06122ccc296a32fa3d9057636b65413c /generator/shibokengenerator.cpp
parent36b1807b8c5fe75faf87a593ac0e1d7e9ac8b887 (diff)
downloadshiboken-ea46607ca87ce2233529c8177ab51424337613d2.tar.gz
shiboken-ea46607ca87ce2233529c8177ab51424337613d2.tar.xz
shiboken-ea46607ca87ce2233529c8177ab51424337613d2.zip
namespace Shiboken::BaseType renamed to Shiboken::ObjectType.
Diffstat (limited to 'generator/shibokengenerator.cpp')
-rw-r--r--generator/shibokengenerator.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/generator/shibokengenerator.cpp b/generator/shibokengenerator.cpp
index 4990eb19..5ddbb6d7 100644
--- a/generator/shibokengenerator.cpp
+++ b/generator/shibokengenerator.cpp
@@ -471,12 +471,14 @@ QString ShibokenGenerator::getFunctionReturnType(const AbstractMetaFunction* fun
static QString baseConversionString(QString typeName)
{
- return QString("Shiboken::Converter<%1 >::").arg(typeName);
+ return QString("Shiboken::Converter< %1 >::").arg(typeName);
}
void ShibokenGenerator::writeBaseConversion(QTextStream& s, const TypeEntry* type)
{
- QString typeName = type->name();
+ QString typeName = type->qualifiedCppName();
+ if (!type->isCppPrimitive())
+ typeName.prepend("::");
if (type->isObject())
typeName.append('*');
#ifdef AVOID_PROTECTED_HACK
@@ -501,9 +503,11 @@ void ShibokenGenerator::writeBaseConversion(QTextStream& s, const AbstractMetaTy
} else {
if (type->isObject() || (type->isValue() && !type->isReference()))
options |= Generator::ExcludeConst;
- if (type->isContainer() )
+ if (type->isContainer() || (type->isConstant() && type->isReference()))
options |= Generator::ExcludeReference | Generator::ExcludeConst;
typeName = translateTypeForWrapperMethod(type, context, options);
+ if (!type->typeEntry()->isCppPrimitive())
+ typeName.prepend("::");
}
s << baseConversionString(typeName);