Patch-Source: https://gitlab.archlinux.org/archlinux/packaging/packages/mauikit-imagetools/-/blob/a4c0ad7a40072533b122af9e763c908e66b0a482/exiv2-0.28.patch -- diff --git a/src/code/exiv2extractor.cpp b/src/code/exiv2extractor.cpp index 68ed16f..bd9f5a8 100644 --- a/src/code/exiv2extractor.cpp +++ b/src/code/exiv2extractor.cpp @@ -233,7 +233,11 @@ QVariant Exiv2Extractor::getExifTagVariant(const char* exifTagName, bool rationa case Exiv2::signedShort: case Exiv2::signedLong: if (it->count() > component) +#if EXIV2_TEST_VERSION(0,28,0) + return QVariant((int)it->toUint32(component)); +#else return QVariant((int)it->toLong(component)); +#endif else return QVariant(QVariant::Int); case Exiv2::unsignedRational: @@ -693,8 +697,12 @@ bool Exiv2Extractor::writeTag(const char *tagName, const QVariant &value) return false; qDebug() << "Writting number metadata" << tagName; - + +#if EXIV2_TEST_VERSION(0,28,0) + Exiv2::Value::UniquePtr v = Exiv2::Value::create(Exiv2::signedLongLong); +#else Exiv2::Value::AutoPtr v = Exiv2::Value::create(Exiv2::signedLongLong); +#endif v->read(value.toString().toStdString()); it->setValue(v.get()); break; @@ -707,7 +715,11 @@ bool Exiv2Extractor::writeTag(const char *tagName, const QVariant &value) return false; qDebug() << "Writting rational metadata" << tagName; +#if EXIV2_TEST_VERSION(0,28,0) + Exiv2::RationalValue::UniquePtr rv(new Exiv2::RationalValue); +#else Exiv2::RationalValue::AutoPtr rv(new Exiv2::RationalValue); +#endif rv->read(value.toString().toStdString()); it->setValue(rv.get()); break; @@ -720,7 +732,11 @@ bool Exiv2Extractor::writeTag(const char *tagName, const QVariant &value) return false; auto date = value.toString(); +#if EXIV2_TEST_VERSION(0,28,0) + Exiv2::Value::UniquePtr v = Exiv2::Value::create(Exiv2::asciiString); +#else Exiv2::Value::AutoPtr v = Exiv2::Value::create(Exiv2::asciiString); +#endif v->read(date.toStdString()); it->setValue(v.get()); break; @@ -735,7 +751,11 @@ bool Exiv2Extractor::writeTag(const char *tagName, const QVariant &value) qDebug() << "Writting ascii metadata" << tagName; auto string = value.toString(); +#if EXIV2_TEST_VERSION(0,28,0) + Exiv2::Value::UniquePtr v = Exiv2::Value::create(Exiv2::asciiString); +#else Exiv2::Value::AutoPtr v = Exiv2::Value::create(Exiv2::asciiString); +#endif v->read(string.toStdString()); it->setValue(v.get()); break;