From 0ca1fc173818c155b3679b76da208fa9a2185ea1 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Tue, 24 Jun 2014 15:42:47 +0200 Subject: GIF decoding: do not seek() if the image is loaded over the network This suppresses the warning QIODevice::seek: Cannot call seek on a sequential device Task-number: QTBUG-39217 Change-Id: Ie7b0845c760ae6fc857d02bf9ec5c5adb24fb631 Reviewed-by: aavit --- src/gui/image/qgifhandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/gui/image/qgifhandler.cpp b/src/gui/image/qgifhandler.cpp index 19b838240f..91588edd50 100644 --- a/src/gui/image/qgifhandler.cpp +++ b/src/gui/image/qgifhandler.cpp @@ -674,7 +674,7 @@ void QGIFFormat::scan(QIODevice *device, QVector *imageSizes, int *loopCo return; qint64 oldPos = device->pos(); - if (!device->seek(0)) + if (device->isSequential() || !device->seek(0)) return; int colorCount = 0; -- cgit v1.2.3