summaryrefslogtreecommitdiffstats
path: root/src/plugins/imageformats
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-05-12 02:20:00 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-05-12 03:57:44 (GMT)
commit1e992df9dfa4abcd5073f94da765c5e47b2f0319 (patch)
tree3d925f2cf75bc178b93fce11bbcfe774ae435329 /src/plugins/imageformats
parentd412a77d1e9a1c6810e10dfa4a0a35a81391cf29 (diff)
downloadQt-1e992df9dfa4abcd5073f94da765c5e47b2f0319.zip
Qt-1e992df9dfa4abcd5073f94da765c5e47b2f0319.tar.gz
Qt-1e992df9dfa4abcd5073f94da765c5e47b2f0319.tar.bz2
Stop GIF handler claiming it can report Size for sequential devices,
since it scans the entire image to do so (and then can't read the image). Task-number: QTBUG-10621
Diffstat (limited to 'src/plugins/imageformats')
-rw-r--r--src/plugins/imageformats/gif/qgifhandler.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/imageformats/gif/qgifhandler.cpp b/src/plugins/imageformats/gif/qgifhandler.cpp
index 25d3dfa..8abc2d1 100644
--- a/src/plugins/imageformats/gif/qgifhandler.cpp
+++ b/src/plugins/imageformats/gif/qgifhandler.cpp
@@ -1119,8 +1119,11 @@ bool QGifHandler::write(const QImage &image)
bool QGifHandler::supportsOption(ImageOption option) const
{
- return option == Size
- || option == Animation;
+ if (!device() || device()->isSequential())
+ return option == Animation;
+ else
+ return option == Size
+ || option == Animation;
}
QVariant QGifHandler::option(ImageOption option) const