aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/QtGui
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-01-13 17:51:14 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:51:46 -0300
commitb57192c596230ef8fb6a9cb1fe51d3a72e719e4f (patch)
treebea1eb3f14e3b76101529cffc48683de9b352de9 /PySide/QtGui
parentd9940e55a41b83d30ce41e8002f614bfe16d54bf (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.xml6
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 &lt; %CPPSELF.count(); ++i){
+ PyObject* points = PyList_New(%CPPSELF.count());
+ for (int i = 0, max = %CPPSELF.count(); i &lt; max; ++i){
int x, y;
%CPPSELF.point(i, &amp;x, &amp;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>