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 /tests/QtGui | |
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 'tests/QtGui')
-rw-r--r-- | tests/QtGui/qstandarditemmodel_test.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/QtGui/qstandarditemmodel_test.py b/tests/QtGui/qstandarditemmodel_test.py index 6ab86dd04..514a9247e 100644 --- a/tests/QtGui/qstandarditemmodel_test.py +++ b/tests/QtGui/qstandarditemmodel_test.py @@ -2,6 +2,7 @@ import unittest import sys from PySide.QtGui import QStandardItemModel, QWidget, QStandardItem +import shiboken from helper import UsesQApplication @@ -21,6 +22,13 @@ class QStandardItemModelTest(UsesQApplication): # bug #227 self.model.insertRow(0) + def testClear(self): + + model = QStandardItemModel() + root = model.invisibleRootItem() + model.clear() + self.assertFalse(shiboken.isValid(root)) + class QStandardItemModelRef(UsesQApplication): def testRefCount(self): |