Qt: Fix build on Qt < 5.10
Vicki Pfau vi@endrift.com
Sun, 23 Feb 2020 18:08:00 -0800
1 files changed,
6 insertions(+),
0 deletions(-)
M
src/platform/qt/CoreController.cpp
→
src/platform/qt/CoreController.cpp
@@ -689,6 +689,12 @@ file.open(QIODevice::ReadOnly);
m_eReaderData = file.read(2912); } else if (image.size() == QSize(989, 44)) { const uchar* bits = image.constBits(); + size_t size; +#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)) + size = image.sizeInBytes(); +#else + size = image.byteCount(); +#endif m_eReaderData.setRawData(reinterpret_cast<const char*>(bits), image.sizeInBytes()); }