aboutsummaryrefslogtreecommitdiffstats
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>2012-03-08 16:08:59 -0300
commit2927e38cb46d3aa2cf278238d2a585d96f669d91 (patch)
tree995d9feaabe6439d26f87753abd71608ab563d58 /generator/shibokengenerator.cpp
parentbe2c1160275e63c148297b0001e735e3969f0b7e (diff)
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 4990eb190..5ddbb6d7e 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);