aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/QtCore
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2010-02-18 14:30:23 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2010-02-18 14:30:23 -0300
commitd617892b59a3d9e90b178b87326bd06a00eeac17 (patch)
treeb7b0f29848607719ad8b7668fa6f2fcba2e87932 /PySide/QtCore
parentfa6756f52b368270b6e8e0ee4adb499a2afd5499 (diff)
Adds code to QAbstractTransition.setTargetStates regarding reference keeping.
The added custom code keeps alive the reference of the sequence passed to setTargetStates and decrefs any previous object passed via setTargetState or setTargetStates.
Diffstat (limited to 'PySide/QtCore')
-rw-r--r--PySide/QtCore/typesystem_core.xml9
1 files changed, 9 insertions, 0 deletions
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml
index 48f0b2d3f..f43fd945c 100644
--- a/PySide/QtCore/typesystem_core.xml
+++ b/PySide/QtCore/typesystem_core.xml
@@ -2805,6 +2805,15 @@
</modify-argument>
</modify-function>
+ <modify-function signature="setTargetStates(QList&lt;QAbstractState*&gt;)">
+ <inject-code class="target" position="beginning">
+ // The normal here would be to use the 'reference-count' tag but this
+ // method is strongly tied to 'setTargetState' since both affect the same
+ // internal value in QAbstractTransition.
+ Shiboken::SbkBaseWrapper_keepReference(reinterpret_cast&lt;SbkBaseWrapper*&gt;(%PYSELF), "setTargetState(QAbstractState*)1", %PYARG_1);
+ </inject-code>
+ </modify-function>
+
<!-- http://bugs.openbossa.org/show_bug.cgi?id=123
<modify-function signature="setTargetStates(QList&lt;QAbstractState*&gt;)" remove="all"/>
<modify-function signature="targetStates() const " remove="all"/>-->