Hi,
this fixes the build of kitinerary with poppler-21.08.0 (and of
course 21.09.0, too).
Ok to commit this together with the poppler update?
Ciao,
Kili
Index: patches/patch-src_lib_pdf_pdfdocument_cpp
===================================================================
RCS file: patches/patch-src_lib_pdf_pdfdocument_cpp
diff -N patches/patch-src_lib_pdf_pdfdocument_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_lib_pdf_pdfdocument_cpp 7 Sep 2021 17:46:44 -0000
@@ -0,0 +1,53 @@
+$OpenBSD$
+
+Fix build with poppler-21.08.0.
+
+Index: src/lib/pdf/pdfdocument.cpp
+--- src/lib/pdf/pdfdocument.cpp.orig
++++ src/lib/pdf/pdfdocument.cpp
+@@ -201,7 +201,7 @@ int PdfDocument::fileSize() const
+ }
+
+ #ifdef HAVE_POPPLER
+-static QDateTime parsePdfDateTime(const char *str)
++static QDateTime parsePdfDateTime(const GooString *str)
+ {
+ int year, month, day, hour, min, sec, tzHours, tzMins;
+ char tz;
+@@ -229,16 +229,12 @@ static QDateTime parsePdfDateTime(const char *str)
+ QDateTime PdfDocument::creationTime() const
+ {
+ #ifdef HAVE_POPPLER
+- std::unique_ptr<GooString> dt(d->m_popplerDoc->getDocInfoCreatDate());
++ GooString *dt = d->m_popplerDoc->getDocInfoCreatDate();
+ if (!dt) {
+ return {};
+ }
+-#if KPOPPLER_VERSION >= QT_VERSION_CHECK(0, 72, 0)
+- return parsePdfDateTime(dt->c_str());
++ return parsePdfDateTime(dt);
+ #else
+- return parsePdfDateTime(dt->getCString());
+-#endif
+-#else
+ return {};
+ #endif
+ }
+@@ -246,15 +242,11 @@ QDateTime PdfDocument::creationTime() const
+ QDateTime PdfDocument::modificationTime() const
+ {
+ #ifdef HAVE_POPPLER
+- std::unique_ptr<GooString> dt(d->m_popplerDoc->getDocInfoModDate());
++ GooString *dt = d->m_popplerDoc->getDocInfoModDate();
+ if (!dt) {
+ return {};
+ }
+-#if KPOPPLER_VERSION >= QT_VERSION_CHECK(0, 72, 0)
+- return parsePdfDateTime(dt->c_str());
+-#else
+- return parsePdfDateTime(dt->getCString());
+-#endif
++ return parsePdfDateTime(dt);
+ #else
+ return {};
+ #endif