Skip to content

Commit f59400f

Browse files
committed
support meta type based converters for pointer return values as well (e.g. QList<QInputEventMethod::Attribute>*), since wrapper generates * from const& return values
1 parent 93fbad4 commit f59400f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/PythonQtConversion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ PyObject* PythonQtConv::ConvertQtValueToPython(const PythonQtMethodInfo::Paramet
105105
// if a converter is registered, we use is:
106106
PythonQtConvertMetaTypeToPythonCB* converter = _metaTypeToPythonConverters.value(info.typeId);
107107
if (converter) {
108-
return (*converter)(data, info.typeId);
108+
return (*converter)(info.pointerCount==0?data:*((void**)data), info.typeId);
109109
}
110110
}
111111

src/PythonQtMethodInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ void PythonQtMethodInfo::fillParameterInfo(ParameterInfo& type, const QByteArray
152152
}
153153

154154
type.typeId = nameToType(name);
155-
if ((type.pointerCount == 0) && type.typeId == Unknown) {
155+
if (type.typeId == Unknown) {
156156
type.typeId = QMetaType::type(name.constData());
157157
#if( QT_VERSION >= QT_VERSION_CHECK(5,0,0) )
158158
if (type.typeId == QMetaType::UnknownType) {

0 commit comments

Comments
 (0)