diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-05-12 03:18:32 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-05-12 03:57:44 (GMT) |
commit | b3a06e47bc66c36de8558ab7bc9817ed2518ae9c (patch) | |
tree | cd388160bc727b80136aa90c560df45c9bc55bd2 /src/declarative/util | |
parent | 1e992df9dfa4abcd5073f94da765c5e47b2f0319 (diff) | |
download | Qt-b3a06e47bc66c36de8558ab7bc9817ed2518ae9c.zip Qt-b3a06e47bc66c36de8558ab7bc9817ed2518ae9c.tar.gz Qt-b3a06e47bc66c36de8558ab7bc9817ed2518ae9c.tar.bz2 |
Don't pass sequential (QNetworkReply) to image reader, it doesn't work well enough.
Work around QTBUG-10622
Diffstat (limited to 'src/declarative/util')
-rw-r--r-- | src/declarative/util/qdeclarativepixmapcache.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/declarative/util/qdeclarativepixmapcache.cpp b/src/declarative/util/qdeclarativepixmapcache.cpp index dbca326..d9ce42c 100644 --- a/src/declarative/util/qdeclarativepixmapcache.cpp +++ b/src/declarative/util/qdeclarativepixmapcache.cpp @@ -55,6 +55,7 @@ #include <QFile> #include <QThread> #include <QMutex> +#include <QBuffer> #include <QWaitCondition> #include <QtCore/qdebug.h> #include <private/qobject_p.h> @@ -342,7 +343,10 @@ void QDeclarativeImageRequestHandler::networkRequestDone() errorString = reply->errorString(); } else { QSize read_impsize; - if (readImage(reply->url(), reply, &image, &errorString, &read_impsize, job->forcedWidth(), job->forcedHeight())) { + QByteArray all = reply->readAll(); + QBuffer buff(&all); + buff.open(QIODevice::ReadOnly); + if (readImage(reply->url(), &buff, &image, &errorString, &read_impsize, job->forcedWidth(), job->forcedHeight())) { qmlOriginalSizes()->insert(reply->url(), read_impsize); error = QDeclarativeImageReaderEvent::NoError; } else { |