From eced6aaed18b9704fd5fed59a9c7dd86ae915863 Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 8 Jun 2020 13:42:10 +0200 Subject: [PATCH] Qt5: 'int QImage::byteCount() const' is deprecated since Qt 5.10: Use sizeInBytes [-Wdeprecated-declarations] --- src/Gui/BitmapFactory.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Gui/BitmapFactory.cpp b/src/Gui/BitmapFactory.cpp index 3fbfbf84a3..32dc01b75f 100644 --- a/src/Gui/BitmapFactory.cpp +++ b/src/Gui/BitmapFactory.cpp @@ -621,7 +621,11 @@ void BitmapFactoryInst::convert(const QImage& p, SoSFImage& img) const size[0] = p.width(); size[1] = p.height(); +#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) + int buffersize = static_cast(p.sizeInBytes()); +#else int buffersize = p.byteCount(); +#endif int numcomponents = 0; QVector table = p.colorTable(); if (!table.isEmpty()) {