kitinerary: update to 25.04.3

This commit is contained in:
Mateusz Sylwestrzak 2025-06-21 19:49:29 +02:00 committed by Duncan Overbruck
parent d7e9bdcbe7
commit 3d5c7d7e3c
3 changed files with 3 additions and 74 deletions

View file

@ -1,22 +0,0 @@
--- a/src/lib/processors/mimedocumentprocessor.cpp 2024-08-16 07:00:56.000000000 +0200
+++ b/src/lib/processors/mimedocumentprocessor.cpp 2025-02-24 14:03:09.980662872 +0100
@@ -142,13 +142,14 @@
}
// special handling of multipart/related to add images to the corresponding HTML document
- if (ct && ct->isMultipart() && ct->isSubtype("related") && ct->parameter("type"_L1) == "text/html"_L1 && children.size() >= 2) {
- const auto child = children.front();
- if (child->contentType(false) && child->contentType(false)->isHTMLText()) {
+ if (ct && ct->isMultipart() && ct->isSubtype("related") && ct->parameter("type") == "text/html"_L1 && children.size() >= 2) {
+ const KMime::Content *child = children.front();
+ if (child->contentType() && child->contentType()->isHTMLText()) {
auto htmlNode = expandContentNode(node, child, engine);
for (auto it = std::next(children.begin()); it != children.end(); ++it) {
- auto imgNode = expandContentNode(htmlNode, (*it), engine);
- const auto cid = (*it)->contentID(false);
+ const KMime::Content *imgChild = *it;
+ auto imgNode = expandContentNode(htmlNode, imgChild, engine);
+ const auto cid = imgChild->contentID();
if (cid) {
imgNode.setLocation(cid->identifier());
}

View file

@ -1,49 +0,0 @@
--- a/src/lib/pdf/pdfdocument.cpp 2024-08-16 07:00:56.000000000 +0200
+++ b/src/lib/pdf/pdfdocument.cpp 2025-02-23 22:41:15.141361948 +0100
@@ -39,10 +39,15 @@
m_doc->m_popplerDoc->displayPageSlice(&device, m_pageNum + 1, 72, 72, 0, false, true, false, -1, -1, -1, -1);
m_doc->m_popplerDoc->processLinks(&device, m_pageNum + 1);
device.finalize();
- const auto pageRect = m_doc->m_popplerDoc->getPage(m_pageNum + 1)->getCropBox();
- std::unique_ptr<GooString> s(device.getText(pageRect->x1, pageRect->y1, pageRect->x2, pageRect->y2));
+ 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 @@
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
@@ -314,9 +324,14 @@
#endif
return QString::fromUtf16(reinterpret_cast<const char16_t*>(s->toStr().c_str()), s->toStr().size() / 2);
} else {
+#if KPOPPLER_VERSION >= QT_VERSION_CHECK(25, 2, 0)
+ 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);
+#endif
}
return QString::fromUtf8(s->c_str());

View file

@ -1,7 +1,7 @@
# Template file for 'kitinerary'
pkgname=kitinerary
version=24.08.0
revision=2
version=25.04.3
revision=1
build_style=cmake
configure_args="-DBUILD_TESTING=OFF -DKF6_HOST_TOOLING=/usr/lib/cmake
-DKDE_INSTALL_QTPLUGINDIR=lib/qt6/plugins
@ -19,7 +19,7 @@ license="LGPL-2.1-or-later"
homepage="https://kontact.kde.org"
changelog="https://kde.org/announcements/changelogs/gear/${version}/#kitinerary"
distfiles="${KDE_SITE}/release-service/${version}/src/${pkgname}-${version}.tar.xz"
checksum=befb95f1620e0c9baa82264aabfba0cc676c9ee40583938be2091f1254f2cdac
checksum=ca93a086feccf0f36d4ca56a9f5ccf51943d7e1945b392daf211e42f128139d4
do_check() {
cd build