Hi,

this fixes the build with poppler-25.02.0.

Not very elegant, but it builds, and i *think* it still does the same
as before.

ok?

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   19 Feb 2025 09:33:13 -0000
@@ -0,0 +1,17 @@
+Fix build with poppler-25.02.0.
+
+Index: src/lib/pdf/pdfdocument.cpp
+--- src/lib/pdf/pdfdocument.cpp.orig
++++ src/lib/pdf/pdfdocument.cpp
+@@ -328,9 +328,8 @@ QString gooStringToUnicode(const std::unique_ptr<GooSt
+         const auto utf16Data = pdfDocEncodingToUTF16(s->toStr());
+         return QString::fromUtf16(reinterpret_cast<const char16_t 
*>(utf16Data.c_str()), utf16Data.size() / 2);
+ #else
+-        int len = 0;
+-        std::unique_ptr<const char[]> 
utf16Data(pdfDocEncodingToUTF16(s->toStr(), &len));
+-        return QString::fromUtf16(reinterpret_cast<const 
char16_t*>(utf16Data.get()), len / 2);
++        std::string utf16Data = pdfDocEncodingToUTF16(s->toStr());
++        return QString::fromUtf16(reinterpret_cast<const 
char16_t*>(utf16Data.c_str()), utf16Data.length() / 2);
+ #endif
+     }
+ 

Reply via email to