summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2010-08-31 03:23:40 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2010-08-31 03:23:40 (GMT)
commit33b1332d1b8593f488cf5f926315a6df68eee7df (patch)
tree93e8337a555e343b281b62994b6848b4e564fbb4 /tests/auto
parent3928cb20ecc63ed21cdb122388b200c9ab8e7cad (diff)
downloadQt-33b1332d1b8593f488cf5f926315a6df68eee7df.zip
Qt-33b1332d1b8593f488cf5f926315a6df68eee7df.tar.gz
Qt-33b1332d1b8593f488cf5f926315a6df68eee7df.tar.bz2
Revert "Add 'cached' property to Image."
This will have to go in 4.8. This reverts commit 3928cb20ecc63ed21cdb122388b200c9ab8e7cad.
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp29
1 files changed, 9 insertions, 20 deletions
diff --git a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
index 524736f..8cfb487 100644
--- a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
+++ b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
@@ -127,21 +127,19 @@ void tst_qdeclarativeimage::imageSource_data()
QTest::addColumn<double>("height");
QTest::addColumn<bool>("remote");
QTest::addColumn<bool>("async");
- QTest::addColumn<bool>("cached");
QTest::addColumn<QString>("error");
- QTest::newRow("local") << QUrl::fromLocalFile(SRCDIR "/data/colors.png").toString() << 120.0 << 120.0 << false << false << true << "";
- QTest::newRow("local no cache") << QUrl::fromLocalFile(SRCDIR "/data/colors.png").toString() << 120.0 << 120.0 << false << false << false << "";
- QTest::newRow("local async") << QUrl::fromLocalFile(SRCDIR "/data/colors1.png").toString() << 120.0 << 120.0 << false << true << true << "";
+ QTest::newRow("local") << QUrl::fromLocalFile(SRCDIR "/data/colors.png").toString() << 120.0 << 120.0 << false << false << "";
+ QTest::newRow("local async") << QUrl::fromLocalFile(SRCDIR "/data/colors1.png").toString() << 120.0 << 120.0 << false << true << "";
QTest::newRow("local not found") << QUrl::fromLocalFile(SRCDIR "/data/no-such-file.png").toString() << 0.0 << 0.0 << false
- << false << true << "file::2:1: QML Image: Cannot open: " + QUrl::fromLocalFile(SRCDIR "/data/no-such-file.png").toString();
+ << false << "file::2:1: QML Image: Cannot open: " + QUrl::fromLocalFile(SRCDIR "/data/no-such-file.png").toString();
QTest::newRow("local async not found") << QUrl::fromLocalFile(SRCDIR "/data/no-such-file-1.png").toString() << 0.0 << 0.0 << false
- << true << true << "file::2:1: QML Image: Cannot open: " + QUrl::fromLocalFile(SRCDIR "/data/no-such-file-1.png").toString();
- QTest::newRow("remote") << SERVER_ADDR "/colors.png" << 120.0 << 120.0 << true << false << true << "";
- QTest::newRow("remote redirected") << SERVER_ADDR "/oldcolors.png" << 120.0 << 120.0 << true << false << false << "";
- QTest::newRow("remote svg") << SERVER_ADDR "/heart.svg" << 550.0 << 500.0 << true << false << false << "";
+ << true << "file::2:1: QML Image: Cannot open: " + QUrl::fromLocalFile(SRCDIR "/data/no-such-file-1.png").toString();
+ QTest::newRow("remote") << SERVER_ADDR "/colors.png" << 120.0 << 120.0 << true << false << "";
+ QTest::newRow("remote redirected") << SERVER_ADDR "/oldcolors.png" << 120.0 << 120.0 << true << false << "";
+ QTest::newRow("remote svg") << SERVER_ADDR "/heart.svg" << 550.0 << 500.0 << true << false << "";
QTest::newRow("remote not found") << SERVER_ADDR "/no-such-file.png" << 0.0 << 0.0 << true
- << false << true << "file::2:1: QML Image: Error downloading " SERVER_ADDR "/no-such-file.png - server replied: Not found";
+ << false << "file::2:1: QML Image: Error downloading " SERVER_ADDR "/no-such-file.png - server replied: Not found";
}
@@ -152,7 +150,6 @@ void tst_qdeclarativeimage::imageSource()
QFETCH(double, height);
QFETCH(bool, remote);
QFETCH(bool, async);
- QFETCH(bool, cached);
QFETCH(QString, error);
TestHTTPServer server(SERVER_PORT);
@@ -166,8 +163,7 @@ void tst_qdeclarativeimage::imageSource()
QTest::ignoreMessage(QtWarningMsg, error.toUtf8());
QString componentStr = "import Qt 4.7\nImage { source: \"" + source + "\"; asynchronous: "
- + (async ? QLatin1String("true") : QLatin1String("false")) + "; cached: "
- + (cached ? QLatin1String("true") : QLatin1String("false")) + " }";
+ + (async ? QLatin1String("true") : QLatin1String("false")) + " }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeImage *obj = qobject_cast<QDeclarativeImage*>(component.create());
@@ -175,13 +171,6 @@ void tst_qdeclarativeimage::imageSource()
if (async)
QVERIFY(obj->asynchronous() == true);
- else
- QVERIFY(obj->asynchronous() == false);
-
- if (cached)
- QVERIFY(obj->cached() == true);
- else
- QVERIFY(obj->cached() == false);
if (remote || async)
TRY_WAIT(obj->status() == QDeclarativeImage::Loading);