diff options
author | Martin Jones <martin.jones@nokia.com> | 2011-05-30 16:35:52 +1000 |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2011-05-30 16:35:52 +1000 |
commit | 16e75d93ebe652f6e5b919aa89809a92881a37e7 (patch) | |
tree | 3caee160c2913ceca306abdccc9ae3a82aae9d6d /tests/auto/declarative/qsgpathview | |
parent | 806f031efeda71d3f4d7d2f949b437493e79cf52 (diff) |
Update SG items with recent GV item changes.
Change-Id: Ib9cadea91ab3717bee0caf2071102a100e81969d
Diffstat (limited to 'tests/auto/declarative/qsgpathview')
-rw-r--r-- | tests/auto/declarative/qsgpathview/data/datamodel.qml | 1 | ||||
-rw-r--r-- | tests/auto/declarative/qsgpathview/data/pathview0.qml | 1 | ||||
-rw-r--r-- | tests/auto/declarative/qsgpathview/tst_qsgpathview.cpp | 4 |
3 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/declarative/qsgpathview/data/datamodel.qml b/tests/auto/declarative/qsgpathview/data/datamodel.qml index 839049f1fc..44f2aecc0a 100644 --- a/tests/auto/declarative/qsgpathview/data/datamodel.qml +++ b/tests/auto/declarative/qsgpathview/data/datamodel.qml @@ -2,6 +2,7 @@ import QtQuick 2.0 PathView { id: pathview + property int viewCount: count objectName: "pathview" width: 240; height: 320 pathItemCount: testObject.pathItemCount diff --git a/tests/auto/declarative/qsgpathview/data/pathview0.qml b/tests/auto/declarative/qsgpathview/data/pathview0.qml index 0204112812..72b71a3c80 100644 --- a/tests/auto/declarative/qsgpathview/data/pathview0.qml +++ b/tests/auto/declarative/qsgpathview/data/pathview0.qml @@ -2,6 +2,7 @@ import QtQuick 2.0 Rectangle { id: root + property int count: view.count property int currentA: -1 property int currentB: -1 property real delegateWidth: 60 diff --git a/tests/auto/declarative/qsgpathview/tst_qsgpathview.cpp b/tests/auto/declarative/qsgpathview/tst_qsgpathview.cpp index 5b95acec68..2c24748f45 100644 --- a/tests/auto/declarative/qsgpathview/tst_qsgpathview.cpp +++ b/tests/auto/declarative/qsgpathview/tst_qsgpathview.cpp @@ -268,6 +268,8 @@ void tst_QSGPathView::items() QSGPathView *pathview = findItem<QSGPathView>(canvas->rootObject(), "view"); QVERIFY(pathview != 0); + QCOMPARE(pathview->count(), model.count()); + QCOMPARE(canvas->rootObject()->property("count").toInt(), model.count()); QCOMPARE(pathview->childItems().count(), model.count()+1); // assumes all are visible, including highlight for (int i = 0; i < model.count(); ++i) { @@ -416,6 +418,7 @@ void tst_QSGPathView::dataModel() model.insertItem(4, "orange", "10"); QTest::qWait(100); + QCOMPARE(canvas->rootObject()->property("viewCount").toInt(), model.count()); QTRY_COMPARE(findItems<QSGItem>(pathview, "wrapper").count(), 14); QVERIFY(pathview->currentIndex() == 0); @@ -425,6 +428,7 @@ void tst_QSGPathView::dataModel() QCOMPARE(text->text(), model.name(4)); model.removeItem(2); + QCOMPARE(canvas->rootObject()->property("viewCount").toInt(), model.count()); text = findItem<QSGText>(pathview, "myText", 2); QVERIFY(text); QCOMPARE(text->text(), model.name(2)); |