diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-07-08 05:33:37 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-07-08 05:35:49 (GMT) |
commit | a2ee0cfd799f563f292e6b40ca460e05819fd0fd (patch) | |
tree | 6e5ea43a576bf3e3fae5ac5ee4d9b08942ecdd80 | |
parent | 33b664eabe5d9621d71e5bf3bfcc46ea385a399c (diff) | |
download | Qt-a2ee0cfd799f563f292e6b40ca460e05819fd0fd.zip Qt-a2ee0cfd799f563f292e6b40ca460e05819fd0fd.tar.gz Qt-a2ee0cfd799f563f292e6b40ca460e05819fd0fd.tar.bz2 |
Don't show warning for attempts to load pixmaps asynchronously
(should be handled by image providers, elements shouldn't have to know
about the capabilities)
-rw-r--r-- | src/declarative/util/qdeclarativepixmapcache.cpp | 3 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp | 4 |
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("")); |