aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-07-29 19:14:05 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-07-29 19:29:01 -0300
commitee7b4826c0f0e487b75a70812dbcdcab00a0afdd (patch)
tree64e0057d9df823465b1ebca3c882fc054df132fb
parent6a2df2daa4e1efc5b7e6e5946c96a528ec9b7248 (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.xml3
-rw-r--r--PySide/QtGui/typesystem_gui_common.xml5
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&lt;QTimer*>::toCpp(pyTimer);
PyObject* result = PyObject_CallMethod(pyTimer, const_cast&lt;char*>("connect"), const_cast&lt;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&lt;char*>("connect"), const_cast&lt;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&lt;(QListWidgetItem)const">
<modify-argument index="1" invalidate-after-use="yes"/>
</modify-function>