Qt5: 'int QImage::byteCount() const' is deprecated since Qt 5.10: Use sizeInBytes [-Wdeprecated-declarations]

This commit is contained in:
wmayer
2020-06-08 13:42:10 +02:00
committed by wwmayer
parent 58f148a722
commit eced6aaed1

View File

@@ -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<int>(p.sizeInBytes());
#else
int buffersize = p.byteCount();
#endif
int numcomponents = 0;
QVector<QRgb> table = p.colorTable();
if (!table.isEmpty()) {