diff options
Diffstat (limited to 'tests/auto/declarative/qdeclarativepathview')
-rw-r--r-- | tests/auto/declarative/qdeclarativepathview/data/pathtest.qml (renamed from tests/auto/declarative/qdeclarativepathview/data/path.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativepathview/data/pathview0.qml (renamed from tests/auto/declarative/qdeclarativepathview/data/pathview.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativepathview/data/pathview3.qml | 2 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp | 14 |
4 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/declarative/qdeclarativepathview/data/path.qml b/tests/auto/declarative/qdeclarativepathview/data/pathtest.qml index 7e82a48..7e82a48 100644 --- a/tests/auto/declarative/qdeclarativepathview/data/path.qml +++ b/tests/auto/declarative/qdeclarativepathview/data/pathtest.qml diff --git a/tests/auto/declarative/qdeclarativepathview/data/pathview.qml b/tests/auto/declarative/qdeclarativepathview/data/pathview0.qml index ae0c86a..ae0c86a 100644 --- a/tests/auto/declarative/qdeclarativepathview/data/pathview.qml +++ b/tests/auto/declarative/qdeclarativepathview/data/pathview0.qml diff --git a/tests/auto/declarative/qdeclarativepathview/data/pathview3.qml b/tests/auto/declarative/qdeclarativepathview/data/pathview3.qml index f8ed29f..70cfbcd 100644 --- a/tests/auto/declarative/qdeclarativepathview/data/pathview3.qml +++ b/tests/auto/declarative/qdeclarativepathview/data/pathview3.qml @@ -2,7 +2,7 @@ import Qt 4.6 PathView { id: photoPathView - y: 100; width: 800; height: 330; pathItemCount: 4; offset: 10 + y: 100; width: 800; height: 330; pathItemCount: 4; offset: 0.1 dragMargin: 24; snapPosition: 0.50 path: Path { diff --git a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp index 62eb8c3..c16c46f 100644 --- a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp +++ b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp @@ -213,7 +213,7 @@ void tst_QDeclarativePathView::items() QDeclarativeContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); - canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/pathview.qml")); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/pathview0.qml")); qApp->processEvents(); QDeclarativePathView *pathview = findItem<QDeclarativePathView>(canvas->rootObject(), "view"); @@ -262,7 +262,7 @@ void tst_QDeclarativePathView::pathview3() QVERIFY(obj->delegate() != 0); QVERIFY(obj->model() != QVariant()); QCOMPARE(obj->currentIndex(), 0); - QCOMPARE(obj->offset(), 50.); // ??? + QCOMPARE(obj->offset(), 0.5); // ??? QCOMPARE(obj->snapPosition(), 0.5); // ??? QCOMPARE(obj->dragMargin(), 24.); QCOMPARE(obj->count(), 8); @@ -272,7 +272,7 @@ void tst_QDeclarativePathView::pathview3() void tst_QDeclarativePathView::path() { QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/path.qml")); + QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/pathtest.qml")); QDeclarativePath *obj = qobject_cast<QDeclarativePath*>(c.create()); QVERIFY(obj != 0); @@ -407,7 +407,7 @@ void tst_QDeclarativePathView::pathMoved() QDeclarativeContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); - canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/pathview.qml")); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/pathview0.qml")); qApp->processEvents(); QDeclarativePathView *pathview = findItem<QDeclarativePathView>(canvas->rootObject(), "view"); @@ -422,14 +422,14 @@ void tst_QDeclarativePathView::pathMoved() offset.setX(firstItem->width()/2); offset.setY(firstItem->height()/2); QCOMPARE(firstItem->pos() + offset, start); - pathview->setOffset(10); + pathview->setOffset(0.1); for(int i=0; i<model.count(); i++){ QDeclarativeRectangle *curItem = findItem<QDeclarativeRectangle>(pathview, "wrapper", i); QCOMPARE(curItem->pos() + offset, path->pointAt(0.1 + i*0.25)); } - pathview->setOffset(100); + pathview->setOffset(1.0); QCOMPARE(firstItem->pos() + offset, start); delete canvas; @@ -448,7 +448,7 @@ void tst_QDeclarativePathView::setCurrentIndex() QDeclarativeContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testModel", &model); - canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/pathview.qml")); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/pathview0.qml")); qApp->processEvents(); QDeclarativePathView *pathview = findItem<QDeclarativePathView>(canvas->rootObject(), "view"); |