##// END OF EJS Templates
added error printing...
florianlink -
r130:b69fb3df3713
parent child
Show More
@@ -167,6 +167,9 PyObject* PythonQtConvertListOfValueTypeToPythonList(const void* /*QList<T>* */
167 {
167 {
168 ListType* list = (ListType*)inList;
168 ListType* list = (ListType*)inList;
169 static const int innerType = PythonQtConv::getInnerTemplateMetaType(QByteArray(QMetaType::typeName(metaTypeId)));
169 static const int innerType = PythonQtConv::getInnerTemplateMetaType(QByteArray(QMetaType::typeName(metaTypeId)));
170 if (innerType == QVariant::Invalid) {
171 std::cerr << "PythonQtConvertListOfValueTypeToPythonList: unknown inner type " << QMetaType::typeName(metaTypeId) << std::endl;
172 }
170 PyObject* result = PyTuple_New(list->size());
173 PyObject* result = PyTuple_New(list->size());
171 int i = 0;
174 int i = 0;
172 foreach (const T& value, *list) {
175 foreach (const T& value, *list) {
@@ -181,6 +184,9 bool PythonQtConvertPythonListToListOfValueType(PyObject* obj, void* /*QList<T>*
181 {
184 {
182 ListType* list = (ListType*)outList;
185 ListType* list = (ListType*)outList;
183 static const int innerType = PythonQtConv::getInnerTemplateMetaType(QByteArray(QMetaType::typeName(metaTypeId)));
186 static const int innerType = PythonQtConv::getInnerTemplateMetaType(QByteArray(QMetaType::typeName(metaTypeId)));
187 if (innerType == QVariant::Invalid) {
188 std::cerr << "PythonQtConvertPythonListToListOfValueType: unknown inner type " << QMetaType::typeName(metaTypeId) << std::endl;
189 }
184 bool result = false;
190 bool result = false;
185 if (PySequence_Check(obj)) {
191 if (PySequence_Check(obj)) {
186 result = true;
192 result = true;
General Comments 0
You need to be logged in to leave comments. Login now