Christophe Marin 2023-02-09 08:15:28 +00:00 committed by Git OBS Bridge
parent ca01478803
commit c1c42a8c6c
3 changed files with 34 additions and 2 deletions

View File

@ -0,0 +1,29 @@
From 9a2f88779064b46ae097a354c97d657901f47d01 Mon Sep 17 00:00:00 2001
From: Melvin Keskin <melvo@olomono.de>
Date: Fri, 18 Feb 2022 10:48:46 +0100
Subject: [PATCH] QrCodeDecoder: Replace deprecated 'BarcodeFormat::QR_CODE'
with 'BarcodeFormat::QRCode'
---
src/QrCodeDecoder.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/QrCodeDecoder.cpp b/src/QrCodeDecoder.cpp
index a84978f..a7b0cf5 100644
--- a/src/QrCodeDecoder.cpp
+++ b/src/QrCodeDecoder.cpp
@@ -60,7 +60,11 @@ void QrCodeDecoder::decodeImage(const QImage &image)
{
// Advise the decoder to check for QR codes and to try decoding rotated versions of the image.
#if ZXING_VERSION >= QT_VERSION_CHECK(1, 1, 0)
+# if ZXING_VERSION >= QT_VERSION_CHECK(1, 1, 1)
+ const auto decodeHints = DecodeHints().setFormats(BarcodeFormat::QRCode);
+# else
const auto decodeHints = DecodeHints().setFormats(BarcodeFormat::QR_CODE);
+# endif
const auto result = ReadBarcode({image.bits(), image.width(), image.height(), ZXing::ImageFormat::Lum, image.bytesPerLine()}, decodeHints);
#else
const auto decodeHints =
--
2.39.1

View File

@ -1,7 +1,8 @@
-------------------------------------------------------------------
Thu Feb 9 08:09:58 UTC 2023 - Christophe Marin <christophe@krop.fr>
- Add patch to fix build with ZXing >= 2.0:
- Add patches to fix build with ZXing >= 2.0:
* 0001-QrCodeDecoder-Replace-deprecated-BarcodeFormat-QR_CO.patch
* 0001-Support-ZXing-2.0.patch
-------------------------------------------------------------------

View File

@ -26,7 +26,9 @@ Source0: https://download.kde.org/unstable/%{name}/%{version}/%{name}-%{v
Source1: https://download.kde.org/unstable/%{name}/%{version}/%{name}-%{version}.tar.xz.sig
Source2: kaidan.keyring
# PATCH-FIX-UPSTREAM
Patch0: 0001-Support-ZXing-2.0.patch
Patch0: 0001-QrCodeDecoder-Replace-deprecated-BarcodeFormat-QR_CO.patch
# PATCH-FIX-UPSTREAM
Patch1: 0001-Support-ZXing-2.0.patch
BuildRequires: cmake >= 3.3
BuildRequires: extra-cmake-modules >= 5.40.0
BuildRequires: update-desktop-files