diff options
author | Renato Filho <renato.filho@openbossa.org> | 2011-04-06 16:04:55 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:54:08 -0300 |
commit | ccf8ddf75b0e5342f8e927b20d3f355456e44099 (patch) | |
tree | ee8e7231c674859f9bc6a4fc53bfc417d06ece7b /PySide/typesystem_templates.xml | |
parent | e3b24c2204fedb0141ddd949e4f556d345780df1 (diff) |
Implemented support to pyton iterator in QTextFrame::iterator.
Fixes bug #688.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'PySide/typesystem_templates.xml')
-rw-r--r-- | PySide/typesystem_templates.xml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/PySide/typesystem_templates.xml b/PySide/typesystem_templates.xml index 24c531e96..81aa2eaca 100644 --- a/PySide/typesystem_templates.xml +++ b/PySide/typesystem_templates.xml @@ -320,5 +320,20 @@ %PYARG_0 = %PYARG_#; </template> + <!-- Iterator --> + <template name="__iter__"> + Py_INCREF(%PYSELF); + %PYARG_0 = %PYSELF; + </template> + + <template name="__iter_parent__"> + %PYARG_0 = %CONVERTTOPYTHON[%CPPSELF_TYPE](%CPPSELF.begin()); + </template> + + <template name="__next__"> + if (!%CPPSELF.atEnd()) + %PYARG_0 = %CONVERTTOPYTHON[%CPPSELF_TYPE]((*%CPPSELF)++); + </template> + </typesystem> |