diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2011-04-05 17:52:26 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:54:22 -0300 |
commit | b926ac5defe8f198d397344337ebadd09e278dde (patch) | |
tree | 6b07b2a55d4c5419ce3ab3c7b827e921c6bb46bb /tests/QtCore | |
parent | c057f74ce3c72d8a4d4a4f2a5357a5d3b7625fb2 (diff) |
Added tests for bug #716 - QPersistentModelIndex isn't convertible to QModelIndex
The main test (exactly the same as reported) was added to QtGui tests,
but also extended QAbstractItemModel test with a case that is the
essence of the problem.
http://bugs.pyside.org/show_bug.cgi?id=716
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests/QtCore')
-rw-r--r-- | tests/QtCore/qabstractitemmodel_test.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/QtCore/qabstractitemmodel_test.py b/tests/QtCore/qabstractitemmodel_test.py index 93306ca5f..52e6f8d2d 100644 --- a/tests/QtCore/qabstractitemmodel_test.py +++ b/tests/QtCore/qabstractitemmodel_test.py @@ -16,6 +16,13 @@ class TestQModelIndexInternalPointer(unittest.TestCase): foo = Foo() idx = m.createIndex(0,0, foo) + def testPassQPersistentModelIndexAsQModelIndex(self): + # Related to bug #716 + m = MyModel() + idx = QPersistentModelIndex() + m.span(idx) + + if __name__ == '__main__': unittest.main() |