Fix bug#316 - "QAbstractItemModel.createIndex is broken"

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
This commit is contained in:
Hugo Parente Lima 2010-09-01 15:06:17 -03:00
commit 5c0d39b9dc
4 changed files with 26 additions and 4 deletions

View file

@ -7,6 +7,7 @@ PYSIDE_TEST(duck_punching_test.py)
PYSIDE_TEST(hash_test.py)
PYSIDE_TEST(missing_symbols_test.py)
PYSIDE_TEST(qabs_test.py)
PYSIDE_TEST(qabstractitemmodel_test.py)
PYSIDE_TEST(qabstracttransition_test.py)
PYSIDE_TEST(qanimationgroup_test.py)
PYSIDE_TEST(qbitarray_test.py)

View file

@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
import unittest
from PySide.QtCore import *
class MyModel (QAbstractListModel):
pass
class Foo:
pass
class TestQModelIndexInternalPointer(unittest.TestCase):
def testInternalPointer(self):
m = MyModel()
foo = Foo()
idx = m.createIndex(0,0, foo)
if __name__ == '__main__':
unittest.main()