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>
This commit is contained in:
parent
bf4e4cdb89
commit
5ae1e6460b
3 changed files with 17 additions and 0 deletions
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue