summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qmlpixmapcache.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-12-14 07:33:04 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-12-14 07:33:04 (GMT)
commit690b72b7c3707f3a8f0120c35f3a4c34b58ff596 (patch)
tree2d452f2eaa9a7b56f42f34e9d912e8d1c62be4cc /src/declarative/util/qmlpixmapcache.cpp
parent087bfb51618e8a02a3fad263a963c3485d08294a (diff)
downloadQt-690b72b7c3707f3a8f0120c35f3a4c34b58ff596.zip
Qt-690b72b7c3707f3a8f0120c35f3a4c34b58ff596.tar.gz
Qt-690b72b7c3707f3a8f0120c35f3a4c34b58ff596.tar.bz2
Fix image and pixmapcache tests.
Diffstat (limited to 'src/declarative/util/qmlpixmapcache.cpp')
-rw-r--r--src/declarative/util/qmlpixmapcache.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/declarative/util/qmlpixmapcache.cpp b/src/declarative/util/qmlpixmapcache.cpp
index 0115a7c..99bcb7b 100644
--- a/src/declarative/util/qmlpixmapcache.cpp
+++ b/src/declarative/util/qmlpixmapcache.cpp
@@ -262,6 +262,8 @@ void QmlPixmapReply::networkRequestDone()
if (d->reply->error()) {
d->pixmap = QPixmap();
d->status = Error;
+ QPixmapCache::insert(d->urlKey, d->pixmap);
+ qWarning() << "Network error loading" << d->urlKey << d->reply->errorString();
emit finished();
} else {
qmlImageReader()->read(this);
@@ -278,11 +280,11 @@ bool QmlPixmapReply::event(QEvent *event)
d->status = de->error ? Error : Ready;
if (d->status == Ready) {
d->pixmap = QPixmap::fromImage(de->image);
- QPixmapCache::insert(d->urlKey, d->pixmap);
d->image = QImage();
} else {
qWarning() << "Error decoding" << d->urlKey;
}
+ QPixmapCache::insert(d->urlKey, d->pixmap);
emit finished();
}
return true;