From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-apps/kitinerary/files/
Date: Sat, 3 Dec 2022 10:51:11 +0000 (UTC) [thread overview]
Message-ID: <1670064648.8f9569353a1d6d73136d976fe52acce486fb019c.asturm@gentoo> (raw)
commit: 8f9569353a1d6d73136d976fe52acce486fb019c
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 3 10:49:39 2022 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Dec 3 10:50:48 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f956935
kde-apps/kitinerary: Drop obsolete patch
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../files/kitinerary-22.04.3-zxing-cpp-1.4.0.patch | 68 ----------------------
1 file changed, 68 deletions(-)
diff --git a/kde-apps/kitinerary/files/kitinerary-22.04.3-zxing-cpp-1.4.0.patch b/kde-apps/kitinerary/files/kitinerary-22.04.3-zxing-cpp-1.4.0.patch
deleted file mode 100644
index a208d2bfaed7..000000000000
--- a/kde-apps/kitinerary/files/kitinerary-22.04.3-zxing-cpp-1.4.0.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From bf83f8bd974925aec07a2e8dbfd50ad39995b428 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.35.1
-
next reply other threads:[~2022-12-03 10:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-03 10:51 Andreas Sturmlechner [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-07-25 19:25 [gentoo-commits] repo/gentoo:master commit in: kde-apps/kitinerary/files/ Andreas Sturmlechner
2019-11-16 9:09 Andreas Sturmlechner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1670064648.8f9569353a1d6d73136d976fe52acce486fb019c.asturm@gentoo \
--to=asturm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox