summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-02-11 05:55:29 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-02-11 05:55:29 (GMT)
commit4684e5af8fd7ebd5a6dff45fc18e5ea7a9b60bc6 (patch)
tree619fa9b8d0928e0b9b95262390298ee050271aaa /tests/auto
parent9496b85f5ac9c6464bf0e56c560618e6ee2a129d (diff)
downloadQt-4684e5af8fd7ebd5a6dff45fc18e5ea7a9b60bc6.zip
Qt-4684e5af8fd7ebd5a6dff45fc18e5ea7a9b60bc6.tar.gz
Qt-4684e5af8fd7ebd5a6dff45fc18e5ea7a9b60bc6.tar.bz2
Fix Image test on Windows.
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/declarative/qmlgraphicsimage/tst_qmlgraphicsimage.cpp8
1 files 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<bool>("remote");
QTest::addColumn<QString>("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<QmlGraphicsImage*>(component.create());