diff options
author | John Ehresman <jpe@wingware.com> | 2012-06-18 17:52:22 -0400 |
---|---|---|
committer | Hugo Parente Lima <hugo.lima@openbossa.org> | 2012-07-31 22:01:11 +0200 |
commit | 1cea6192fa32fee29ae64cdc2bda1414e6a443bd (patch) | |
tree | 9982c3aab06fba086a888c6c9302c7fd8085b3ab /PySide | |
parent | c00a1f7ffd313d7e0363a1d386d2bd6e7db3feb6 (diff) |
Invalidate invisibleRootItem in clear() method
Fixes PYSIDE-56
Change-Id: If0529a289e6d9613fdd85bd9d37ccf438d4e92ca
Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
Diffstat (limited to 'PySide')
-rw-r--r-- | PySide/QtGui/typesystem_gui_common.xml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml index ab97ee15f..fe5221134 100644 --- a/PySide/QtGui/typesystem_gui_common.xml +++ b/PySide/QtGui/typesystem_gui_common.xml @@ -4844,6 +4844,12 @@ <modify-function signature="clear()"> <inject-code class="target" position="beginning"> + Shiboken::BindingManager& bm = Shiboken::BindingManager::instance(); + SbkObject* pyRoot = bm.retrieveWrapper(%CPPSELF.invisibleRootItem()); + if (pyRoot) { + Shiboken::Object::destroy(pyRoot, %CPPSELF.invisibleRootItem()); + } + for(int r=0, r_max = %CPPSELF.rowCount(); r < r_max; r++) { QList<QStandardItem *> ri = %CPPSELF.takeRow(0); |