Commit eec8ed48 authored by Friedemann Kleint's avatar Friedemann Kleint Committed by The Qt Project
Browse files

TGA-Reader: Bail out of check if the device is not seekable.


Suppress warning
'QIODevice::seek: Cannot call seek on a sequential device'
which is emitted further down when attempting to restore
the position of the file.

Task-number: QTBUG-31081
Change-Id: Ib6a4b3eecaa61905a29020e5dd428f1516bfba7f
Reviewed-by: default avatarSamuel Rødal <samuel.rodal@digia.com>
parent f293cc85
Branches
Tags
No related merge requests found
Showing with 2 additions and 0 deletions
...@@ -80,6 +80,8 @@ bool QTgaHandler::canRead(QIODevice *device) ...@@ -80,6 +80,8 @@ bool QTgaHandler::canRead(QIODevice *device)
// TGA reader implementation needs a seekable QIODevice, so // TGA reader implementation needs a seekable QIODevice, so
// sequential devices are not supported // sequential devices are not supported
if (device->isSequential())
return false;
qint64 pos = device->pos(); qint64 pos = device->pos();
bool isValid; bool isValid;
{ {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment