From 4684e5af8fd7ebd5a6dff45fc18e5ea7a9b60bc6 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 11 Feb 2010 15:55:29 +1000 Subject: Fix Image test on Windows. --- tests/auto/declarative/qmlgraphicsimage/tst_qmlgraphicsimage.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/auto/declarative/qmlgraphicsimage/tst_qmlgraphicsimage.cpp b/tests/auto/declarative/qmlgraphicsimage/tst_qmlgraphicsimage.cpp index 92c779a..79dc290 100644 --- a/tests/auto/declarative/qmlgraphicsimage/tst_qmlgraphicsimage.cpp +++ b/tests/auto/declarative/qmlgraphicsimage/tst_qmlgraphicsimage.cpp @@ -114,8 +114,8 @@ void tst_qmlgraphicsimage::imageSource_data() QTest::addColumn("remote"); QTest::addColumn("error"); - QTest::newRow("local") << SRCDIR "/data/colors.png" << false << ""; - QTest::newRow("local not found") << SRCDIR "/data/no-such-file.png" << false + QTest::newRow("local") << QUrl::fromLocalFile(SRCDIR "/data/colors.png").toString() << false << ""; + QTest::newRow("local not found") << QUrl::fromLocalFile(SRCDIR "/data/no-such-file.png").toString() << false << "Cannot open QUrl( \"" + QUrl::fromLocalFile(SRCDIR "/data/no-such-file.png").toString() + "\" ) "; QTest::newRow("remote") << SERVER_ADDR "/colors.png" << true << ""; QTest::newRow("remote not found") << SERVER_ADDR "/no-such-file.png" << true @@ -146,7 +146,7 @@ void tst_qmlgraphicsimage::imageSource() if (remote) TRY_WAIT(obj->status() == QmlGraphicsImage::Loading); - QCOMPARE(obj->source(), remote ? source : QUrl::fromLocalFile(source)); + QCOMPARE(obj->source(), remote ? source : QUrl(source)); if (error.isEmpty()) { TRY_WAIT(obj->status() == QmlGraphicsImage::Ready); @@ -165,7 +165,7 @@ void tst_qmlgraphicsimage::clearSource() { QString componentStr = "import Qt 4.6\nImage { source: srcImage }"; QmlContext *ctxt = engine.rootContext(); - ctxt->setContextProperty("srcImage", SRCDIR "/data/colors.png"); + ctxt->setContextProperty("srcImage", QUrl::fromLocalFile(SRCDIR "/data/colors.png")); QmlComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QmlGraphicsImage *obj = qobject_cast(component.create()); -- cgit v0.12