diff options
author | Hendrick Melo <hmelo@gentuity.com> | 2017-03-14 13:45:49 -0400 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2017-04-04 16:25:33 +0000 |
commit | 6b52039866db6629747faa0aa1b57c206ed1cd6f (patch) | |
tree | f7188b7912853de5a038602967ee5cdda4dcbbeb /src | |
parent | 83486f362b02070e29b408be3a9673a0b04dc424 (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/image/qbmphandler.cpp | 6 | ||||
-rw-r--r-- | src/gui/image/qbmphandler_p.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp index 9545abfd21..324fe01414 100644 --- a/src/gui/image/qbmphandler.cpp +++ b/src/gui/image/qbmphandler.cpp @@ -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); diff --git a/src/gui/image/qbmphandler_p.h b/src/gui/image/qbmphandler_p.h index 7d3cbab322..3e1fc3d511 100644 --- a/src/gui/image/qbmphandler_p.h +++ b/src/gui/image/qbmphandler_p.h @@ -121,7 +121,7 @@ private: State state; BMP_FILEHDR fileHeader; BMP_INFOHDR infoHeader; - int startpos; + qint64 startpos; }; QT_END_NAMESPACE |