SHA256
1
0
forked from pool/kitinerary

Accepting request 997848 from KDE:Applications

KDE Release Gear 22.08.0 (forwarded request 997667 from cgiboudeaux)

OBS-URL: https://build.opensuse.org/request/show/997848
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kitinerary?expand=0&rev=52
This commit is contained in:
Dominique Leuenberger 2022-08-19 15:52:00 +00:00 committed by Git OBS Bridge
commit d0d412a7eb
7 changed files with 43 additions and 90 deletions

View File

@ -1,68 +0,0 @@
From b08fd64711165c10bf1e88e6add4e66f68e32dc5 Mon Sep 17 00:00:00 2001
From: Volker Krause <vkrause@kde.org>
Date: Fri, 8 Jul 2022 16:04:19 +0200
Subject: [PATCH] Support ZXing 1.4.0
The previous code crashes (if it builds at all) with ZXing 1.4.0, so
distributions updating to 1.4.0 would need to apply this patch on top
of 22.04.3 as well.
(cherry picked from commit e60195421aa159462353892ed32bf46ac8c57d19)
---
src/lib/barcodedecoder.cpp | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/src/lib/barcodedecoder.cpp b/src/lib/barcodedecoder.cpp
index b38140a..40e0c64 100644
--- a/src/lib/barcodedecoder.cpp
+++ b/src/lib/barcodedecoder.cpp
@@ -15,6 +15,7 @@
#include <QString>
#ifdef HAVE_ZXING
+#define ZX_USE_UTF8 1
#ifdef ZXING_USE_READBARCODE
#include <ZXing/ReadBarcode.h>
#else
@@ -244,6 +245,30 @@ void BarcodeDecoder::decodeZxing(const QImage &img, BarcodeDecoder::BarcodeTypes
#endif
if (res.isValid()) {
+#if ZXING_VERSION >= QT_VERSION_CHECK(1, 4, 0)
+ // detect content type
+ std::string zxUtf8Text;
+ if (res.contentType() == ZXing::ContentType::Text) {
+ result.contentType = Result::Any;
+ zxUtf8Text = res.text();
+ // check if the text is ASCII-only (in which case we allow access as byte array as well)
+ if (std::any_of(zxUtf8Text.begin(), zxUtf8Text.end(), [](unsigned char c) { return c > 0x7F; })) {
+ result.contentType &= ~Result::ByteArray;
+ }
+ } else {
+ result.contentType = Result::ByteArray;
+ }
+
+ // decode content
+ if (result.contentType & Result::ByteArray) {
+ QByteArray b;
+ b.resize(res.bytes().size());
+ std::copy(res.bytes().begin(), res.bytes().end(), b.begin());
+ result.content = b;
+ } else {
+ result.content = QString::fromStdString(zxUtf8Text);
+ }
+#else
// detect content type
result.contentType = Result::Any;
if (std::any_of(res.text().begin(), res.text().end(), [](const auto c) { return c > 255; })) {
@@ -262,6 +287,7 @@ void BarcodeDecoder::decodeZxing(const QImage &img, BarcodeDecoder::BarcodeTypes
} else {
result.content = QString::fromStdWString(res.text());
}
+#endif
result.positive |= formatToType(res.format());
} else {
result.negative |= format;
--
2.36.1

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9fc6970e633584c88c5283dd2a5d3a4638f704439229abd9c6267d907a6ab3cb
size 1530056

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE2BwMs463Je9mkcOFu0YzUNbvMe8FAmLDwVkACgkQu0YzUNbv
Me+VBxAAiO6fzhY5lwELKO7rL8LJTsFCanUaDYEtZr3kniTZDkihGfUg7nNLUYB0
0CLjOq3UhVwsfii+GxaJSPa7bULJnbdSa7vv9kQe0oYDptTLhKBvAn1yxtNB544c
a3MdiHICUDRcop33bxHaR9DBFtFCynDQnmQiDYtzfXxaV5CMPvu+PWDDuAf3oaKp
MNVBxyfIviZQ7Qq3OgHQGY5eZKeAPcvkt8FcmO3U3NGrrgyR6wzigm7qLIiqM1AR
/g45/nYZ6HRu7eClHuOlvHolVWx4K79jYMKnDmCObFLqRfXCiu1hLstFbjGwl42u
yWBLyTnYuPZrbmo6N1OPm984KiGsItwQNRXpVgBTwHP9ggZltpFX4B/6UTLhE5Y3
5CvT1AnYgjDXy5JnME+kmrCShZmS/BRpVDOv3HSmc1W/1bb/RHpJx9w7srGd400f
olmCLCt+0QCciQ8V7fPHSXudpKYCpzSKMCb7mBzbPVkSM4FTUF0ITd1jjsrCP/vZ
o3CZgpfO1nQxaX9nx5VYdmjsAKmh7KeAJVnnu1FxlcTgVzEruHa3eRG9RxhGl674
TRWbHerwi0LS6w9Eo9WufMYScDc2HAkMcjMqVfUfNnyH+6aMg5faclmmTmz4emtZ
e517USzUz/zqZY7OS+eRgKeLhZBvOIDSr+tfZdTFwnuwDxxKTyw=
=Wqvl
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2fd35f322c48723b61c98006a2d10010eaf528360f93971d11d07d35168133cb
size 1688912

View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEyiYsbIPeTS+yijMqOmpNuDnqptcFAmL2HaUACgkQOmpNuDnq
ptcBhA/+K29u+rG2q1e5FLBGHMXIhbFZL/IqL8KxhbpMr7nffWuQbjj5ivC4tDOm
HdXo5caEOL2DCH6dzLK43DFMYM9spKDEiyFEaxTUM35OCznmN4Pptyw0BRuIeg/2
f5hajfkU4F3djfvZkFQqWmILfRVzeIlbs9I9LRY2lMGpKIIBqkzbNiMBp4tLbGbl
FsiF/WlBibN9gwqtCAMSg34fIC6xvMyjFnJwEyziigbGqOLJn9RZOjU5P0WhkfwT
dM1y27sXsjYaC+48Vrr790IF1Pb23+6Mmy6Kt/+CNDSck44TZojZqhbR9oDVcSTA
INFD6QFT9Fe27kp8Fnv/EdK+EJSpDXZ+NFTxdLlfsCVZC1+EDDcFyHcyJsO2YaMH
VjY0djRYhALL42FKhdgJA2s6p4pHmNNI0g/drYO6QxnDQqa2vBPL6xrTBlddz8AM
yHX1llEfTCg5Ifq8+QXgzWwXhIQgn7GpbxpqZlTnYFYFDu6tG25o8dQuBnokDihg
YnyiF9vL1p1hgxHv0qM2X3iNp8g72/L7TT+906HHSfMZchNrAgLelUhpxYRPnj3/
uoPL9Jdq6WEW+MOecpM52c3+XXVE9vjqV8yDgYL2h3tUV8L33JSjK9pUBZ8kgb2u
8zqnxQtm+kD/WrSlPCbPR3hI9x/VD9N+3bA4+ArO1fD+nX5sQII=
=8a6V
-----END PGP SIGNATURE-----

View File

@ -1,9 +1,32 @@
-------------------------------------------------------------------
Sun Aug 14 09:42:41 UTC 2022 - Christophe Giboudeaux <christophe@krop.fr>
- Update to 22.08.0
* New feature release
* For more details please see:
* https://kde.org/announcements/gear/22.08.0/
-------------------------------------------------------------------
Fri Aug 5 12:10:58 UTC 2022 - Christophe Giboudeaux <christophe@krop.fr>
- Update to 22.07.90
* New feature release
- Drop patch, now upstream:
* 0001-Support-ZXing-1.4.0.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jul 20 16:24:51 UTC 2022 - Fabian Vogt <fabian@ritter-vogt.de> Wed Jul 20 16:24:51 UTC 2022 - Fabian Vogt <fabian@ritter-vogt.de>
- Add patch to fix build with ZXing 1.4.0: - Add patch to fix build with ZXing 1.4.0:
* 0001-Support-ZXing-1.4.0.patch * 0001-Support-ZXing-1.4.0.patch
-------------------------------------------------------------------
Sat Jul 16 08:28:12 UTC 2022 - Christophe Giboudeaux <christophe@krop.fr>
- Update to 22.07.80
* New feature release
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jul 5 17:03:22 UTC 2022 - Christophe Giboudeaux <christophe@krop.fr> Tue Jul 5 17:03:22 UTC 2022 - Christophe Giboudeaux <christophe@krop.fr>

View File

@ -18,7 +18,7 @@
%bcond_without released %bcond_without released
Name: kitinerary Name: kitinerary
Version: 22.04.3 Version: 22.08.0
Release: 0 Release: 0
Summary: Data model and extraction system for travel reservations Summary: Data model and extraction system for travel reservations
License: LGPL-2.1-or-later License: LGPL-2.1-or-later
@ -29,8 +29,6 @@ Source: https://download.kde.org/stable/release-service/%{version}/src/%
Source1: https://download.kde.org/stable/release-service/%{version}/src/%{name}-%{version}.tar.xz.sig Source1: https://download.kde.org/stable/release-service/%{version}/src/%{name}-%{version}.tar.xz.sig
Source2: applications.keyring Source2: applications.keyring
%endif %endif
# PATCH-FIX-UPSTREAM
Patch1: 0001-Support-ZXing-1.4.0.patch
BuildRequires: extra-cmake-modules BuildRequires: extra-cmake-modules
BuildRequires: kf5-filesystem BuildRequires: kf5-filesystem
BuildRequires: libopenssl-devel BuildRequires: libopenssl-devel