diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-08-21 09:57:31 +0200 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2019-09-04 11:50:53 +0300 |
commit | 5233c75b3f6c73623c5473b2d6573f31f3ddb4b7 (patch) | |
tree | 3b0b4001141bc444dd375aeedf626987686eb2a6 /platform/qt/src/qt_image.cpp | |
parent | 4b85252fbe811a786c6ee9eabedb7639b031dc53 (diff) | |
download | qtlocation-mapboxgl-5233c75b3f6c73623c5473b2d6573f31f3ddb4b7.tar.gz |
[qt] Fix Qt version comparison
Because the version is represented in hex, 0x051000 is not the same
as Qt 5.10, which means that the deprecated code will be enabled
for versions smaller than 5.16.
Diffstat (limited to 'platform/qt/src/qt_image.cpp')
-rw-r--r-- | platform/qt/src/qt_image.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/qt/src/qt_image.cpp b/platform/qt/src/qt_image.cpp index a5c92514c1..8fff1e88b6 100644 --- a/platform/qt/src/qt_image.cpp +++ b/platform/qt/src/qt_image.cpp @@ -54,7 +54,7 @@ PremultipliedImage decodeImage(const std::string& string) { throw std::runtime_error("Unsupported image type"); } -#if QT_VERSION >= 0x051000 +#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) auto img = std::make_unique<uint8_t[]>(image.sizeInBytes()); memcpy(img.get(), image.constBits(), image.sizeInBytes()); #else |