Fixes for sequential devices

This commit is contained in:
Mirco Miranda
2022-10-02 06:01:23 +00:00
committed by Albert Astals Cid
parent 49bd131eef
commit c96ad6ba8a
9 changed files with 137 additions and 67 deletions
+1 -7
View File
@@ -174,7 +174,7 @@ static QDataStream &operator>>(QDataStream &s, PCXHEADER &ph)
// Skip the rest of the header
quint8 byte;
while (s.device()->pos() < 128) {
for (auto i = 0; i < 54; ++i) {
s >> byte;
}
@@ -684,12 +684,6 @@ 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];