diff options
author | Renato Filho <renato.filho@openbossa.org> | 2011-04-26 15:06:40 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:54:15 -0300 |
commit | 4bfd1759d48c828e3d21d1e7a9636a6ad87f4c92 (patch) | |
tree | b71651547a69322f9b3c1ce4984cd47166c415c2 | |
parent | 50e6f9690b338a9990eff566c4e49f156e275294 (diff) |
Implemented support to iterator on QTreeWidgetItemIterator.
Fixes bug #778.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Lauro Moura <lauro.neto@openbossa.org>
-rw-r--r-- | PySide/QtGui/typesystem_gui_common.xml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml index fa484bc13..50da93374 100644 --- a/PySide/QtGui/typesystem_gui_common.xml +++ b/PySide/QtGui/typesystem_gui_common.xml @@ -692,6 +692,19 @@ <parent index="1" action="add" /> </modify-argument> </modify-function> + + <add-function signature="__iter__()" return-type="PyObject*"> + <inject-code class="target" position="beginning"> + <insert-template name="__iter__" /> + </inject-code> + </add-function> + <add-function signature="__next__()" return-type="PyObject*"> + <inject-code class="target" position="beginning"> + if (**%CPPSELF) + %PYARG_0 = %CONVERTTOPYTHON[QTreeWidgetItemIterator*](new QTreeWidgetItemIterator((*%CPPSELF)++)); + </inject-code> + </add-function> + <add-function signature="value()" return-type="QTreeWidgetItem*"> <inject-code> %PYARG_0 = %CONVERTTOPYTHON[QTreeWidgetItem*](%CPPSELF.operator*()); |