summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-07-11 10:54:18 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-07-11 18:59:07 +0000
commit9423be1f190bd7cdeb04add39f4ec621a33a3041 (patch)
tree79ef14150609300a4453b6a8cacf608d6cb3ea39 /src/gui
parentecac1aeb29f37a080d4f2d3614bfc5fcc5b70689 (diff)
Fix deprecation warnings
Switch to QImage::sizeInBytes for huge QImage support. Change-Id: I0145f204dd2db6670e199c320fff9064b4a97ef4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qimage.h2
-rw-r--r--src/gui/image/qimage_darwin.mm2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/image/qimage.h b/src/gui/image/qimage.h
index 7ad44cc33e..eccff480bb 100644
--- a/src/gui/image/qimage.h
+++ b/src/gui/image/qimage.h
@@ -471,7 +471,7 @@ inline void QImage::setNumColors(int n)
inline int QImage::numBytes() const
{
- return byteCount();
+ return int(sizeInBytes());
}
#endif
diff --git a/src/gui/image/qimage_darwin.mm b/src/gui/image/qimage_darwin.mm
index 3764bef06b..a5c391ad21 100644
--- a/src/gui/image/qimage_darwin.mm
+++ b/src/gui/image/qimage_darwin.mm
@@ -130,7 +130,7 @@ CGImageRef QImage::toCGImage() const
auto deleter = [](void *image, const void *, size_t)
{ delete static_cast<QImage *>(image); };
QCFType<CGDataProviderRef> dataProvider =
- CGDataProviderCreateWithData(new QImage(*this), bits(), byteCount(), deleter);
+ CGDataProviderCreateWithData(new QImage(*this), bits(), sizeInBytes(), deleter);
QCFType<CGColorSpaceRef> colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceSRGB);