diff options
author | Renato Filho <renato.filho@openbossa.org> | 2010-08-17 15:49:55 -0300 |
---|---|---|
committer | Renato Filho <renato.filho@openbossa.org> | 2010-08-17 16:59:15 -0300 |
commit | 23672770ea6fd79c38fed0695fc92ca193f0ece4 (patch) | |
tree | d3d1d82328e1a486f34c7ba38533f8639b0d09f5 /tests | |
parent | 9a969935ccc866804574480ac41ec004646f104c (diff) |
Disable remove of QAbstractItemModel signals.
Fixes bug #300.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Hugo Parente Lima <hugo.pl@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/QtCore/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/QtCore/bug_300_test.py | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/tests/QtCore/CMakeLists.txt b/tests/QtCore/CMakeLists.txt index 3b155dfa6..cf7727f45 100644 --- a/tests/QtCore/CMakeLists.txt +++ b/tests/QtCore/CMakeLists.txt @@ -1,4 +1,5 @@ PYSIDE_TEST(bug_278_test.py) +PYSIDE_TEST(bug_300_test.py) PYSIDE_TEST(blocking_signals_test.py) PYSIDE_TEST(child_event_test.py) PYSIDE_TEST(deletelater_test.py) diff --git a/tests/QtCore/bug_300_test.py b/tests/QtCore/bug_300_test.py new file mode 100644 index 000000000..ec02cdf02 --- /dev/null +++ b/tests/QtCore/bug_300_test.py @@ -0,0 +1,17 @@ +from PySide.QtGui import QStringListModel +from PySide.QtCore import QModelIndex +import unittest + +class TestQAbstractItemModelSignals(unittest.TestCase): + def sigCallback(self, index, r, c): + self._called = True + + def testSignals(self): + self._called = False + m = QStringListModel() + m.rowsAboutToBeInserted[QModelIndex,int,int].connect(self.sigCallback) + m.insertRows(0, 3) + self.assert_(self._called) + +if __name__ == '__main__': + unittest.main() |