diff options
author | Jyri Tahtela <jyri.tahtela@nokia.com> | 2011-05-18 07:41:09 (GMT) |
---|---|---|
committer | Jyri Tahtela <jyri.tahtela@nokia.com> | 2011-05-18 07:41:09 (GMT) |
commit | 9cacde74f7de702689725882633073e60c0a2baa (patch) | |
tree | 330d22dadbd28b14a7d8896823d1c33597e9993e /tests/auto/declarative/qdeclarativepathview | |
parent | 006c8e22075112eff6230d8168d716e44a9e29d5 (diff) | |
parent | 2c07b5d2cba8d8e499bd0861eefef12d4e00d99a (diff) | |
download | Qt-9cacde74f7de702689725882633073e60c0a2baa.zip Qt-9cacde74f7de702689725882633073e60c0a2baa.tar.gz Qt-9cacde74f7de702689725882633073e60c0a2baa.tar.bz2 |
Merge remote-tracking branch 'qt/4.8'
Conflicts:
doc/src/examples/wheel.qdoc
src/gui/util/qflickgesture.cpp
src/gui/util/qflickgesture_p.h
src/gui/util/qscroller.cpp
src/gui/util/qscroller.h
src/gui/util/qscroller_p.h
src/gui/util/qscrollerproperties.cpp
src/gui/util/qscrollerproperties.h
tests/auto/qscroller/tst_qscroller.cpp
Diffstat (limited to 'tests/auto/declarative/qdeclarativepathview')
3 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativepathview/data/datamodel.qml b/tests/auto/declarative/qdeclarativepathview/data/datamodel.qml index 1322025..e2c4e3d 100644 --- a/tests/auto/declarative/qdeclarativepathview/data/datamodel.qml +++ b/tests/auto/declarative/qdeclarativepathview/data/datamodel.qml @@ -2,6 +2,7 @@ import QtQuick 1.0 PathView { id: pathview + property int viewCount: count objectName: "pathview" width: 240; height: 320 pathItemCount: testObject.pathItemCount diff --git a/tests/auto/declarative/qdeclarativepathview/data/pathview0.qml b/tests/auto/declarative/qdeclarativepathview/data/pathview0.qml index 04c7717..28b6fb9 100644 --- a/tests/auto/declarative/qdeclarativepathview/data/pathview0.qml +++ b/tests/auto/declarative/qdeclarativepathview/data/pathview0.qml @@ -2,6 +2,7 @@ import QtQuick 1.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/qdeclarativepathview/tst_qdeclarativepathview.cpp b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp index 1f53383..3861ed3 100644 --- a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp +++ b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp @@ -253,6 +253,8 @@ void tst_QDeclarativePathView::items() QDeclarativePathView *pathview = findItem<QDeclarativePathView>(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) { @@ -400,6 +402,7 @@ void tst_QDeclarativePathView::dataModel() model.insertItem(4, "orange", "10"); QTest::qWait(100); + QCOMPARE(canvas->rootObject()->property("viewCount").toInt(), model.count()); QTRY_COMPARE(findItems<QDeclarativeItem>(pathview, "wrapper").count(), 14); QVERIFY(pathview->currentIndex() == 0); @@ -409,6 +412,7 @@ void tst_QDeclarativePathView::dataModel() QCOMPARE(text->text(), model.name(4)); model.removeItem(2); + QCOMPARE(canvas->rootObject()->property("viewCount").toInt(), model.count()); text = findItem<QDeclarativeText>(pathview, "myText", 2); QVERIFY(text); QCOMPARE(text->text(), model.name(2)); |