automatic version update by autodist [release 22.08.0-1mamba;Sun Aug 21 2022]

This commit is contained in:
Automatic Build System 2024-01-06 01:56:01 +01:00
parent 6cf4f356ff
commit 818c6f175b
2 changed files with 59 additions and 1 deletions

View File

@ -0,0 +1,49 @@
--- kitinerary-22.04.3/src/lib/barcodedecoder.cpp.orig 2022-07-01 21:21:06.000000000 +0200
+++ kitinerary-22.04.3/src/lib/barcodedecoder.cpp 2022-08-05 10:10:54.434176947 +0200
@@ -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 @@
#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 @@
} else {
result.content = QString::fromStdWString(res.text());
}
+#endif
result.positive |= formatToType(res.format());
} else {
result.negative |= format;

View File

@ -1,7 +1,7 @@
%define majver %(echo %version | cut -d. -f1-2) %define majver %(echo %version | cut -d. -f1-2)
Name: kitinerary Name: kitinerary
Version: 22.04.3 Version: 22.08.0
Release: 1mamba Release: 1mamba
Summary: KDE Frameworks 5 library containing itinerary data model and itinerary extraction code Summary: KDE Frameworks 5 library containing itinerary data model and itinerary extraction code
Group: System/Libraries Group: System/Libraries
@ -10,12 +10,14 @@ Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://kde.org/ URL: https://kde.org/
Source: https://download.kde.org/stable/release-service/%{version}/src/kitinerary-%{version}.tar.xz Source: https://download.kde.org/stable/release-service/%{version}/src/kitinerary-%{version}.tar.xz
Patch0: kitinerary-22.04.3-zxing-1.4.0.patch
License: GPL License: GPL
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
BuildRequires: libgcc BuildRequires: libgcc
BuildRequires: libkarchive-devel BuildRequires: libkarchive-devel
BuildRequires: libkcalendarcore-devel BuildRequires: libkcalendarcore-devel
BuildRequires: libkcodecs-devel
BuildRequires: libkcontacts-devel BuildRequires: libkcontacts-devel
BuildRequires: libki18n-devel BuildRequires: libki18n-devel
BuildRequires: libkmime-devel BuildRequires: libkmime-devel
@ -59,6 +61,7 @@ This package contains libraries and header files for developing applications tha
%prep %prep
%setup -q %setup -q
#%patch0 -p1
%build %build
%cmake_kde5 -d build %cmake_kde5 -d build
@ -101,6 +104,12 @@ exit 0
%{_libdir}/libKPimItinerary.so %{_libdir}/libKPimItinerary.so
%changelog %changelog
* Sun Aug 21 2022 Automatic Build System <autodist@mambasoft.it> 22.08.0-1mamba
- automatic version update by autodist
* Fri Aug 05 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 22.04.3-2mamba
- added upstream patch to fix crash with zxing-cpp 1.4.0
* Fri Jul 08 2022 Automatic Build System <autodist@mambasoft.it> 22.04.3-1mamba * Fri Jul 08 2022 Automatic Build System <autodist@mambasoft.it> 22.04.3-1mamba
- automatic version update by autodist - automatic version update by autodist