From 6cce231a2d8da6fb232908a8c815ba3a433cfad7 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Mon, 29 Mar 2010 09:19:07 +1000 Subject: Fix qdeclarativeimage autotest on the mac. --- .../declarative/qdeclarativeimage/data/heart-mac.png | Bin 0 -> 12621 bytes .../declarative/qdeclarativeimage/data/heart200-mac.png | Bin 0 -> 8062 bytes .../qdeclarativeimage/tst_qdeclarativeimage.cpp | 11 +++++++++-- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativeimage/data/heart-mac.png create mode 100644 tests/auto/declarative/qdeclarativeimage/data/heart200-mac.png diff --git a/tests/auto/declarative/qdeclarativeimage/data/heart-mac.png b/tests/auto/declarative/qdeclarativeimage/data/heart-mac.png new file mode 100644 index 0000000..d7df0e4 Binary files /dev/null and b/tests/auto/declarative/qdeclarativeimage/data/heart-mac.png differ diff --git a/tests/auto/declarative/qdeclarativeimage/data/heart200-mac.png b/tests/auto/declarative/qdeclarativeimage/data/heart200-mac.png new file mode 100644 index 0000000..df22325 Binary files /dev/null and b/tests/auto/declarative/qdeclarativeimage/data/heart200-mac.png differ diff --git a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp index 9073750..bbf7421 100644 --- a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp +++ b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp @@ -155,7 +155,7 @@ void tst_qdeclarativeimage::imageSource() component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeImage *obj = qobject_cast(component.create()); QVERIFY(obj != 0); - + if (remote || async) TRY_WAIT(obj->status() == QDeclarativeImage::Loading); @@ -266,7 +266,11 @@ void tst_qdeclarativeimage::svg() QCOMPARE(obj->pixmap().height(), 300); QCOMPARE(obj->width(), 550.0); QCOMPARE(obj->height(), 500.0); +#if defined(Q_OS_MAC) + QCOMPARE(obj->pixmap(), QPixmap(SRCDIR "/data/heart-mac.png")); +#else QCOMPARE(obj->pixmap(), QPixmap(SRCDIR "/data/heart.png")); +#endif obj->setSourceSize(QSize(200,200)); @@ -274,8 +278,11 @@ void tst_qdeclarativeimage::svg() QCOMPARE(obj->pixmap().height(), 200); QCOMPARE(obj->width(), 550.0); QCOMPARE(obj->height(), 500.0); +#if defined(Q_OS_MAC) + QCOMPARE(obj->pixmap(), QPixmap(SRCDIR "/data/heart200-mac.png")); +#else QCOMPARE(obj->pixmap(), QPixmap(SRCDIR "/data/heart200.png")); - +#endif delete obj; } -- cgit v0.12