diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2016-11-11 13:05:13 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-07-08 08:17:13 +0000 |
commit | 4f88475a962975ca45994cff9add350344fce4f9 (patch) | |
tree | 12884176f4fd5d5a28c7dbb220a0656d3c60daf7 /src/gui/image/qpixmap_blitter.cpp | |
parent | 80c152d6898c1b8727ac14d32437b274153a7089 (diff) |
Allow QImage with more than 2GByte of image data
Changes internal data-size and pointer calculations
to qssize_t.
Adds new sizeInBytes() accessor to read byte size, and
marks the old one deprecated.
Task-number: QTBUG-50912
Change-Id: Idf0c2010542b0ec1c9abef8afd02d6db07f43e6d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/image/qpixmap_blitter.cpp')
-rw-r--r-- | src/gui/image/qpixmap_blitter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/image/qpixmap_blitter.cpp b/src/gui/image/qpixmap_blitter.cpp index 950695a9d7..de32327071 100644 --- a/src/gui/image/qpixmap_blitter.cpp +++ b/src/gui/image/qpixmap_blitter.cpp @@ -190,8 +190,8 @@ void QBlittablePlatformPixmap::fromImage(const QImage &image, uchar *mem = thisImg->bits(); const uchar *bits = correctFormatPic.constBits(); - int bytesCopied = 0; - while (bytesCopied < correctFormatPic.byteCount()) { + qssize_t bytesCopied = 0; + while (bytesCopied < correctFormatPic.sizeInBytes()) { memcpy(mem,bits,correctFormatPic.bytesPerLine()); mem += thisImg->bytesPerLine(); bits += correctFormatPic.bytesPerLine(); |