summaryrefslogtreecommitdiffstats
path: root/PySide
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2010-09-16 11:36:32 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2010-09-16 14:22:02 -0300
commitc06110168c39e5c44b9b11ff13fd6f9795199df3 (patch)
tree7007d43542c38c44f9ae709e2c087a7e7b590886 /PySide
parentf92262928a6ac0463d4fb3fe52e8650fd484fbdc (diff)
downloadpyside-c06110168c39e5c44b9b11ff13fd6f9795199df3.tar.gz
pyside-c06110168c39e5c44b9b11ff13fd6f9795199df3.tar.xz
pyside-c06110168c39e5c44b9b11ff13fd6f9795199df3.zip
Fixes bug #348 adding the method QState.addTransition(Signal, QAbstractTransition*).
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org> Reviewed by Renato Ara├║jo <renato.filho@openbossa.org>
Diffstat (limited to 'PySide')
-rw-r--r--PySide/QtCore/typesystem_core.xml20
1 files changed, 20 insertions, 0 deletions
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml
index 073da00..4d7e3e4 100644
--- a/PySide/QtCore/typesystem_core.xml
+++ b/PySide/QtCore/typesystem_core.xml
@@ -2380,6 +2380,26 @@
</modify-argument>
</modify-function>
+ <!-- FIXME: the proper signature for this added function would be something like
+ addTransition(PySide.QtCore.Signal, QAbstractState*)
+ but that depends on bug #362. -->
+ <add-function signature="addTransition(PyObject*, QAbstractState*)" return-type="QSignalTransition*">
+ <modify-argument index="return">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ // Obviously the label used by the following goto is a very awkward solution,
+ // since it refers to a name very tied to the generator implementation.
+ // Check bug #362 for more information on this
+ // http://bugs.openbossa.org/show_bug.cgi?id=362
+ if (!PyObject_TypeCheck(%1, &amp;PySide::SignalInstance_Type))
+ goto Sbk%TYPEFunc_%FUNCTION_NAME_TypeError;
+ PySide::SignalInstanceData* signalInstance = reinterpret_cast&lt;PySide::SignalInstanceData*&gt;(%1);
+ QObject* sender = %CONVERTTOCPP[QObject*](signalInstance->source);
+ %PYARG_0 = %CONVERTTOPYTHON[QSignalTransition*](%CPPSELF->%FUNCTION_NAME(sender, signalInstance->signature, %2));
+ </inject-code>
+ </add-function>
+
<modify-function signature="removeTransition(QAbstractTransition*)">
<modify-argument index="1">
<parent index="this" action="remove"/>