Skip to content

Commit

Permalink
Qt5: 'int QImage::byteCount() const' is deprecated since Qt 5.10: Use…
Browse files Browse the repository at this point in the history
… sizeInBytes [-Wdeprecated-declarations]
  • Loading branch information
wwmayer committed Jun 12, 2020
1 parent 58f148a commit eced6aa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Gui/BitmapFactory.cpp
Expand Up @@ -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()) {
Expand Down

0 comments on commit eced6aa

Please sign in to comment.