summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/declarative/util/qdeclarativepixmapcache.cpp3
-rw-r--r--tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp4
2 files changed, 2 insertions, 5 deletions
diff --git a/src/declarative/util/qdeclarativepixmapcache.cpp b/src/declarative/util/qdeclarativepixmapcache.cpp
index f729ced..00dd922 100644
--- a/src/declarative/util/qdeclarativepixmapcache.cpp
+++ b/src/declarative/util/qdeclarativepixmapcache.cpp
@@ -952,10 +952,9 @@ void QDeclarativePixmap::load(QDeclarativeEngine *engine, const QUrl &url, const
if (iter == store->m_cache.end()) {
if (async) {
+ // pixmaps can only be loaded synchronously
if (url.scheme() == QLatin1String("image")
&& QDeclarativeEnginePrivate::get(engine)->getImageProviderType(url) == QDeclarativeImageProvider::Pixmap) {
- qWarning().nospace() << "Pixmaps must be loaded synchronously, ignoring asynchronous property for Image with source: "
- << url.toString();
async = false;
}
}
diff --git a/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp b/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp
index 9d62f22..e0b46f0 100644
--- a/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp
+++ b/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp
@@ -256,9 +256,7 @@ void tst_qdeclarativeimageprovider::requestPixmap_async()
engine.addImageProvider("test", provider);
QVERIFY(engine.imageProvider("test") != 0);
- QTest::ignoreMessage(QtWarningMsg,
- "Pixmaps must be loaded synchronously, ignoring asynchronous property for Image with source: \"image://test/pixmap-async-test.png\"");
-
+ // pixmaps are loaded synchronously regardless of 'asynchronous' value
QString componentStr = "import Qt 4.7\nImage { asynchronous: true; source: \"image://test/pixmap-async-test.png\" }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));