qbmphandler fix: use qint64 for caching QIODevice file position
Changed the file position and offset types so they can properly handle files larger than the 32bit limit Task-number: QTBUG-59493 Change-Id: I00e1741c7682c4c79f35fef808fe1ea26e67c8b5 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Hendrick Melobb10
parent
83486f362b
commit
6b52039866
|
|
@ -183,14 +183,14 @@ static bool read_dib_infoheader(QDataStream &s, BMP_INFOHDR &bi)
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int startpos, QImage &image)
|
||||
static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, qint64 offset, qint64 startpos, QImage &image)
|
||||
{
|
||||
QIODevice* d = s.device();
|
||||
if (d->atEnd()) // end of stream/file
|
||||
return false;
|
||||
#if 0
|
||||
qDebug("offset...........%d", offset);
|
||||
qDebug("startpos.........%d", startpos);
|
||||
qDebug("offset...........%lld", offset);
|
||||
qDebug("startpos.........%lld", startpos);
|
||||
qDebug("biSize...........%d", bi.biSize);
|
||||
qDebug("biWidth..........%d", bi.biWidth);
|
||||
qDebug("biHeight.........%d", bi.biHeight);
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ private:
|
|||
State state;
|
||||
BMP_FILEHDR fileHeader;
|
||||
BMP_INFOHDR infoHeader;
|
||||
int startpos;
|
||||
qint64 startpos;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
|||
Loading…
Reference in New Issue