pcx: Do not support sequential devices

We need QIODevice::pos() to work in QDataStream &operator>>.

BUG: 459541
This commit is contained in:
Aleix Pol 2022-09-23 18:04:43 +02:00
parent 2f27dff48b
commit a8a477ae67

View File

@ -684,6 +684,12 @@ bool PCXHandler::canRead(QIODevice *device)
return false;
}
// We do not support sequential images
// We need to know the current position to properly read the header
if (device->isSequential()) {
return false;
}
qint64 oldPos = device->pos();
char head[1];