summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-03-12 07:38:29 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-03-12 07:38:29 (GMT)
commita8e3d5b04607ef6d6ba37090526886bac286abb0 (patch)
treeb8ddbf04605403245fa3fee8508377439b6554c4 /tests/auto/declarative
parentf42c8faec825126d335e3c5a63c2e034476865e0 (diff)
downloadQt-a8e3d5b04607ef6d6ba37090526886bac286abb0.zip
Qt-a8e3d5b04607ef6d6ba37090526886bac286abb0.tar.gz
Qt-a8e3d5b04607ef6d6ba37090526886bac286abb0.tar.bz2
Change PathView offset property to use range 0 - 1.0
Diffstat (limited to 'tests/auto/declarative')
-rw-r--r--tests/auto/declarative/qdeclarativepathview/data/pathview3.qml2
-rw-r--r--tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp6
2 files changed, 4 insertions, 4 deletions
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..cc1a8d5 100644
--- a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
+++ b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
@@ -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);
@@ -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;