summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativepathview
diff options
context:
space:
mode:
authorBernd Weimer <bweimer@blackberry.com>2013-03-25 17:03:24 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-27 18:31:19 +0100
commitaad8f0bcad607544ede63e8154bcdc14f40fd632 (patch)
treee89065f92ca585c0fe82cbbf4ef8ced2aa635ad0 /tests/auto/declarative/qdeclarativepathview
parent0ee112dcc5174f41427630ce76f4f5ed232c4bba (diff)
Fixed some declarative auto tests
This is a backport from qt5/qtdeclarative (commit c460a83 + a fix in qdeclarativeimage) Change-Id: I90f292dea76d3da30930a663b37f8e624b210c2b Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Diffstat (limited to 'tests/auto/declarative/qdeclarativepathview')
-rw-r--r--tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
index 8815dbfb..bde7eba5 100644
--- a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
+++ b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
@@ -395,34 +395,34 @@ void tst_QDeclarativePathView::insertModel_data()
// We have 8 items, with currentIndex == 4
QTest::newRow("insert after current")
- << int(QDeclarativePathView::StrictlyEnforceRange) << 6 << 1 << 5. << 4;
+ << int(QDeclarativePathView::StrictlyEnforceRange) << 6 << 1 << qreal(5.) << 4;
QTest::newRow("insert before current")
- << int(QDeclarativePathView::StrictlyEnforceRange) << 2 << 1 << 4. << 5;
+ << int(QDeclarativePathView::StrictlyEnforceRange) << 2 << 1 << qreal(4.) << 5;
QTest::newRow("insert multiple after current")
- << int(QDeclarativePathView::StrictlyEnforceRange) << 5 << 2 << 6. << 4;
+ << int(QDeclarativePathView::StrictlyEnforceRange) << 5 << 2 << qreal(6.) << 4;
QTest::newRow("insert multiple before current")
- << int(QDeclarativePathView::StrictlyEnforceRange) << 1 << 2 << 4. << 6;
+ << int(QDeclarativePathView::StrictlyEnforceRange) << 1 << 2 << qreal(4.) << 6;
QTest::newRow("insert at end")
- << int(QDeclarativePathView::StrictlyEnforceRange) << 8 << 1 << 5. << 4;
+ << int(QDeclarativePathView::StrictlyEnforceRange) << 8 << 1 << qreal(5.) << 4;
QTest::newRow("insert at beginning")
- << int(QDeclarativePathView::StrictlyEnforceRange) << 0 << 1 << 4. << 5;
+ << int(QDeclarativePathView::StrictlyEnforceRange) << 0 << 1 << qreal(4.) << 5;
QTest::newRow("insert at current")
- << int(QDeclarativePathView::StrictlyEnforceRange) << 4 << 1 << 4. << 5;
+ << int(QDeclarativePathView::StrictlyEnforceRange) << 4 << 1 << qreal(4.) << 5;
QTest::newRow("no range - insert after current")
- << int(QDeclarativePathView::NoHighlightRange) << 6 << 1 << 5. << 4;
+ << int(QDeclarativePathView::NoHighlightRange) << 6 << 1 << qreal(5.) << 4;
QTest::newRow("no range - insert before current")
- << int(QDeclarativePathView::NoHighlightRange) << 2 << 1 << 4. << 5;
+ << int(QDeclarativePathView::NoHighlightRange) << 2 << 1 << qreal(4.) << 5;
QTest::newRow("no range - insert multiple after current")
- << int(QDeclarativePathView::NoHighlightRange) << 5 << 2 << 6. << 4;
+ << int(QDeclarativePathView::NoHighlightRange) << 5 << 2 << qreal(6.) << 4;
QTest::newRow("no range - insert multiple before current")
- << int(QDeclarativePathView::NoHighlightRange) << 1 << 2 << 4. << 6;
+ << int(QDeclarativePathView::NoHighlightRange) << 1 << 2 << qreal(4.) << 6;
QTest::newRow("no range - insert at end")
- << int(QDeclarativePathView::NoHighlightRange) << 8 << 1 << 5. << 4;
+ << int(QDeclarativePathView::NoHighlightRange) << 8 << 1 << qreal(5.) << 4;
QTest::newRow("no range - insert at beginning")
- << int(QDeclarativePathView::NoHighlightRange) << 0 << 1 << 4. << 5;
+ << int(QDeclarativePathView::NoHighlightRange) << 0 << 1 << qreal(4.) << 5;
QTest::newRow("no range - insert at current")
- << int(QDeclarativePathView::NoHighlightRange) << 4 << 1 << 4. << 5;
+ << int(QDeclarativePathView::NoHighlightRange) << 4 << 1 << qreal(4.) << 5;
}
void tst_QDeclarativePathView::insertModel()
@@ -530,38 +530,38 @@ void tst_QDeclarativePathView::removeModel_data()
// We have 8 items, with currentIndex == 4
QTest::newRow("remove after current")
- << int(QDeclarativePathView::StrictlyEnforceRange) << 6 << 1 << 3. << 4;
+ << int(QDeclarativePathView::StrictlyEnforceRange) << 6 << 1 << qreal(3.) << 4;
QTest::newRow("remove before current")
- << int(QDeclarativePathView::StrictlyEnforceRange) << 2 << 1 << 4. << 3;
+ << int(QDeclarativePathView::StrictlyEnforceRange) << 2 << 1 << qreal(4.) << 3;
QTest::newRow("remove multiple after current")
- << int(QDeclarativePathView::StrictlyEnforceRange) << 5 << 2 << 2. << 4;
+ << int(QDeclarativePathView::StrictlyEnforceRange) << 5 << 2 << qreal(2.) << 4;
QTest::newRow("remove multiple before current")
- << int(QDeclarativePathView::StrictlyEnforceRange) << 1 << 2 << 4. << 2;
+ << int(QDeclarativePathView::StrictlyEnforceRange) << 1 << 2 << qreal(4.) << 2;
QTest::newRow("remove last")
- << int(QDeclarativePathView::StrictlyEnforceRange) << 7 << 1 << 3. << 4;
+ << int(QDeclarativePathView::StrictlyEnforceRange) << 7 << 1 << qreal(3.) << 4;
QTest::newRow("remove first")
- << int(QDeclarativePathView::StrictlyEnforceRange) << 0 << 1 << 4. << 3;
+ << int(QDeclarativePathView::StrictlyEnforceRange) << 0 << 1 << qreal(4.) << 3;
QTest::newRow("remove current")
- << int(QDeclarativePathView::StrictlyEnforceRange) << 4 << 1 << 3. << 4;
+ << int(QDeclarativePathView::StrictlyEnforceRange) << 4 << 1 << qreal(3.) << 4;
QTest::newRow("remove all")
- << int(QDeclarativePathView::StrictlyEnforceRange) << 0 << 8 << 0. << 0;
+ << int(QDeclarativePathView::StrictlyEnforceRange) << 0 << 8 << qreal(0.) << 0;
QTest::newRow("no range - remove after current")
- << int(QDeclarativePathView::NoHighlightRange) << 6 << 1 << 3. << 4;
+ << int(QDeclarativePathView::NoHighlightRange) << 6 << 1 << qreal(3.) << 4;
QTest::newRow("no range - remove before current")
- << int(QDeclarativePathView::NoHighlightRange) << 2 << 1 << 4. << 3;
+ << int(QDeclarativePathView::NoHighlightRange) << 2 << 1 << qreal(4.) << 3;
QTest::newRow("no range - remove multiple after current")
- << int(QDeclarativePathView::NoHighlightRange) << 5 << 2 << 2. << 4;
+ << int(QDeclarativePathView::NoHighlightRange) << 5 << 2 << qreal(2.) << 4;
QTest::newRow("no range - remove multiple before current")
- << int(QDeclarativePathView::NoHighlightRange) << 1 << 2 << 4. << 2;
+ << int(QDeclarativePathView::NoHighlightRange) << 1 << 2 << qreal(4.) << 2;
QTest::newRow("no range - remove last")
- << int(QDeclarativePathView::NoHighlightRange) << 7 << 1 << 3. << 4;
+ << int(QDeclarativePathView::NoHighlightRange) << 7 << 1 << qreal(3.) << 4;
QTest::newRow("no range - remove first")
- << int(QDeclarativePathView::NoHighlightRange) << 0 << 1 << 4. << 3;
+ << int(QDeclarativePathView::NoHighlightRange) << 0 << 1 << qreal(4.) << 3;
QTest::newRow("no range - remove current offset")
- << int(QDeclarativePathView::NoHighlightRange) << 4 << 1 << 4. << 4;
+ << int(QDeclarativePathView::NoHighlightRange) << 4 << 1 << qreal(4.) << 4;
QTest::newRow("no range - remove all")
- << int(QDeclarativePathView::NoHighlightRange) << 0 << 8 << 0. << 0;
+ << int(QDeclarativePathView::NoHighlightRange) << 0 << 8 << qreal(0.) << 0;
}
void tst_QDeclarativePathView::removeModel()