summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2011-05-31 15:45:28 -0300
committerRenato Filho <renato.filho@openbossa.org>2011-06-01 14:04:31 -0300
commit9408505a24d26725e518dd0852d8a1fb1640de6b (patch)
tree322b6c0eb04edd3e3c6ffb72612a94c43cc9ce81
parent2e985afb3aee480e4b7e1626b34bd998027807b8 (diff)
downloadpyside-9408505a24d26725e518dd0852d8a1fb1640de6b.tar.gz
pyside-9408505a24d26725e518dd0852d8a1fb1640de6b.tar.xz
pyside-9408505a24d26725e518dd0852d8a1fb1640de6b.zip
Fixed problems with eventFilter function destruction order.
The object passed to eventFilter function will keep a reference to the listener object, this will ensure the destruction order. Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
-rw-r--r--PySide/QtCore/typesystem_core.xml10
1 files changed, 10 insertions, 0 deletions
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml
index ec215ec..285e6e6 100644
--- a/PySide/QtCore/typesystem_core.xml
+++ b/PySide/QtCore/typesystem_core.xml
@@ -1294,6 +1294,16 @@
<define-ownership owner="c++"/>
</modify-argument>
</modify-function>
+ <modify-function signature="installEventFilter(QObject*)">
+ <inject-code>
+ Shiboken::Object::keepReference((SbkObject*)%PYARG_1, "eventFilter", %PYSELF, true);
+ </inject-code>
+ </modify-function>
+ <modify-function signature="removeEventFilter(QObject*)">
+ <inject-code>
+ Shiboken::Object::removeReference((SbkObject*)%PYARG_1, "eventFilter", %PYSELF);
+ </inject-code>
+ </modify-function>
<!-- Invalidate-after-use stuff -->
<modify-function signature="childEvent(QChildEvent*)">
<modify-argument index="1" invalidate-after-use="yes"/>