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.
This commit is contained in:
parent
16f4378fed
commit
770c8bda73
1 changed files with 10 additions and 6 deletions
|
|
@ -98,12 +98,16 @@
|
||||||
</add-function>
|
</add-function>
|
||||||
<add-function signature="__next__()" return-type="PyObject*">
|
<add-function signature="__next__()" return-type="PyObject*">
|
||||||
<inject-code>
|
<inject-code>
|
||||||
if (%CPPSELF.hasNext()) {
|
if (%CPPSELF.hasNext()) {
|
||||||
%CPPSELF.next();
|
%CPPSELF.next();
|
||||||
%PYARG_0 = Shiboken::makeTuple(%CPPSELF.name(), %CPPSELF.value().toVariant());
|
QString name = %CPPSELF.name();
|
||||||
} else {
|
QVariant value = %CPPSELF.value().toVariant();
|
||||||
PyErr_SetNone(PyExc_StopIteration);
|
%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>
|
</inject-code>
|
||||||
</add-function>
|
</add-function>
|
||||||
</object-type>
|
</object-type>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue