summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-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());