summaryrefslogtreecommitdiffstats
path: root/src/plugins/imageformats
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2010-06-16 08:17:02 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2010-06-16 08:17:02 (GMT)
commit8cb10f381af7fd6f1fa0ffc946f6a4e6ba106d5d (patch)
treec328303e395088f88ba721e96bd6e09a008ad581 /src/plugins/imageformats
parent71e333de0c258796a924b1d858253381d689cf19 (diff)
parentbb8142436bacf5a4fa31880b58a8b3b6bc7b4d5b (diff)
downloadQt-8cb10f381af7fd6f1fa0ffc946f6a4e6ba106d5d.zip
Qt-8cb10f381af7fd6f1fa0ffc946f6a4e6ba106d5d.tar.gz
Qt-8cb10f381af7fd6f1fa0ffc946f6a4e6ba106d5d.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into qt-4.7-from-4.6
Conflicts: src/plugins/imageformats/gif/qgifhandler.cpp
Diffstat (limited to 'src/plugins/imageformats')
-rw-r--r--src/plugins/imageformats/gif/qgifhandler.cpp4
-rw-r--r--src/plugins/imageformats/jpeg/qjpeghandler.cpp10
-rw-r--r--src/plugins/imageformats/mng/qmnghandler.cpp8
3 files changed, 12 insertions, 10 deletions
diff --git a/src/plugins/imageformats/gif/qgifhandler.cpp b/src/plugins/imageformats/gif/qgifhandler.cpp
index 2da822d..591e40b 100644
--- a/src/plugins/imageformats/gif/qgifhandler.cpp
+++ b/src/plugins/imageformats/gif/qgifhandler.cpp
@@ -1061,12 +1061,12 @@ bool QGifHandler::imageIsComing() const
bool QGifHandler::canRead() const
{
- if (canRead(device())) {
+ if (canRead(device()) || imageIsComing()) {
setFormat("gif");
return true;
}
- return imageIsComing();
+ return false;
}
bool QGifHandler::canRead(QIODevice *device)
diff --git a/src/plugins/imageformats/jpeg/qjpeghandler.cpp b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
index 72dde15..60e7cce 100644
--- a/src/plugins/imageformats/jpeg/qjpeghandler.cpp
+++ b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
@@ -802,13 +802,15 @@ QJpegHandler::~QJpegHandler()
bool QJpegHandler::canRead() const
{
- if(d->state == QJpegHandlerPrivate::Ready) {
- if (!canRead(device()))
- return false;
+ if(d->state == QJpegHandlerPrivate::Ready && !canRead(device()))
+ return false;
+
+ if (d->state != QJpegHandlerPrivate::Error) {
setFormat("jpeg");
return true;
}
- return d->state != QJpegHandlerPrivate::Error;
+
+ return false;
}
bool QJpegHandler::canRead(QIODevice *device)
diff --git a/src/plugins/imageformats/mng/qmnghandler.cpp b/src/plugins/imageformats/mng/qmnghandler.cpp
index 9dbb885..ec442a1 100644
--- a/src/plugins/imageformats/mng/qmnghandler.cpp
+++ b/src/plugins/imageformats/mng/qmnghandler.cpp
@@ -380,10 +380,10 @@ QMngHandler::~QMngHandler()
bool QMngHandler::canRead() const
{
Q_D(const QMngHandler);
- if (!d->haveReadNone)
- return (!d->haveReadAll || (d->haveReadAll && (d->nextIndex < d->frameCount)));
-
- if (canRead(device())) {
+ if ((!d->haveReadNone
+ && (!d->haveReadAll || (d->haveReadAll && (d->nextIndex < d->frameCount))))
+ || canRead(device()))
+ {
setFormat("mng");
return true;
}