diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-04-15 06:17:39 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-04-15 06:17:39 (GMT) |
commit | c24d3ce5d268e6e91bcecb155e4e2f5bd9c7dadd (patch) | |
tree | ffa44136301cc0f5772bbba48a32f8367f17d9b6 /src/imports | |
parent | aad82abd84022f5401c6b79ab15d24abebf082af (diff) | |
download | Qt-c24d3ce5d268e6e91bcecb155e4e2f5bd9c7dadd.zip Qt-c24d3ce5d268e6e91bcecb155e4e2f5bd9c7dadd.tar.gz Qt-c24d3ce5d268e6e91bcecb155e4e2f5bd9c7dadd.tar.bz2 |
Use qmlInfo for image loading errors, not qWarning().
Task-number: QTBUG-9908
Diffstat (limited to 'src/imports')
-rw-r--r-- | src/imports/particles/qdeclarativeparticles.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/imports/particles/qdeclarativeparticles.cpp b/src/imports/particles/qdeclarativeparticles.cpp index d17a8a1..264cba2 100644 --- a/src/imports/particles/qdeclarativeparticles.cpp +++ b/src/imports/particles/qdeclarativeparticles.cpp @@ -41,6 +41,7 @@ #include "qdeclarativeparticles_p.h" +#include <qdeclarativeinfo.h> #include <private/qdeclarativeitem_p.h> #include <private/qdeclarativepixmapcache_p.h> @@ -730,7 +731,9 @@ void QDeclarativeParticles::imageLoaded() { Q_D(QDeclarativeParticles); d->pendingPixmapCache = false; - QDeclarativePixmapCache::get(d->url, &d->image); + QString errorString; + if (QDeclarativePixmapCache::get(d->url, &d->image, &errorString)==QDeclarativePixmapReply::Error) + qmlInfo(this) << errorString; d->paintItem->updateSize(); d->paintItem->update(); } @@ -754,12 +757,15 @@ void QDeclarativeParticles::setSource(const QUrl &name) } else { d->url = name; Q_ASSERT(!name.isRelative()); - QDeclarativePixmapReply::Status status = QDeclarativePixmapCache::get(d->url, &d->image); + QString errorString; + QDeclarativePixmapReply::Status status = QDeclarativePixmapCache::get(d->url, &d->image, &errorString); if (status != QDeclarativePixmapReply::Ready && status != QDeclarativePixmapReply::Error) { QDeclarativePixmapReply *reply = QDeclarativePixmapCache::request(qmlEngine(this), d->url); connect(reply, SIGNAL(finished()), this, SLOT(imageLoaded())); d->pendingPixmapCache = true; } else { + if (status == QDeclarativePixmapReply::Error) + qmlInfo(this) << errorString; //### unify with imageLoaded d->paintItem->updateSize(); d->paintItem->update(); |