diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2010-03-28 23:19:07 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2010-03-28 23:19:07 (GMT) |
commit | 6cce231a2d8da6fb232908a8c815ba3a433cfad7 (patch) | |
tree | 674f549223dcceb0a435ca38c02d8f3d78cf4002 /tests | |
parent | f87e175eb03a6b455f70e12bb24f75c26eacb4c2 (diff) | |
download | Qt-6cce231a2d8da6fb232908a8c815ba3a433cfad7.zip Qt-6cce231a2d8da6fb232908a8c815ba3a433cfad7.tar.gz Qt-6cce231a2d8da6fb232908a8c815ba3a433cfad7.tar.bz2 |
Fix qdeclarativeimage autotest on the mac.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative/qdeclarativeimage/data/heart-mac.png | bin | 0 -> 12621 bytes | |||
-rw-r--r-- | tests/auto/declarative/qdeclarativeimage/data/heart200-mac.png | bin | 0 -> 8062 bytes | |||
-rw-r--r-- | tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp | 11 |
3 files changed, 9 insertions, 2 deletions
diff --git a/tests/auto/declarative/qdeclarativeimage/data/heart-mac.png b/tests/auto/declarative/qdeclarativeimage/data/heart-mac.png Binary files differnew file mode 100644 index 0000000..d7df0e4 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeimage/data/heart-mac.png diff --git a/tests/auto/declarative/qdeclarativeimage/data/heart200-mac.png b/tests/auto/declarative/qdeclarativeimage/data/heart200-mac.png Binary files differnew file mode 100644 index 0000000..df22325 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeimage/data/heart200-mac.png 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<QDeclarativeImage*>(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; } |