summaryrefslogtreecommitdiffstats
path: root/tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-11-30 22:58:06 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-11-30 22:58:06 (GMT)
commit27e55ed231f2afe5a775c3ea92f2ef4bf1f6a26d (patch)
tree4be868ec6a0a425044bee84f269cfee3bad7c0e6 /tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp
parent50afd26a657da319bd6e3cff09ac6c8dd44405bf (diff)
parent61f2b450560887651b3350e63bdd75609e3b6752 (diff)
downloadQt-27e55ed231f2afe5a775c3ea92f2ef4bf1f6a26d.zip
Qt-27e55ed231f2afe5a775c3ea92f2ef4bf1f6a26d.tar.gz
Qt-27e55ed231f2afe5a775c3ea92f2ef4bf1f6a26d.tar.bz2
Merge branch '4.6' of git://scm.dev.nokia.troll.no/qt/qt into kinetic-declarativeui
Conflicts: src/corelib/animation/qabstractanimation.cpp
Diffstat (limited to 'tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp')
-rw-r--r--tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp b/tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp
index 413419d..3736813 100644
--- a/tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp
+++ b/tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp
@@ -112,6 +112,8 @@ private slots:
void testMoveWithinOwnRange_data();
void testMoveWithinOwnRange();
+ void testMoveThroughProxy();
+
void testReset();
@@ -1112,6 +1114,25 @@ void tst_QAbstractItemModel::testMoveSameParentUp()
}
}
+void tst_QAbstractItemModel::testMoveThroughProxy()
+{
+ QSortFilterProxyModel *proxy = new QSortFilterProxyModel(this);
+ proxy->setSourceModel(m_model);
+
+ QList<QPersistentModelIndex> persistentList;
+
+ persistentList.append(proxy->index(0, 0));
+ persistentList.append(proxy->index(0, 0, proxy->mapFromSource(m_model->index(5, 0))));
+
+ ModelMoveCommand *moveCommand = new ModelMoveCommand(m_model, this);
+ moveCommand->setNumCols(4);
+ moveCommand->setAncestorRowNumbers(QList<int>() << 5);
+ moveCommand->setStartRow(0);
+ moveCommand->setEndRow(0);
+ moveCommand->setDestRow(0);
+ moveCommand->doCommand();
+}
+
void tst_QAbstractItemModel::testMoveToGrandParent_data()
{
QTest::addColumn<int>("startRow");