From 6fcce03cfd85fffbe6d7701506de49c5987fdbe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernhard=20Rosenkr=C3=A4nzer?= Date: Thu, 18 May 2023 02:03:56 +0200 Subject: [PATCH] Fix build with exiv2 >= 0.28 --- src/extractors/exiv2extractor.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/extractors/exiv2extractor.cpp b/src/extractors/exiv2extractor.cpp index d39247b9..469a6325 100644 --- a/src/extractors/exiv2extractor.cpp +++ b/src/extractors/exiv2extractor.cpp @@ -75,7 +75,11 @@ QVariant toVariantDateTime(const Exiv2::Value& value) QVariant toVariantLong(const Exiv2::Value& value) { if (value.typeId() == Exiv2::unsignedLong || value.typeId() == Exiv2::signedLong) { +#if EXIV2_TEST_VERSION(0,28,0) + qlonglong val = value.toInt64(); +#else qlonglong val = value.toLong(); +#endif return QVariant(val); } @@ -310,7 +314,11 @@ double Exiv2Extractor::fetchGpsAltitude(const Exiv2::ExifData& data) it = data.findKey(Exiv2::ExifKey("Exif.GPSInfo.GPSAltitudeRef")); if (it != data.end() && it->count() > 0 && (it->value().typeId() == Exiv2::unsignedByte || it->value().typeId() == Exiv2::signedByte)) { +#if EXIV2_TEST_VERSION(0,28,0) + auto altRef = it->value().toInt64(); +#else auto altRef = it->value().toLong(); +#endif if (altRef) { alt = -1.0 * ratio.first / ratio.second; } else { -- GitLab