From 770c8bda73f045ee2bd6261c0eca0c64cd12d2db Mon Sep 17 00:00:00 2001 From: Marcelo Lira Date: Wed, 30 Nov 2011 16:00:57 -0300 Subject: Fixed custom code for QScriptValueIterator.__next__ function. It must not use the convenience method Shiboken::makeTuple, for it makes use of the old template based converters. --- PySide/QtScript/typesystem_script.xml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'PySide') diff --git a/PySide/QtScript/typesystem_script.xml b/PySide/QtScript/typesystem_script.xml index af2f198c5..d787b22ab 100644 --- a/PySide/QtScript/typesystem_script.xml +++ b/PySide/QtScript/typesystem_script.xml @@ -98,12 +98,16 @@ - if (%CPPSELF.hasNext()) { - %CPPSELF.next(); - %PYARG_0 = Shiboken::makeTuple(%CPPSELF.name(), %CPPSELF.value().toVariant()); - } else { - PyErr_SetNone(PyExc_StopIteration); - } + if (%CPPSELF.hasNext()) { + %CPPSELF.next(); + QString name = %CPPSELF.name(); + QVariant value = %CPPSELF.value().toVariant(); + %PYARG_0 = PyTuple_New(2); + PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[QString](name)); + PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QVariant](value)); + } else { + PyErr_SetNone(PyExc_StopIteration); + } -- cgit v1.2.3