Accepting request 1234794 from KDE:Applications
OBS-URL: https://build.opensuse.org/request/show/1234794 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kitinerary?expand=0&rev=80
This commit is contained in:
43
bcb009f56f8f1c9c0d1612a0ec9f581907b51534.patch
Normal file
43
bcb009f56f8f1c9c0d1612a0ec9f581907b51534.patch
Normal file
@@ -0,0 +1,43 @@
|
||||
From bcb009f56f8f1c9c0d1612a0ec9f581907b51534 Mon Sep 17 00:00:00 2001
|
||||
From: Volker Krause <vkrause@kde.org>
|
||||
Date: Sat, 21 Dec 2024 16:44:37 +0100
|
||||
Subject: [PATCH] Fix compilation against Poppler 25.01
|
||||
|
||||
---
|
||||
src/lib/pdf/pdfdocument.cpp | 12 +++++++++++-
|
||||
1 file changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/lib/pdf/pdfdocument.cpp b/src/lib/pdf/pdfdocument.cpp
|
||||
index f829e645..1eb0d61e 100644
|
||||
--- a/src/lib/pdf/pdfdocument.cpp
|
||||
+++ b/src/lib/pdf/pdfdocument.cpp
|
||||
@@ -40,9 +40,14 @@ void PdfPagePrivate::load()
|
||||
m_doc->m_popplerDoc->processLinks(&device, m_pageNum + 1);
|
||||
device.finalize();
|
||||
const auto pageRect = m_doc->m_popplerDoc->getPage(m_pageNum + 1)->getCropBox();
|
||||
+#if KPOPPLER_VERSION < QT_VERSION_CHECK(25, 1, 0)
|
||||
std::unique_ptr<GooString> s(device.getText(pageRect->x1, pageRect->y1, pageRect->x2, pageRect->y2));
|
||||
-
|
||||
m_text = QString::fromUtf8(s->c_str());
|
||||
+#else
|
||||
+ const auto s = device.getText(pageRect->x1, pageRect->y1, pageRect->x2, pageRect->y2);
|
||||
+ m_text = QString::fromUtf8(s.c_str());
|
||||
+#endif
|
||||
+
|
||||
m_images = std::move(device.m_images);
|
||||
for (auto it = m_images.begin(); it != m_images.end(); ++it) {
|
||||
(*it).d->m_page = this;
|
||||
@@ -107,8 +112,13 @@ QString PdfPage::textInRect(double left, double top, double right, double bottom
|
||||
|
||||
TextOutputDev device(nullptr, false, 0, false, false);
|
||||
d->m_doc->m_popplerDoc->displayPageSlice(&device, d->m_pageNum + 1, 72, 72, 0, false, true, false, -1, -1, -1, -1);
|
||||
+#if KPOPPLER_VERSION <QT_VERSION_CHECK(25, 1, 0)
|
||||
std::unique_ptr<GooString> s(device.getText(l, t, r, b));
|
||||
return QString::fromUtf8(s->c_str());
|
||||
+#else
|
||||
+ const auto s = device.getText(l, t, r, b);
|
||||
+ return QString::fromUtf8(s.c_str());
|
||||
+#endif
|
||||
}
|
||||
|
||||
int PdfPage::imageCount() const
|
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 3 21:10:11 UTC 2025 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||
|
||||
- Add bcb009f56f8f1c9c0d1612a0ec9f581907b51534.patch -- Fix
|
||||
compilation against Poppler 25.01.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 8 09:27:43 UTC 2024 - Christophe Marin <christophe@krop.fr>
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package kitinerary
|
||||
#
|
||||
# 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
|
||||
@@ -32,6 +32,8 @@ Source0: https://download.kde.org/stable/release-service/%{version}/src/%
|
||||
Source1: https://download.kde.org/stable/release-service/%{version}/src/%{name}-%{version}.tar.xz.sig
|
||||
Source2: applications.keyring
|
||||
%endif
|
||||
# PATCH-FIX-UPSTREAM bcb009f56f8f1c9c0d1612a0ec9f581907b51534.patch -- Fix compilation against Poppler 25.01
|
||||
Patch0: https://github.com/KDE/kitinerary/commit/bcb009f56f8f1c9c0d1612a0ec9f581907b51534.patch
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: kf6-extra-cmake-modules >= %{kf6_version}
|
||||
BuildRequires: libphonenumber-devel
|
||||
|
Reference in New Issue
Block a user