diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-08-16 16:12:14 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:54:44 -0300 |
commit | f0ea617acb86d81d3ce9b2ec5f5dc8aba2e299a5 (patch) | |
tree | a7c014f74479761bda7e0833b8f5740e27719b0e | |
parent | 48015c2bdc6f602abd7800098e1749fb946cf05a (diff) |
Fix bug 964 - "QAbstractItemView.moveCursor() method is missing"
Reviewer: Marcelo Lira <marcelol.lira@openbossa.org>
Renato Araújo <renato.filho@openbossa.org>
-rw-r--r-- | PySide/QtGui/typesystem_gui_common.xml | 2 | ||||
-rw-r--r-- | tests/QtGui/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/QtGui/bug_964.py | 18 |
3 files changed, 19 insertions, 2 deletions
diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml index 2aad00ce8..dd159676f 100644 --- a/PySide/QtGui/typesystem_gui_common.xml +++ b/PySide/QtGui/typesystem_gui_common.xml @@ -1851,8 +1851,6 @@ <modify-function signature="selectionCommand(QModelIndex,const QEvent*)const"> <modify-argument index="2" invalidate-after-use="yes"/> </modify-function> - <!-- ### because the CursorAction enum is protected --> - <modify-function signature="moveCursor(QAbstractItemView::CursorAction,QFlags<Qt::KeyboardModifier>)" remove="all"/> </object-type> <object-type name="QAbstractSlider"> <enum-type name="SliderAction"/> diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt index 4c5202c43..4e621c84c 100644 --- a/tests/QtGui/CMakeLists.txt +++ b/tests/QtGui/CMakeLists.txt @@ -69,6 +69,7 @@ PYSIDE_TEST(bug_882.py) PYSIDE_TEST(bug_919.py) PYSIDE_TEST(bug_921.py) PYSIDE_TEST(bug_941.py) +PYSIDE_TEST(bug_964.py) PYSIDE_TEST(customproxywidget_test.py) PYSIDE_TEST(deepcopy_test.py) PYSIDE_TEST(event_filter_test.py) diff --git a/tests/QtGui/bug_964.py b/tests/QtGui/bug_964.py new file mode 100644 index 000000000..61fecbae5 --- /dev/null +++ b/tests/QtGui/bug_964.py @@ -0,0 +1,18 @@ +import unittest +from PySide.QtCore import * +from PySide.QtGui import * + +class TestBug964 (unittest.TestCase): + + def testIt(self): + app = QApplication([]) + model = QStringListModel(["1", "2"]) + view = QListView() + view.setModel(model) + view.setCurrentIndex(model.index(0,0)) + newCursor = view.moveCursor(QAbstractItemView.MoveDown, Qt.NoModifier) + self.assertEqual(newCursor.row(), 1) + self.assertEqual(newCursor.column(), 0) + +if __name__ == "__main__": + unittest.main() |