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 <eirik.aavitsland@digia.com>
This commit is contained in:
Shawn Rutledge 2014-06-24 15:42:47 +02:00
parent 100ed2e91e
commit 0ca1fc1738

View File

@ -674,7 +674,7 @@ void QGIFFormat::scan(QIODevice *device, QVector<QSize> *imageSizes, int *loopCo
return;
qint64 oldPos = device->pos();
if (!device->seek(0))
if (device->isSequential() || !device->seek(0))
return;
int colorCount = 0;