summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative')
-rw-r--r--tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp60
3 files changed, 32 insertions, 35 deletions
diff --git a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
index d0c60043..2b099ad1 100644
--- a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
+++ b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
@@ -327,10 +327,7 @@ void tst_qdeclarativeimage::mirror()
p_e.drawPixmap(QRect(0, 0, width, height), srcPixmap, QRect(0, 0, srcPixmap.width(), srcPixmap.height()));
break;
case QDeclarativeImage::PreserveAspectFit:
-#if defined(UBUNTU_LUCID)
- QEXPECT_FAIL("", "QTBUG-26787", Continue);
-#endif
- p_e.drawPixmap(QRect(25, 0, width / (width/height), height), srcPixmap, QRect(0, 0, srcPixmap.width(), srcPixmap.height()));
+ p_e.drawPixmap(QRect(25, 0, height, height), srcPixmap, QRect(0, 0, srcPixmap.width(), srcPixmap.height()));
break;
case QDeclarativeImage::PreserveAspectCrop:
{
diff --git a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
index 200c16c2..bdf86641 100644
--- a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
+++ b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
@@ -982,7 +982,7 @@ void tst_qdeclarativelistmodel::property_changes()
expr.setExpression(script_change);
expr.evaluate();
- QVERIFY2(!expr.hasError(), QTest::toString(expr.error()));
+ QVERIFY2(!expr.hasError(), QTest::toString(expr.error().toString()));
// test the object returned by get() emits the correct signals
QCOMPARE(connectionsObject->property("gotSignal").toBool(), itemsChanged);
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()