aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2011-08-19 16:28:51 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:54:46 -0300
commit88acbd47dbc745f4d80b884022f27b899050680c (patch)
tree926358d3a220df0f91a603e5d0e7e6641c980769
parent14c00d33257d571af96fa98ca786a8d12cbbb766 (diff)
Fix QGraphicsProxyWidget.setWidget return policy.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Lauro Neto <lauro.neto@openbossa.org>
-rw-r--r--PySide/QtGui/typesystem_gui_common.xml10
1 files changed, 7 insertions, 3 deletions
diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml
index 5017a4e7f..c178d1844 100644
--- a/PySide/QtGui/typesystem_gui_common.xml
+++ b/PySide/QtGui/typesystem_gui_common.xml
@@ -5827,9 +5827,13 @@
</modify-argument>
</modify-function>
<modify-function signature="setWidget(QWidget*)">
- <modify-argument index="1">
- <reference-count action="set"/>
- </modify-argument>
+ <inject-code>
+ QWidget* _old = %CPPSELF.widget();
+ if (_old)
+ Shiboken::Object::setParent(NULL, %CONVERTTOPYTHON[QWidget*](_old));
+ %CPPSELF.%FUNCTION_NAME(%1);
+ Shiboken::Object::setParent(%PYSELF, %PYARG_1);
+ </inject-code>
</modify-function>
</object-type>
<!-- a QObject so main-thread delete redundant -->