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 Melo
bb10
Hendrick Melo 2017-03-14 13:45:49 -04:00 committed by Marc Mutz
parent 83486f362b
commit 6b52039866
2 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -121,7 +121,7 @@ private:
State state;
BMP_FILEHDR fileHeader;
BMP_INFOHDR infoHeader;
int startpos;
qint64 startpos;
};
QT_END_NAMESPACE