kitinerary: update to 26.04.3.
This commit is contained in:
@@ -1,88 +0,0 @@
|
|||||||
From 2c71a8b3d3ed1eb682f5f1a49348a9c88183d4e6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Volker Krause <vkrause@kde.org>
|
|
||||||
Date: Wed, 27 May 2026 17:37:31 +0200
|
|
||||||
Subject: [PATCH] Adapt to Poppler 26.06 API changes
|
|
||||||
|
|
||||||
---
|
|
||||||
src/lib/pdf/pdfdocument.cpp | 30 ++++++++++++++++++++++++++++--
|
|
||||||
1 file changed, 28 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/lib/pdf/pdfdocument.cpp b/src/lib/pdf/pdfdocument.cpp
|
|
||||||
index 6f63f8ce..dd37122a 100644
|
|
||||||
--- a/src/lib/pdf/pdfdocument.cpp
|
|
||||||
+++ b/src/lib/pdf/pdfdocument.cpp
|
|
||||||
@@ -44,12 +44,15 @@ void PdfPagePrivate::load()
|
|
||||||
#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());
|
|
||||||
-#elif KPOPPLER_VERSION <QT_VERSION_CHECK(25, 12, 90)
|
|
||||||
+#elif KPOPPLER_VERSION < QT_VERSION_CHECK(25, 12, 90)
|
|
||||||
const auto s = device.getText(pageRect->x1, pageRect->y1, pageRect->x2, pageRect->y2);
|
|
||||||
m_text = QString::fromUtf8(s.c_str());
|
|
||||||
-#else
|
|
||||||
+#elif KPOPPLER_VERSION < QT_VERSION_CHECK(26, 5, 90)
|
|
||||||
const auto s = device.getText(PDFRectangle(pageRect->x1, pageRect->y1, pageRect->x2, pageRect->y2));
|
|
||||||
m_text = QString::fromUtf8(s.c_str());
|
|
||||||
+#else
|
|
||||||
+ const auto s = device.getText(pageRect);
|
|
||||||
+ m_text = QString::fromUtf8(s.c_str());
|
|
||||||
#endif
|
|
||||||
|
|
||||||
m_images = std::move(device.m_images);
|
|
||||||
@@ -59,7 +62,11 @@ void PdfPagePrivate::load()
|
|
||||||
|
|
||||||
m_links = std::move(device.m_links);
|
|
||||||
for (auto &link : m_links) {
|
|
||||||
+#if KPOPPLER_VERSION < QT_VERSION_CHECK(26, 5, 90)
|
|
||||||
link.convertToPageRect(pageRect);
|
|
||||||
+#else
|
|
||||||
+ link.convertToPageRect(&pageRect);
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
m_loaded = true;
|
|
||||||
@@ -98,16 +105,30 @@ QString PdfPage::textInRect(double left, double top, double right, double bottom
|
|
||||||
double b;
|
|
||||||
switch (page->getRotate()) {
|
|
||||||
case 0:
|
|
||||||
+#if KPOPPLER_VERSION < QT_VERSION_CHECK(26, 5, 90)
|
|
||||||
l = ratio(pageRect->x1, pageRect->x2, left);
|
|
||||||
t = ratio(pageRect->y1, pageRect->y2, top);
|
|
||||||
r = ratio(pageRect->x1, pageRect->x2, right);
|
|
||||||
b = ratio(pageRect->y1, pageRect->y2, bottom);
|
|
||||||
+#else
|
|
||||||
+ l = ratio(pageRect.x1, pageRect.x2, left);
|
|
||||||
+ t = ratio(pageRect.y1, pageRect.y2, top);
|
|
||||||
+ r = ratio(pageRect.x1, pageRect.x2, right);
|
|
||||||
+ b = ratio(pageRect.y1, pageRect.y2, bottom);
|
|
||||||
+#endif
|
|
||||||
break;
|
|
||||||
case 90:
|
|
||||||
+#if KPOPPLER_VERSION < QT_VERSION_CHECK(26, 5, 90)
|
|
||||||
l = ratio(pageRect->y1, pageRect->y2, left);
|
|
||||||
t = ratio(pageRect->x1, pageRect->x2, top);
|
|
||||||
r = ratio(pageRect->y1, pageRect->y2, right);
|
|
||||||
b = ratio(pageRect->x1, pageRect->x2, bottom);
|
|
||||||
+#else
|
|
||||||
+ l = ratio(pageRect.y1, pageRect.y2, left);
|
|
||||||
+ t = ratio(pageRect.x1, pageRect.x2, top);
|
|
||||||
+ r = ratio(pageRect.y1, pageRect.y2, right);
|
|
||||||
+ b = ratio(pageRect.x1, pageRect.x2, bottom);
|
|
||||||
+#endif
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
qCWarning(Log) << "Unsupported page rotation!" << page->getRotate();
|
|
||||||
@@ -158,8 +179,13 @@ QVariantList PdfPage::imagesInRect(double left, double top, double right, double
|
|
||||||
const auto pageRect = d->m_doc->m_popplerDoc->getPage(d->m_pageNum + 1)->getCropBox();
|
|
||||||
|
|
||||||
for (const auto &img : d->m_images) {
|
|
||||||
+#if KPOPPLER_VERSION < QT_VERSION_CHECK(26, 5, 90)
|
|
||||||
if ((img.d->m_transform.dx() >= ratio(pageRect->x1, pageRect->x2, left) && img.d->m_transform.dx() <= ratio(pageRect->x1, pageRect->x2, right)) &&
|
|
||||||
(img.d->m_transform.dy() >= ratio(pageRect->y1, pageRect->y2, top) && img.d->m_transform.dy() <= ratio(pageRect->y1, pageRect->y2, bottom)))
|
|
||||||
+#else
|
|
||||||
+ if ((img.d->m_transform.dx() >= ratio(pageRect.x1, pageRect.x2, left) && img.d->m_transform.dx() <= ratio(pageRect.x1, pageRect.x2, right)) &&
|
|
||||||
+ (img.d->m_transform.dy() >= ratio(pageRect.y1, pageRect.y2, top) && img.d->m_transform.dy() <= ratio(pageRect.y1, pageRect.y2, bottom)))
|
|
||||||
+#endif
|
|
||||||
{
|
|
||||||
l.push_back(QVariant::fromValue(img));
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
# Template file for 'kitinerary'
|
# Template file for 'kitinerary'
|
||||||
|
# group=kde-gear
|
||||||
pkgname=kitinerary
|
pkgname=kitinerary
|
||||||
version=26.04.1
|
version=26.04.3
|
||||||
revision=3
|
revision=1
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
configure_args="-DBUILD_TESTING=OFF
|
configure_args="-DBUILD_TESTING=OFF
|
||||||
-DKDE_INSTALL_QTPLUGINDIR=lib/qt6/plugins
|
-DKDE_INSTALL_QTPLUGINDIR=lib/qt6/plugins
|
||||||
@@ -19,7 +20,7 @@ license="LGPL-2.1-or-later"
|
|||||||
homepage="https://kontact.kde.org"
|
homepage="https://kontact.kde.org"
|
||||||
changelog="https://kde.org/announcements/changelogs/gear/${version}/#kitinerary"
|
changelog="https://kde.org/announcements/changelogs/gear/${version}/#kitinerary"
|
||||||
distfiles="${KDE_SITE}/release-service/${version}/src/${pkgname}-${version}.tar.xz"
|
distfiles="${KDE_SITE}/release-service/${version}/src/${pkgname}-${version}.tar.xz"
|
||||||
checksum=5d1adc66de813d369730ee20bc8bec83af84e41075aea71f22fa200247b752ad
|
checksum=2a072650508a95a99647d0ad7d23e658d092270412573f5f819372149cb49f8c
|
||||||
|
|
||||||
do_check() {
|
do_check() {
|
||||||
cd build
|
cd build
|
||||||
|
|||||||
Reference in New Issue
Block a user