diff --git a/0001-QrCodeDecoder-Replace-deprecated-BarcodeFormat-QR_CO.patch b/0001-QrCodeDecoder-Replace-deprecated-BarcodeFormat-QR_CO.patch new file mode 100644 index 0000000..d59e6e3 --- /dev/null +++ b/0001-QrCodeDecoder-Replace-deprecated-BarcodeFormat-QR_CO.patch @@ -0,0 +1,29 @@ +From 9a2f88779064b46ae097a354c97d657901f47d01 Mon Sep 17 00:00:00 2001 +From: Melvin Keskin +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 + diff --git a/kaidan.changes b/kaidan.changes index 6575bc1..38ea595 100644 --- a/kaidan.changes +++ b/kaidan.changes @@ -1,7 +1,8 @@ ------------------------------------------------------------------- Thu Feb 9 08:09:58 UTC 2023 - Christophe Marin -- 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 ------------------------------------------------------------------- diff --git a/kaidan.spec b/kaidan.spec index e47c434..aa3c6ee 100644 --- a/kaidan.spec +++ b/kaidan.spec @@ -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