diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-10-21 04:44:26 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-10-21 04:44:26 (GMT) |
commit | 8331e9700b830594d3c015308bf0aa351997862c (patch) | |
tree | c274362e2c6a236af96b6c78d7f8858a939439cb /src | |
parent | 80f031dfca7c161de4461514dfd8d9d664ea2f03 (diff) | |
parent | 3170828ee142be248c1acdee4e6677a7238d6e56 (diff) | |
download | Qt-8331e9700b830594d3c015308bf0aa351997862c.zip Qt-8331e9700b830594d3c015308bf0aa351997862c.tar.gz Qt-8331e9700b830594d3c015308bf0aa351997862c.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml:
Fix network request completion crashing on a canceled pixmap request
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/util/qdeclarativepixmapcache.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/declarative/util/qdeclarativepixmapcache.cpp b/src/declarative/util/qdeclarativepixmapcache.cpp index 4fc52f5..a07b1bb 100644 --- a/src/declarative/util/qdeclarativepixmapcache.cpp +++ b/src/declarative/util/qdeclarativepixmapcache.cpp @@ -93,6 +93,7 @@ public: QDeclarativePixmapData *data; QDeclarativePixmapReader *reader; + QSize requestSize; bool loading; int redirectCount; @@ -366,7 +367,7 @@ void QDeclarativePixmapReader::networkRequestDone(QNetworkReply *reply) QByteArray all = reply->readAll(); QBuffer buff(&all); buff.open(QIODevice::ReadOnly); - if (!readImage(reply->url(), &buff, &image, &errorString, &readSize, job->data->requestSize)) { + if (!readImage(reply->url(), &buff, &image, &errorString, &readSize, job->requestSize)) { error = QDeclarativePixmapReply::Decoding; } } @@ -683,7 +684,7 @@ void QDeclarativePixmapStore::timerEvent(QTimerEvent *) } QDeclarativePixmapReply::QDeclarativePixmapReply(QDeclarativePixmapData *d) -: data(d), reader(0), loading(false), redirectCount(0) +: data(d), reader(0), loading(false), redirectCount(0), requestSize(d->requestSize) { if (finishedIndex == -1) { finishedIndex = QDeclarativePixmapReply::staticMetaObject.indexOfSignal("finished()"); |