summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-11-30 16:00:57 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2011-12-09 19:25:36 -0300
commit96622477caf8406e8b3b92bfe835a4371ba287b8 (patch)
tree7b95131672be4b7eac26265c53d13b29d6b9c1bc
parent0b3b94dbe3c9fdac00fedaa6acd39b3cf70615a6 (diff)
downloadpyside-96622477caf8406e8b3b92bfe835a4371ba287b8.tar.gz
pyside-96622477caf8406e8b3b92bfe835a4371ba287b8.tar.xz
pyside-96622477caf8406e8b3b92bfe835a4371ba287b8.zip
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.
-rw-r--r--PySide/QtScript/typesystem_script.xml16
1 files changed, 10 insertions, 6 deletions
diff --git a/PySide/QtScript/typesystem_script.xml b/PySide/QtScript/typesystem_script.xml
index af2f198..d787b22 100644
--- a/PySide/QtScript/typesystem_script.xml
+++ b/PySide/QtScript/typesystem_script.xml
@@ -98,12 +98,16 @@
</add-function>
<add-function signature="__next__()" return-type="PyObject*">
<inject-code>
- 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);
+ }
</inject-code>
</add-function>
</object-type>