diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2017-08-21 13:21:02 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-08-22 12:08:50 +0000 |
commit | 1bc66d7e267537def4fe7031df9021497350f2d9 (patch) | |
tree | 06729ca836e36315aa6156bd81ed80edc2c38078 | |
parent | 4749cb895b99e3643259fe388ba386203554a9b3 (diff) |
Don't call deprecated QImage::byteSize() function
Change-Id: Ib2c1150e4612b378e5b04d0ea424f38af2c434c2
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
-rw-r--r-- | src/extras/text/qtextureatlas.cpp | 2 | ||||
-rw-r--r-- | src/render/texture/qtextureimagedata.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/extras/text/qtextureatlas.cpp b/src/extras/text/qtextureatlas.cpp index bc29537da..1f4b22d83 100644 --- a/src/extras/text/qtextureatlas.cpp +++ b/src/extras/text/qtextureatlas.cpp @@ -117,7 +117,7 @@ QByteArray QTextureAtlasData::createUpdatedImageData() } } - return QByteArray(reinterpret_cast<const char*>(m_image.constBits()), m_image.byteCount()); + return QByteArray(reinterpret_cast<const char*>(m_image.constBits()), m_image.sizeInBytes()); } QTextureAtlasPrivate::QTextureAtlasPrivate() diff --git a/src/render/texture/qtextureimagedata.cpp b/src/render/texture/qtextureimagedata.cpp index c9057608e..c31f272a8 100644 --- a/src/render/texture/qtextureimagedata.cpp +++ b/src/render/texture/qtextureimagedata.cpp @@ -370,7 +370,7 @@ void QTextureImageData::setImage(const QImage &image) Q_ASSERT_X(glImage.bytesPerLine() == (glImage.width() * glImage.depth() + 7) / 8, "QTextureImageData::setImage", "glImage is not packed"); // QTBUG-48330 d->m_blockSize = 4; - QByteArray imageBytes((const char*) glImage.constBits(), glImage.byteCount()); + QByteArray imageBytes((const char*) glImage.constBits(), glImage.sizeInBytes()); setData(imageBytes, d->m_blockSize, false); d->m_format = QOpenGLTexture::RGBA8_UNorm; d->m_pixelFormat = QOpenGLTexture::RGBA; |