diff options
author | Renato Filho <renato.filho@openbossa.org> | 2010-07-29 19:14:05 -0300 |
---|---|---|
committer | Renato Filho <renato.filho@openbossa.org> | 2010-07-29 19:29:01 -0300 |
commit | ee7b4826c0f0e487b75a70812dbcdcab00a0afdd (patch) | |
tree | 64e0057d9df823465b1ebca3c882fc054df132fb | |
parent | 6a2df2daa4e1efc5b7e6e5946c96a528ec9b7248 (diff) |
Fixed return policy on ItemList.
Fixed singleShot function to invalidate temporary object.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Luciano Wolf <luciano.wolf@openbossa.org>
-rw-r--r-- | PySide/QtCore/typesystem_core.xml | 3 | ||||
-rw-r--r-- | PySide/QtGui/typesystem_gui_common.xml | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml index db038e245..84cf90632 100644 --- a/PySide/QtCore/typesystem_core.xml +++ b/PySide/QtCore/typesystem_core.xml @@ -1697,6 +1697,8 @@ QTimer* timer = Converter<QTimer*>::toCpp(pyTimer); PyObject* result = PyObject_CallMethod(pyTimer, const_cast<char*>("connect"), const_cast<char*>("OsOs"), pyTimer, SIGNAL(timeout()), %PYARG_2, %3); Py_DECREF(result); + // invalidate to avoid use of python object + Shiboken::BindingManager::instance().invalidateWrapper((Shiboken::SbkBaseWrapper *)pyTimer); timer->setSingleShot(true); timer->connect(timer, SIGNAL("timeout()"), timer, SLOT("deleteLater()")); timer->start(%1); @@ -1713,6 +1715,7 @@ timer->connect(timer, SIGNAL(timeout()), timer, SLOT(deleteLater())); PyObject* result = PyObject_CallMethod(pyTimer, const_cast<char*>("connect"), const_cast<char*>("OsO"), pyTimer, SIGNAL(timeout()), pyargs[1]); Py_DECREF(result); + Shiboken::BindingManager::instance().invalidateWrapper((Shiboken::SbkBaseWrapper *)pyTimer); timer->start(cpp_arg0); </inject-code> </add-function> diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml index 7308f009f..eb0c3c87a 100644 --- a/PySide/QtGui/typesystem_gui_common.xml +++ b/PySide/QtGui/typesystem_gui_common.xml @@ -2953,6 +2953,11 @@ <parent index="1" action="add"/> </modify-argument> </modify-function> + <modify-function signature="listWidget() const"> + <modify-argument index="return"> + <define-ownership owner="target"/> + </modify-argument> + </modify-function> <modify-function signature="operator<(QListWidgetItem)const"> <modify-argument index="1" invalidate-after-use="yes"/> </modify-function> |