summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-04-07 10:18:50 +0200
committerLiang Qi <liang.qi@qt.io>2017-04-07 10:24:33 +0200
commit5d6073be27cb951b692bbcc4dc0dd54cc09c9fd4 (patch)
treec87c236cd1b9c15eb5f40df3d86915687ab6c59a /src/gui/image
parent97d7d80e7355019bb23bb03c2a82908e4436deb0 (diff)
parentbbb67ca32cebad312f02e916dff54e591b92af24 (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: mkspecs/linux-icc/qmake.conf mkspecs/macx-icc/qmake.conf mkspecs/win32-icc/qmake.conf src/gui/painting/qgrayraster.c Change-Id: Ib08c45ea3215be05f986ecb3e1f4b37d209aa775
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qbmphandler.cpp6
-rw-r--r--src/gui/image/qbmphandler_p.h2
-rw-r--r--src/gui/image/qimagereader.cpp3
3 files changed, 6 insertions, 5 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
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index 55c3a4704a..cd7c95b166 100644
--- a/src/gui/image/qimagereader.cpp
+++ b/src/gui/image/qimagereader.cpp
@@ -471,7 +471,8 @@ static QImageIOHandler *createReadHandlerHelper(QIODevice *device,
--numFormats;
++currentFormat;
- currentFormat %= _qt_NumFormats;
+ if (currentFormat >= _qt_NumFormats)
+ currentFormat = 0;
}
}