From b69fb3df3713413e3461420c337858f061ab9aaf 2010-03-11 12:55:47 From: florianlink Date: 2010-03-11 12:55:47 Subject: [PATCH] added error printing git-svn-id: svn://svn.code.sf.net/p/pythonqt/code/trunk@167 ea8d5007-eb21-0410-b261-ccb3ea6e24a9 --- diff --git a/src/PythonQtConversion.h b/src/PythonQtConversion.h index 1b17f00..c38cb35 100644 --- a/src/PythonQtConversion.h +++ b/src/PythonQtConversion.h @@ -167,6 +167,9 @@ PyObject* PythonQtConvertListOfValueTypeToPythonList(const void* /*QList* */ { ListType* list = (ListType*)inList; static const int innerType = PythonQtConv::getInnerTemplateMetaType(QByteArray(QMetaType::typeName(metaTypeId))); + if (innerType == QVariant::Invalid) { + std::cerr << "PythonQtConvertListOfValueTypeToPythonList: unknown inner type " << QMetaType::typeName(metaTypeId) << std::endl; + } PyObject* result = PyTuple_New(list->size()); int i = 0; foreach (const T& value, *list) { @@ -181,6 +184,9 @@ bool PythonQtConvertPythonListToListOfValueType(PyObject* obj, void* /*QList* { ListType* list = (ListType*)outList; static const int innerType = PythonQtConv::getInnerTemplateMetaType(QByteArray(QMetaType::typeName(metaTypeId))); + if (innerType == QVariant::Invalid) { + std::cerr << "PythonQtConvertPythonListToListOfValueType: unknown inner type " << QMetaType::typeName(metaTypeId) << std::endl; + } bool result = false; if (PySequence_Check(obj)) { result = true;