diff options
Diffstat (limited to 'PySide/QtGui/typesystem_gui_common.xml')
-rw-r--r-- | PySide/QtGui/typesystem_gui_common.xml | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml index d3b0c5593..4b0785b23 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& 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> |