diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-01-13 17:51:14 -0200 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:51:46 -0300 |
commit | b57192c596230ef8fb6a9cb1fe51d3a72e719e4f (patch) | |
tree | bea1eb3f14e3b76101529cffc48683de9b352de9 /PySide/QtGui | |
parent | d9940e55a41b83d30ce41e8002f614bfe16d54bf (diff) |
Fix bug#584 - "python pickle module can't treat QByteArray object of PySide"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Lauro Moura <lauro.neto@openbossa.org>
Diffstat (limited to 'PySide/QtGui')
-rw-r--r-- | PySide/QtGui/typesystem_gui_common.xml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml index e6dabc409..50247c3de 100644 --- a/PySide/QtGui/typesystem_gui_common.xml +++ b/PySide/QtGui/typesystem_gui_common.xml @@ -499,14 +499,14 @@ </extra-includes> <add-function signature="__reduce__" return-type="PyObject*"> <inject-code class="target" position="beginning"> - PyObject *points = PyList_New(%CPPSELF.count()); - for (int i = 0; i < %CPPSELF.count(); ++i){ + PyObject* points = PyList_New(%CPPSELF.count()); + for (int i = 0, max = %CPPSELF.count(); i < max; ++i){ int x, y; %CPPSELF.point(i, &x, &y); PyList_SET_ITEM(points, i, %CONVERTTOPYTHON[QPoint](QPoint(x, y))); } <insert-template name="reduce_code"> - <replace from="%REDUCE_FORMAT" to="(N)" /> + <replace from="%REDUCE_FORMAT" to="N" /> <replace from="%REDUCE_ARGS" to="points" /> </insert-template> </inject-code> |