summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-03-29 01:50:23 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-03-29 01:50:23 (GMT)
commitbb86abefa742f82f30fd07aee23e5f3164a47875 (patch)
treed7e8677168f22a1af1977dd62815ad1cd5faaa7e
parent1410285458ff6f5e89be3cc6414466b83701eae1 (diff)
downloadQt-bb86abefa742f82f30fd07aee23e5f3164a47875.zip
Qt-bb86abefa742f82f30fd07aee23e5f3164a47875.tar.gz
Qt-bb86abefa742f82f30fd07aee23e5f3164a47875.tar.bz2
Fix svg and big image auto tests on win32.
-rw-r--r--tests/auto/declarative/qdeclarativeimage/data/heart-win32.pngbin0 -> 12621 bytes
-rw-r--r--tests/auto/declarative/qdeclarativeimage/data/heart200-win32.pngbin0 -> 8062 bytes
-rw-r--r--tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp10
3 files changed, 8 insertions, 2 deletions
diff --git a/tests/auto/declarative/qdeclarativeimage/data/heart-win32.png b/tests/auto/declarative/qdeclarativeimage/data/heart-win32.png
new file mode 100644
index 0000000..351da13
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeimage/data/heart-win32.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativeimage/data/heart200-win32.png b/tests/auto/declarative/qdeclarativeimage/data/heart200-win32.png
new file mode 100644
index 0000000..4976ff9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeimage/data/heart200-win32.png
Binary files differ
diff --git a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
index c1bf2b8..21a513b 100644
--- a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
+++ b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
@@ -260,7 +260,8 @@ void tst_qdeclarativeimage::pixmap()
void tst_qdeclarativeimage::svg()
{
- QString componentStr = "import Qt 4.6\nImage { source: \"" SRCDIR "/data/heart.svg\"; sourceSize.width: 300; sourceSize.height: 300 }";
+ QString src = QUrl::fromLocalFile(SRCDIR "/data/heart.svg").toString();
+ QString componentStr = "import Qt 4.6\nImage { source: \"" + src + "\"; sourceSize.width: 300; sourceSize.height: 300 }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeImage *obj = qobject_cast<QDeclarativeImage*>(component.create());
@@ -271,6 +272,8 @@ void tst_qdeclarativeimage::svg()
QCOMPARE(obj->height(), 500.0);
#if defined(Q_OS_MAC)
QCOMPARE(obj->pixmap(), QPixmap(SRCDIR "/data/heart-mac.png"));
+#elif defined(Q_OS_WIN32)
+ QCOMPARE(obj->pixmap(), QPixmap(SRCDIR "/data/heart-win32.png"));
#else
QCOMPARE(obj->pixmap(), QPixmap(SRCDIR "/data/heart.png"));
#endif
@@ -283,6 +286,8 @@ void tst_qdeclarativeimage::svg()
QCOMPARE(obj->height(), 500.0);
#if defined(Q_OS_MAC)
QCOMPARE(obj->pixmap(), QPixmap(SRCDIR "/data/heart200-mac.png"));
+#elif defined(Q_OS_WIN32)
+ QCOMPARE(obj->pixmap(), QPixmap(SRCDIR "/data/heart200-win32.png"));
#else
QCOMPARE(obj->pixmap(), QPixmap(SRCDIR "/data/heart200.png"));
#endif
@@ -291,7 +296,8 @@ void tst_qdeclarativeimage::svg()
void tst_qdeclarativeimage::big()
{
- QString componentStr = "import Qt 4.6\nImage { source: \"" SRCDIR "/data/big.jpeg\"; sourceSize.width: 256; sourceSize.height: 256 }";
+ QString src = QUrl::fromLocalFile(SRCDIR "/data/big.jpeg").toString();
+ QString componentStr = "import Qt 4.6\nImage { source: \"" + src + "\"; sourceSize.width: 256; sourceSize.height: 256 }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeImage *obj = qobject_cast<QDeclarativeImage*>(component.create());