summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
index f38a95a1..6c2e0312 100644
--- a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
+++ b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
@@ -219,7 +219,11 @@ void tst_qdeclarativeborderimage::smooth()
void tst_qdeclarativeborderimage::mirror()
{
- QString componentStr = "import QtQuick 1.0\nBorderImage { source: \"" SRCDIR "/data/heart200.png\"; smooth: true; width: 300; height: 300; border { top: 50; right: 50; bottom: 50; left: 50 } }";
+ const QString imagePath = QLatin1String(SRCDIR) + QStringLiteral("/data/heart200.png");
+ QVERIFY(QFileInfo(imagePath).exists());
+ const QString componentStr = QStringLiteral("import QtQuick 1.0\nBorderImage { source: \"")
+ + QUrl::fromLocalFile(imagePath).toString()
+ + QStringLiteral("\"; smooth: true; width: 300; height: 300; border { top: 50; right: 50; bottom: 50; left: 50 } }");
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());