diff options
author | Renato Filho <renato.filho@openbossa.org> | 2011-05-31 15:45:28 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:54:26 -0300 |
commit | 20f8953cb48ac03536e8101a4cfc061a31337b62 (patch) | |
tree | 0e643c5cc29b1aeaca373825160a9a9f17776d0d | |
parent | 3800537912667b9291623baf96a0504f5de73f3b (diff) |
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.xml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml index 2f16cbe56..2e1cbad48 100644 --- a/PySide/QtCore/typesystem_core.xml +++ b/PySide/QtCore/typesystem_core.xml @@ -1286,6 +1286,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"/> |