summaryrefslogtreecommitdiffstats
path: root/PySide/QtGui/typesystem_gui_common.xml
diff options
context:
space:
mode:
Diffstat (limited to 'PySide/QtGui/typesystem_gui_common.xml')
-rw-r--r--PySide/QtGui/typesystem_gui_common.xml13
1 files changed, 9 insertions, 4 deletions
diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml
index d3b0c55..4b0785b 100644
--- a/PySide/QtGui/typesystem_gui_common.xml
+++ b/PySide/QtGui/typesystem_gui_common.xml
@@ -2399,10 +2399,15 @@
<modify-function signature="clear()">
<inject-code>
- foreach(QAction *act, %CPPSELF.actions()) {
- Shiboken::AutoDecRef pyAct(%CONVERTTOPYTHON[QAction*](act));
- Shiboken::Object::setParent(NULL, pyAct);
- Shiboken::Object::invalidate(pyAct);
+ Shiboken::BindingManager&amp; bm = Shiboken::BindingManager::instance();
+ PyObject* pyObj;
+ foreach(QAction* act, %CPPSELF.actions()) {
+ if ((pyObj = (PyObject*)bm.retrieveWrapper(act)) != 0) {
+ Py_INCREF(pyObj);
+ Shiboken::Object::setParent(NULL, pyObj);
+ Shiboken::Object::invalidate(pyObj);
+ Py_DECREF(pyObj);
+ }
}
</inject-code>
</modify-function>