summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlgraphicsloader
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-02-08 03:51:58 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-02-08 03:51:58 (GMT)
commit8569659ae74091d174fbf55ea3b4897b5a8f477d (patch)
treea9761db66717eb3b8068a67e0dd5a4b3626a3622 /tests/auto/declarative/qmlgraphicsloader
parentac84b4382c4ba5c81ad48c6774ce0dda74cfd83f (diff)
downloadQt-8569659ae74091d174fbf55ea3b4897b5a8f477d.zip
Qt-8569659ae74091d174fbf55ea3b4897b5a8f477d.tar.gz
Qt-8569659ae74091d174fbf55ea3b4897b5a8f477d.tar.bz2
Use QUrl::fromLocalFile() instead of "file://" (i.e. only 2 slashes).
Was causing some test failures on Windows.
Diffstat (limited to 'tests/auto/declarative/qmlgraphicsloader')
-rw-r--r--tests/auto/declarative/qmlgraphicsloader/tst_qmlgraphicsloader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/declarative/qmlgraphicsloader/tst_qmlgraphicsloader.cpp b/tests/auto/declarative/qmlgraphicsloader/tst_qmlgraphicsloader.cpp
index ffd46a9..25543a9 100644
--- a/tests/auto/declarative/qmlgraphicsloader/tst_qmlgraphicsloader.cpp
+++ b/tests/auto/declarative/qmlgraphicsloader/tst_qmlgraphicsloader.cpp
@@ -97,7 +97,7 @@ void tst_QmlGraphicsLoader::url()
QmlGraphicsLoader *loader = qobject_cast<QmlGraphicsLoader*>(component.create());
QVERIFY(loader != 0);
QVERIFY(loader->item());
- QVERIFY(loader->source() == QUrl("file://" SRCDIR "/data/Rect120x60.qml"));
+ QVERIFY(loader->source() == QUrl::fromLocalFile(SRCDIR "/data/Rect120x60.qml"));
QCOMPARE(loader->progress(), 1.0);
QCOMPARE(loader->status(), QmlGraphicsLoader::Ready);
QCOMPARE(static_cast<QGraphicsItem*>(loader)->children().count(), 1);
@@ -123,7 +123,7 @@ void tst_QmlGraphicsLoader::component()
void tst_QmlGraphicsLoader::invalidUrl()
{
- QTest::ignoreMessage(QtWarningMsg, "(:-1: File error for URL file://" SRCDIR "/data/IDontExist.qml) ");
+ QTest::ignoreMessage(QtWarningMsg, QString("(:-1: File error for URL " + QUrl::fromLocalFile(SRCDIR "/data/IDontExist.qml").toString() + ") ").toUtf8().constData());
QmlComponent component(&engine);
component.setData(QByteArray("import Qt 4.6\nLoader { source: \"IDontExist.qml\" }"), TEST_FILE(""));