File first-patch-to-be-compatible-with-Exiv2-0.27.patch of Package digikam

From 7c8c0e44adcaadb342e85c66df79d53bd561ebc7 Mon Sep 17 00:00:00 2001
From: Gilles Caulier <caulier.gilles@gmail.com>
Date: Sun, 7 Oct 2018 11:33:06 +0200
Subject: first patch to be compatible with Exiv2 0.27

---
 core/libs/dmetadata/metaengine.cpp | 7 ++++---
 core/libs/dmetadata/metaengine_p.h | 1 +
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/core/libs/dmetadata/metaengine.cpp b/core/libs/dmetadata/metaengine.cpp
index eb1a1a0..833c807 100644
--- a/core/libs/dmetadata/metaengine.cpp
+++ b/core/libs/dmetadata/metaengine.cpp
@@ -152,10 +152,11 @@ bool MetaEngine::supportMetadataWritting(const QString& typeMime)
 
 QString MetaEngine::Exiv2Version()
 {
-    // Since 0.14.0 release, we can extract run-time version of Exiv2.
-    // else we return make version.
-
+#if EXIV2_TEST_VERSION(0,27,0)
+    return QLatin1String(Exiv2::versionString().c_str());
+#else
     return QString::fromLatin1(Exiv2::version());
+#endif
 }
 
 QString MetaEngine::sidecarFilePathForFile(const QString& path)
diff --git a/core/libs/dmetadata/metaengine_p.h b/core/libs/dmetadata/metaengine_p.h
index 79f35e9..bf75e4a 100644
--- a/core/libs/dmetadata/metaengine_p.h
+++ b/core/libs/dmetadata/metaengine_p.h
@@ -60,6 +60,7 @@
 #endif
 
 #include <exiv2/exv_conf.h>
+#include <exiv2/version.hpp>
 #include <exiv2/error.hpp>
 #include <exiv2/image.hpp>
 #include <exiv2/jpgimage.hpp>
-- 
cgit v1.1

openSUSE Build Service is sponsored by