summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-02-11 05:43:14 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-02-11 05:43:14 (GMT)
commitd7910592c6acf15384c7ad1d9838cda40f143e6b (patch)
treef66d4d8b0a2bd52b3471eb6225aa01df9d50213c
parent6e2739e2a9a51ed3993964477ef6b232ca947cd4 (diff)
parentb84ee1bd906aebc43b82823426dd01e29b7f5a89 (diff)
downloadQt-d7910592c6acf15384c7ad1d9838cda40f143e6b.zip
Qt-d7910592c6acf15384c7ad1d9838cda40f143e6b.tar.gz
Qt-d7910592c6acf15384c7ad1d9838cda40f143e6b.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-qml
-rw-r--r--tests/auto/declarative/qmlgraphicsborderimage/tst_qmlgraphicsborderimage.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/auto/declarative/qmlgraphicsborderimage/tst_qmlgraphicsborderimage.cpp b/tests/auto/declarative/qmlgraphicsborderimage/tst_qmlgraphicsborderimage.cpp
index b723c6b..1ae0227 100644
--- a/tests/auto/declarative/qmlgraphicsborderimage/tst_qmlgraphicsborderimage.cpp
+++ b/tests/auto/declarative/qmlgraphicsborderimage/tst_qmlgraphicsborderimage.cpp
@@ -119,8 +119,8 @@ void tst_qmlgraphicsborderimage::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
@@ -152,7 +152,7 @@ void tst_qmlgraphicsborderimage::imageSource()
if (remote)
TRY_WAIT(obj->status() == QmlGraphicsBorderImage::Loading);
- QCOMPARE(obj->source(), remote ? source : QUrl::fromLocalFile(source));
+ QCOMPARE(obj->source(), remote ? source : QUrl(source));
if (error.isEmpty()) {
TRY_WAIT(obj->status() == QmlGraphicsBorderImage::Ready);
@@ -172,7 +172,7 @@ void tst_qmlgraphicsborderimage::clearSource()
{
QString componentStr = "import Qt 4.6\nBorderImage { 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(""));
QmlGraphicsBorderImage *obj = qobject_cast<QmlGraphicsBorderImage*>(component.create());
@@ -190,7 +190,7 @@ void tst_qmlgraphicsborderimage::clearSource()
void tst_qmlgraphicsborderimage::resized()
{
- QString componentStr = "import Qt 4.6\nBorderImage { source: \"" SRCDIR "/data/colors.png\"; width: 300; height: 300 }";
+ QString componentStr = "import Qt 4.6\nBorderImage { source: \"" + QUrl::fromLocalFile(SRCDIR "/data/colors.png").toString() + "\"; width: 300; height: 300 }";
QmlComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QmlGraphicsBorderImage *obj = qobject_cast<QmlGraphicsBorderImage*>(component.create());
@@ -271,7 +271,7 @@ void tst_qmlgraphicsborderimage::sciSource()
if (remote)
TRY_WAIT(obj->status() == QmlGraphicsBorderImage::Loading);
- QCOMPARE(obj->source(), remote ? source : QUrl::fromLocalFile(source));
+ QCOMPARE(obj->source(), remote ? source : QUrl(source));
QCOMPARE(obj->width(), 300.);
QCOMPARE(obj->height(), 300.);
@@ -296,8 +296,8 @@ void tst_qmlgraphicsborderimage::sciSource_data()
QTest::addColumn<QString>("source");
QTest::addColumn<bool>("valid");
- QTest::newRow("local") << SRCDIR "/data/colors-round.sci" << true;
- QTest::newRow("local not found") << SRCDIR "/data/no-such-file.sci" << false;
+ QTest::newRow("local") << QUrl::fromLocalFile(SRCDIR "/data/colors-round.sci").toString() << true;
+ QTest::newRow("local not found") << QUrl::fromLocalFile(SRCDIR "/data/no-such-file.sci").toString() << false;
QTest::newRow("remote") << SERVER_ADDR "/colors-round.sci" << true;
QTest::newRow("remote not found") << SERVER_ADDR "/no-such-file.sci" << false;
}
@@ -307,7 +307,7 @@ void tst_qmlgraphicsborderimage::invalidSciFile()
QTest::ignoreMessage(QtWarningMsg, "Unknown tile rule specified. Using Stretch "); // for "Roun"
QTest::ignoreMessage(QtWarningMsg, "Unknown tile rule specified. Using Stretch "); // for "Repea"
- QString componentStr = "import Qt 4.6\nBorderImage { source: \"" SRCDIR "/data/invalid.sci\"; width: 300; height: 300 }";
+ QString componentStr = "import Qt 4.6\nBorderImage { source: \"" + QUrl::fromLocalFile(SRCDIR "/data/invalid.sci").toString() +"\"; width: 300; height: 300 }";
QmlComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QmlGraphicsBorderImage *obj = qobject_cast<QmlGraphicsBorderImage*>(component.create());