aboutsummaryrefslogtreecommitdiffstats
path: root/generator/shibokengenerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'generator/shibokengenerator.cpp')
-rw-r--r--generator/shibokengenerator.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/generator/shibokengenerator.cpp b/generator/shibokengenerator.cpp
index 2d317c650..0be94bc6f 100644
--- a/generator/shibokengenerator.cpp
+++ b/generator/shibokengenerator.cpp
@@ -547,7 +547,7 @@ void ShibokenGenerator::writeBaseConversion(QTextStream& s, const TypeEntry* typ
if (metaEnum && metaEnum->isProtected())
typeName = protectedEnumSurrogateName(metaEnum);
} else {
- typeName = type->qualifiedCppName().trimmed();
+ typeName = getFullTypeName(type).trimmed();
if (isObjectType(type))
typeName.append('*');
}
@@ -563,6 +563,8 @@ void ShibokenGenerator::writeBaseConversion(QTextStream& s, const AbstractMetaTy
if (ptype->basicAliasedTypeEntry())
ptype = ptype->basicAliasedTypeEntry();
typeName = ptype->name();
+ if (!ptype->isCppPrimitive())
+ typeName.prepend("::");
} else {
if (!isCString(type)) {
options |= Generator::ExcludeConst;
@@ -1018,6 +1020,19 @@ QString ShibokenGenerator::cpythonToPythonConversionFunction(const AbstractMetaT
return QString("%1toPython").arg(base);
}
+QString ShibokenGenerator::cpythonToPythonConversionFunction(const AbstractMetaClass* metaClass)
+{
+ return cpythonToPythonConversionFunction(metaClass->typeEntry());
+}
+
+QString ShibokenGenerator::cpythonToPythonConversionFunction(const TypeEntry* type)
+{
+ QString base;
+ QTextStream b(&base);
+ writeBaseConversion(b, type);
+ return QString("%1toPython").arg(base);
+}
+
QString ShibokenGenerator::argumentString(const AbstractMetaFunction *func,
const AbstractMetaArgument *argument,
Options options) const