Fixed ref leak.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Luciano Wolf <luciano.wolf@openbossa.org>
This commit is contained in:
parent
66adabc96d
commit
1b27bad2b2
1 changed files with 6 additions and 3 deletions
|
|
@ -3439,15 +3439,18 @@
|
||||||
<inject-code class="target" position="beginning">
|
<inject-code class="target" position="beginning">
|
||||||
QWidget* tab = %CPPSELF.widget(%1);
|
QWidget* tab = %CPPSELF.widget(%1);
|
||||||
if (tab) {
|
if (tab) {
|
||||||
Shiboken::setParent(0, %CONVERTTOPYTHON[QWidget*](tab));
|
Shiboken::AutoDecref pyWidget(%CONVERTTOPYTHON[QWidget*](tab));
|
||||||
|
Shiboken::setParent(0, pyWidget);
|
||||||
%CPPSELF.%FUNCTION_NAME(%1);
|
%CPPSELF.%FUNCTION_NAME(%1);
|
||||||
}
|
}
|
||||||
</inject-code>
|
</inject-code>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
<modify-function signature="clear()">
|
<modify-function signature="clear()">
|
||||||
<inject-code class="target" position="beginning">
|
<inject-code class="target" position="beginning">
|
||||||
for (int i=0; i < %CPPSELF.count(); i++)
|
for (int i=0; i < %CPPSELF.count(); i++) {
|
||||||
Shiboken::setParent(0, %CONVERTTOPYTHON[QWidget*](%CPPSELF.widget(i)));
|
Shiboken::AutoDecRef pyWidget(%CONVERTTOPYTHON[QWidget*](%CPPSELF.widget(i)));
|
||||||
|
Shiboken::setParent(0, pyWidget);
|
||||||
|
}
|
||||||
%CPPSELF.%FUNCTION_NAME();
|
%CPPSELF.%FUNCTION_NAME();
|
||||||
</inject-code>
|
</inject-code>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue