2 Commits

3 changed files with 35 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
From 0beaa9c088728cd51928cedad4847f4ccd48cd2a Mon Sep 17 00:00:00 2001
From: Vekhir <Vekhir@yahoo.com>
Date: Mon, 8 Dec 2025 00:07:19 +0100
Subject: [PATCH] Explicit cast to string_view
Poppler 25.12 allows string_view and char*. QByteArray can be converted to both, so choose one explicitly
---
src/pdf/XPDFRenderer.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/pdf/XPDFRenderer.cpp b/src/pdf/XPDFRenderer.cpp
index e8eb1c64d..23b76a9aa 100644
--- a/src/pdf/XPDFRenderer.cpp
+++ b/src/pdf/XPDFRenderer.cpp
@@ -61,7 +61,9 @@ XPDFRenderer::XPDFRenderer(const QString &filename, bool importingFile)
#endif
globalParams->setupBaseFonts(QFile::encodeName(UBPlatformUtils::applicationResourcesDirectory() + "/" + "fonts").data());
}
-#if POPPLER_VERSION_MAJOR > 22 || (POPPLER_VERSION_MAJOR == 22 && POPPLER_VERSION_MINOR >= 3)
+#if POPPLER_VERSION_MAJOR > 25 || (POPPLER_VERSION_MAJOR == 25 && POPPLER_VERSION_MINOR >= 12)
+ mDocument = new PDFDoc(std::make_unique<GooString>(static_cast<std::string_view>(filename.toLocal8Bit())));
+#elif POPPLER_VERSION_MAJOR > 22 || (POPPLER_VERSION_MAJOR == 22 && POPPLER_VERSION_MINOR >= 3)
mDocument = new PDFDoc(std::make_unique<GooString>(filename.toLocal8Bit()));
#else
mDocument = new PDFDoc(new GooString(filename.toLocal8Bit()), 0, 0, 0); // the filename GString is deleted on PDFDoc desctruction

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Dec 18 10:34:30 UTC 2025 - Martin Winter <me@letsfindaway.de>
- add patch 1387-fix-poppler-25-11.patch
* compatibility with poppler 25.11
* already merged upstream for next release
-------------------------------------------------------------------
Mon Dec 23 20:47:49 UTC 2024 - Martin Winter <me@letsfindaway.de>

View File

@@ -1,7 +1,7 @@
#
# spec file for package OpenBoard
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -28,6 +28,8 @@ URL: https://openboard.ch
Source0: https://github.com/OpenBoard-org/OpenBoard/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# https://github.com/OpenBoard-org/OpenBoard/pull/955
Patch955: 0955-shortcut-configuration.patch
# https://github.com/OpenBoard-org/OpenBoard/pull/1387
Patch1387: 1387-fix-poppler-25-11.patch
# https://github.com/letsfindaway/OpenBoard/pull/117
Patch9117: 9117-disable-software-update.patch
BuildRequires: desktop-file-utils