diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-02-08 03:51:58 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-02-08 03:51:58 (GMT) |
commit | 8569659ae74091d174fbf55ea3b4897b5a8f477d (patch) | |
tree | a9761db66717eb3b8068a67e0dd5a4b3626a3622 /tests/auto/declarative/animatedimage | |
parent | ac84b4382c4ba5c81ad48c6774ce0dda74cfd83f (diff) | |
download | Qt-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/animatedimage')
-rw-r--r-- | tests/auto/declarative/animatedimage/tst_animatedimage.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/declarative/animatedimage/tst_animatedimage.cpp b/tests/auto/declarative/animatedimage/tst_animatedimage.cpp index 20b344d..c4865d2 100644 --- a/tests/auto/declarative/animatedimage/tst_animatedimage.cpp +++ b/tests/auto/declarative/animatedimage/tst_animatedimage.cpp @@ -78,7 +78,7 @@ private slots: void tst_animatedimage::play() { QmlEngine engine; - QmlComponent component(&engine, QUrl("file://" SRCDIR "/data/stickman.qml")); + QmlComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/stickman.qml")); QmlGraphicsAnimatedImage *anim = qobject_cast<QmlGraphicsAnimatedImage *>(component.create()); QVERIFY(anim); QVERIFY(anim->isPlaying()); @@ -89,7 +89,7 @@ void tst_animatedimage::play() void tst_animatedimage::pause() { QmlEngine engine; - QmlComponent component(&engine, QUrl("file://" SRCDIR "/data/stickmanpause.qml")); + QmlComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/stickmanpause.qml")); QmlGraphicsAnimatedImage *anim = qobject_cast<QmlGraphicsAnimatedImage *>(component.create()); QVERIFY(anim); QVERIFY(anim->isPlaying()); @@ -101,7 +101,7 @@ void tst_animatedimage::pause() void tst_animatedimage::stopped() { QmlEngine engine; - QmlComponent component(&engine, QUrl("file://" SRCDIR "/data/stickmanstopped.qml")); + QmlComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/stickmanstopped.qml")); QmlGraphicsAnimatedImage *anim = qobject_cast<QmlGraphicsAnimatedImage *>(component.create()); QVERIFY(anim); QVERIFY(!anim->isPlaying()); @@ -113,7 +113,7 @@ void tst_animatedimage::stopped() void tst_animatedimage::setFrame() { QmlEngine engine; - QmlComponent component(&engine, QUrl("file://" SRCDIR "/data/stickmanpause.qml")); + QmlComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/stickmanpause.qml")); QmlGraphicsAnimatedImage *anim = qobject_cast<QmlGraphicsAnimatedImage *>(component.create()); QVERIFY(anim); QVERIFY(anim->isPlaying()); @@ -125,7 +125,7 @@ void tst_animatedimage::setFrame() void tst_animatedimage::frameCount() { QmlEngine engine; - QmlComponent component(&engine, QUrl("file://" SRCDIR "/data/colors.qml")); + QmlComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/colors.qml")); QmlGraphicsAnimatedImage *anim = qobject_cast<QmlGraphicsAnimatedImage *>(component.create()); QVERIFY(anim); QVERIFY(anim->isPlaying()); @@ -174,7 +174,7 @@ void tst_animatedimage::invalidSource() { QmlEngine engine; QmlComponent component(&engine); - component.setData("import Qt 4.6\n AnimatedImage { source: \"no-such-file.gif\" }", QUrl("file://")); + component.setData("import Qt 4.6\n AnimatedImage { source: \"no-such-file.gif\" }", QUrl::fromLocalFile("")); QVERIFY(component.isReady()); QTest::ignoreMessage(QtWarningMsg, "Error Reading Animated Image File QUrl( \"file:no-such-file.gif\" ) "); |