Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package kf6-prison for openSUSE:Factory 
checked in at 2026-02-16 13:04:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kf6-prison (Old)
 and      /work/SRC/openSUSE:Factory/.kf6-prison.new.1977 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kf6-prison"

Mon Feb 16 13:04:48 2026 rev:24 rq:1332964 version:6.23.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kf6-prison/kf6-prison.changes    2026-01-12 
10:17:29.664052368 +0100
+++ /work/SRC/openSUSE:Factory/.kf6-prison.new.1977/kf6-prison.changes  
2026-02-16 13:07:32.641606753 +0100
@@ -1,0 +2,21 @@
+Fri Feb  6 14:26:02 UTC 2026 - Christophe Marin <[email protected]>
+
+- Update to 6.23.0
+  * New feature release
+  * For more details please see:
+  * https://kde.org/announcements/frameworks/6/6.23.0
+- Changes since 6.22.0:
+  * Update dependency version to 6.23.0
+  * Consistently namespace ZXing version defines
+  * Remove workarounds for ZXing 3.0 not having bumped its version yet
+  * Adapt to more ZXing 3.0 API changes
+  * Actually search for ZXing 3
+  * Fix build without ZXing
+  * Support ZXing 3 for barcode generation
+  * Auto-detect text vs binary content for GS1 Databar barcodes
+  * Enable LSAN in CI
+  * Adapt barcode scanner to ZXing 3 changes
+  * Port away from deprecated ZXing API
+  * Update version to 6.23.0
+
+-------------------------------------------------------------------

Old:
----
  prison-6.22.0.tar.xz
  prison-6.22.0.tar.xz.sig

New:
----
  prison-6.23.0.tar.xz
  prison-6.23.0.tar.xz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kf6-prison.spec ++++++
--- /var/tmp/diff_new_pack.BryNh7/_old  2026-02-16 13:07:33.713651190 +0100
+++ /var/tmp/diff_new_pack.BryNh7/_new  2026-02-16 13:07:33.713651190 +0100
@@ -19,11 +19,11 @@
 %define qt6_version 6.8.0
 
 %define rname prison
-# Full KF6 version (e.g. 6.22.0)
+# Full KF6 version (e.g. 6.23.0)
 %{!?_kf6_version: %global _kf6_version %{version}}
 %bcond_without released
 Name:           kf6-prison
-Version:        6.22.0
+Version:        6.23.0
 Release:        0
 Summary:        Barcode abstraction layer library
 License:        MIT


++++++ prison-6.22.0.tar.xz -> prison-6.23.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prison-6.22.0/.gitignore new/prison-6.23.0/.gitignore
--- old/prison-6.22.0/.gitignore        2026-01-02 18:45:17.000000000 +0100
+++ new/prison-6.23.0/.gitignore        2026-02-06 13:18:25.000000000 +0100
@@ -26,3 +26,4 @@
 .idea
 /cmake-build*
 .cache
+.qmlls.ini
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prison-6.22.0/.kde-ci.yml 
new/prison-6.23.0/.kde-ci.yml
--- old/prison-6.22.0/.kde-ci.yml       2026-01-02 18:45:17.000000000 +0100
+++ new/prison-6.23.0/.kde-ci.yml       2026-02-06 13:18:25.000000000 +0100
@@ -7,3 +7,4 @@
 Options:
  test-before-installing: True
  require-passing-tests-on: ['Linux', 'FreeBSD', 'Windows']
+ enable-lsan: True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prison-6.22.0/CMakeLists.txt 
new/prison-6.23.0/CMakeLists.txt
--- old/prison-6.22.0/CMakeLists.txt    2026-01-02 18:45:17.000000000 +0100
+++ new/prison-6.23.0/CMakeLists.txt    2026-02-06 13:18:25.000000000 +0100
@@ -1,11 +1,11 @@
-cmake_minimum_required(VERSION 3.16)
+cmake_minimum_required(VERSION 3.27)
 
-set(KF_VERSION "6.22.0") # handled by release scripts
+set(KF_VERSION "6.23.0") # handled by release scripts
 project(prison VERSION ${KF_VERSION})
 
 # ECM setup
 include(FeatureSummary)
-find_package(ECM 6.22.0 NO_MODULE)
+find_package(ECM 6.23.0 NO_MODULE)
 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake 
Modules." URL "https://commits.kde.org/extra-cmake-modules";)
 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND 
FATAL_ON_MISSING_REQUIRED_PACKAGES)
 set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" "${ECM_MODULE_PATH}")
@@ -51,10 +51,12 @@
 set_package_properties(Dmtx PROPERTIES
     PURPOSE "Required for generation of Data Matrix barcodes."
     TYPE RECOMMENDED)
-find_package(ZXing 2.0)
-if (NOT TARGET ZXing::ZXing)
-  find_package(ZXing 1.2.0)
-endif()
+foreach(ver 3.0 2.0 1.2.0)
+    find_package(ZXing ${ver} CONFIG QUIET)
+    if (TARGET ZXing::ZXing)
+        break()
+    endif()
+endforeach()
 set_package_properties(ZXing PROPERTIES
     PURPOSE "Required for generation of PDF417 barcodes and for scanning of 
barcodes from live video feed."
     TYPE RECOMMENDED)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prison-6.22.0/src/lib/config-prison.h.cmake 
new/prison-6.23.0/src/lib/config-prison.h.cmake
--- old/prison-6.22.0/src/lib/config-prison.h.cmake     2026-01-02 
18:45:17.000000000 +0100
+++ new/prison-6.23.0/src/lib/config-prison.h.cmake     2026-02-06 
13:18:25.000000000 +0100
@@ -10,4 +10,17 @@
 #cmakedefine01 HAVE_DMTX
 #cmakedefine01 HAVE_ZXING
 
+#if HAVE_ZXING
+
+// ensure to not clash with the ZXING_* macros of zxing itself!
+#define KZXING_VERSION_CHECK(major, minor, patch) 
((major<<16)|(minor<<8)|(patch))
+
+#define KZXING_VERSION_MAJOR @ZXing_VERSION_MAJOR@
+#define KZXING_VERSION_MINOR @ZXing_VERSION_MINOR@
+#define KZXING_VERSION_PATCH @ZXing_VERSION_PATCH@
+
+#define KZXING_VERSION KZXING_VERSION_CHECK(KZXING_VERSION_MAJOR, 
KZXING_VERSION_MINOR, KZXING_VERSION_PATCH)
+
+#endif
+
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prison-6.22.0/src/lib/pdf417barcode.cpp 
new/prison-6.23.0/src/lib/pdf417barcode.cpp
--- old/prison-6.22.0/src/lib/pdf417barcode.cpp 2026-01-02 18:45:17.000000000 
+0100
+++ new/prison-6.23.0/src/lib/pdf417barcode.cpp 2026-02-06 13:18:25.000000000 
+0100
@@ -4,11 +4,19 @@
     SPDX-License-Identifier: MIT
 */
 
+#include "config-prison.h"
+
 #include "pdf417barcode_p.h"
 #include "zxingutil_p.h"
 
+#if KZXING_VERSION < KZXING_VERSION_CHECK(3, 0, 0)
 #include <ZXing/BitMatrix.h>
 #include <ZXing/MultiFormatWriter.h>
+#else
+#include <ZXing/Barcode.h>
+#include <ZXing/CreateBarcode.h>
+#include <ZXing/WriteBarcode.h>
+#endif
 
 #include <stdexcept>
 
@@ -22,6 +30,7 @@
 QImage Pdf417Barcode::paintImage()
 {
     try {
+#if KZXING_VERSION < KZXING_VERSION_CHECK(3, 0, 0)
         ZXing::MultiFormatWriter writer(ZXing::BarcodeFormat::PDF417);
         // ISO/IEC 15438:2006(E) §5.8.3 Quiet Zone
         writer.setMargin(2);
@@ -31,6 +40,12 @@
         // aspect ratio 4 is hard-coded in ZXing
         const auto matrix = writer.encode(ZXingUtil::toStdWString(m_data), 4, 
1);
         return ZXingUtil::toImage(matrix, m_foreground, m_background);
+#else
+        const auto barcode = ZXingUtil::createBarcode(m_data, 
ZXing::BarcodeFormat::PDF417);
+        // ISO/IEC 15438:2006(E) §5.8.3 Quiet Zone
+        const auto writeOpts = ZXing::WriterOptions().addQuietZones(2);
+        return ZXingUtil::toImage(ZXing::WriteBarcodeToImage(barcode, 
writeOpts), m_foreground, m_background);
+#endif
     } catch (const std::invalid_argument &e) {
     }; // input too large
     return {};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prison-6.22.0/src/lib/zxingonedbarcode_p.h 
new/prison-6.23.0/src/lib/zxingonedbarcode_p.h
--- old/prison-6.22.0/src/lib/zxingonedbarcode_p.h      2026-01-02 
18:45:17.000000000 +0100
+++ new/prison-6.23.0/src/lib/zxingonedbarcode_p.h      2026-02-06 
13:18:25.000000000 +0100
@@ -6,11 +6,18 @@
 #ifndef PRISON_ZXINGONEDBARCODE_H
 #define PRISON_ZXINGONEDBARCODE_H
 
+#include "config-prison.h"
+
 #include "abstractbarcode_p.h"
 #include "zxingutil_p.h"
 
+#if KZXING_VERSION < KZXING_VERSION_CHECK(3, 0, 0)
 #include <ZXing/BitMatrix.h>
 #include <ZXing/MultiFormatWriter.h>
+#else
+#include <ZXing/CreateBarcode.h>
+#include <ZXing/WriteBarcode.h>
+#endif
 
 #include <stdexcept>
 
@@ -33,9 +40,14 @@
     inline QImage paintImage() override
     {
         try {
+#if KZXING_VERSION < KZXING_VERSION_CHECK(3, 0, 0)
             ZXing::MultiFormatWriter writer(Format);
             const auto matrix = writer.encode(ZXingUtil::toStdWString(m_data), 
1, 1);
             return ZXingUtil::toImage(matrix, m_foreground, m_background);
+#else
+            const auto barcode = ZXingUtil::createBarcode(m_data, Format);
+            return ZXingUtil::toImage(ZXing::WriteBarcodeToImage(barcode), 
m_foreground, m_background);
+#endif
         } catch (const std::invalid_argument &e) {
         }; // input too large or incompatible
         return {};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prison-6.22.0/src/lib/zxingutil.cpp 
new/prison-6.23.0/src/lib/zxingutil.cpp
--- old/prison-6.22.0/src/lib/zxingutil.cpp     2026-01-02 18:45:17.000000000 
+0100
+++ new/prison-6.23.0/src/lib/zxingutil.cpp     2026-02-06 13:18:25.000000000 
+0100
@@ -3,12 +3,20 @@
     SPDX-License-Identifier: MIT
 */
 
+#include "config-prison.h"
+
 #include "zxingutil_p.h"
 
 #include <QImage>
 #include <QVariant>
 
+#if KZXING_VERSION < KZXING_VERSION_CHECK(3, 0, 0)
 #include <ZXing/BitMatrix.h>
+#else
+#include <ZXing/Barcode.h>
+#include <ZXing/CreateBarcode.h>
+#include <ZXing/ImageView.h>
+#endif
 
 using namespace Prison;
 
@@ -33,6 +41,19 @@
     return {};
 }
 
+#if KZXING_VERSION >= KZXING_VERSION_CHECK(3, 0, 0)
+ZXing::Barcode ZXingUtil::createBarcode(const QVariant &data, const 
ZXing::CreatorOptions &options)
+{
+    if (data.userType() == QMetaType::QByteArray) {
+        const auto ba = data.toByteArray();
+        return ZXing::CreateBarcodeFromBytes(ba.constData(), ba.size(), 
options);
+    }
+    const auto s = data.toString().toUtf8();
+    return ZXing::CreateBarcodeFromText(std::string_view(s.constData(), 
s.size()), options);
+}
+#endif
+
+#if KZXING_VERSION < KZXING_VERSION_CHECK(3, 0, 0)
 QImage ZXingUtil::toImage(const ZXing::BitMatrix &matrix, const QColor 
&foreground, const QColor &background)
 {
     QImage image(matrix.width(), matrix.height(), QImage::Format_ARGB32);
@@ -43,3 +64,15 @@
     }
     return image;
 }
+#else
+QImage ZXingUtil::toImage(const ZXing::Image &img, const QColor &foreground, 
const QColor &background)
+{
+    QImage image(img.width(), img.height(), QImage::Format_ARGB32);
+    for (int y = 0; y < img.height(); ++y) {
+        for (int x = 0; x < img.width(); ++x) {
+            image.setPixel(x, y, *img.data(x, y) ? background.rgb() : 
foreground.rgb());
+        }
+    }
+    return image;
+}
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prison-6.22.0/src/lib/zxingutil_p.h 
new/prison-6.23.0/src/lib/zxingutil_p.h
--- old/prison-6.22.0/src/lib/zxingutil_p.h     2026-01-02 18:45:17.000000000 
+0100
+++ new/prison-6.23.0/src/lib/zxingutil_p.h     2026-02-06 13:18:25.000000000 
+0100
@@ -10,7 +10,10 @@
 
 namespace ZXing
 {
+class Barcode;
 class BitMatrix;
+class CreatorOptions;
+class Image;
 }
 
 class QColor;
@@ -32,9 +35,17 @@
 /*!
  * \internal
  *
+ * Create a barcode from the given data, using binary or text format as 
appropriate.
+ */
+ZXing::Barcode createBarcode(const QVariant &data, const ZXing::CreatorOptions 
&options);
+
+/*!
+ * \internal
+ *
  * Convert the bitmatrix output of ZXing to a QImage.
  */
 QImage toImage(const ZXing::BitMatrix &matrix, const QColor &foreground, const 
QColor &background);
+QImage toImage(const ZXing::Image &img, const QColor &foreground, const QColor 
&background);
 }
 
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prison-6.22.0/src/scanner/config-prison-scanner.h.in 
new/prison-6.23.0/src/scanner/config-prison-scanner.h.in
--- old/prison-6.22.0/src/scanner/config-prison-scanner.h.in    2026-01-02 
18:45:17.000000000 +0100
+++ new/prison-6.23.0/src/scanner/config-prison-scanner.h.in    2026-02-06 
13:18:25.000000000 +0100
@@ -6,9 +6,9 @@
 #ifndef CONFIG_PRISON_SCANNER_H
 #define CONFIG_PRISON_SCANNER_H
 
-#define ZXING_VERSION_MAJOR @ZXing_VERSION_MAJOR@
-#define ZXING_VERSION_MINOR @ZXing_VERSION_MINOR@
-#define ZXING_VERSION_PATCH @ZXing_VERSION_PATCH@
-#define ZXING_VERSION 
((@ZXing_VERSION_MAJOR@<<16)|(@ZXing_VERSION_MINOR@<<8)|(@ZXing_VERSION_PATCH@))
+#define KZXING_VERSION_MAJOR @ZXing_VERSION_MAJOR@
+#define KZXING_VERSION_MINOR @ZXing_VERSION_MINOR@
+#define KZXING_VERSION_PATCH @ZXing_VERSION_PATCH@
+#define KZXING_VERSION 
((@ZXing_VERSION_MAJOR@<<16)|(@ZXing_VERSION_MINOR@<<8)|(@ZXing_VERSION_PATCH@))
 
 #endif // CONFIG_PRISON_SCANNER_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prison-6.22.0/src/scanner/format.cpp 
new/prison-6.23.0/src/scanner/format.cpp
--- old/prison-6.22.0/src/scanner/format.cpp    2026-01-02 18:45:17.000000000 
+0100
+++ new/prison-6.23.0/src/scanner/format.cpp    2026-02-06 13:18:25.000000000 
+0100
@@ -3,6 +3,8 @@
     SPDX-License-Identifier: MIT
 */
 
+#include "config-prison-scanner.h"
+
 #include "format_p.h"
 
 using namespace Prison;
@@ -34,10 +36,19 @@
 
 ZXing::BarcodeFormats Format::toZXing(Format::BarcodeFormats formats)
 {
+#if KZXING_VERSION < QT_VERSION_CHECK(3, 0, 0)
     ZXing::BarcodeFormats f;
+#else
+    std::vector<ZXing::BarcodeFormat> f;
+#endif
+
     for (auto m : format_map) {
         if (m.format & formats) {
+#if KZXING_VERSION < QT_VERSION_CHECK(3, 0, 0)
             f |= m.zxFormat;
+#else
+            f.push_back(m.zxFormat);
+#endif
         }
     }
     return f;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prison-6.22.0/src/scanner/imagescanner.cpp 
new/prison-6.23.0/src/scanner/imagescanner.cpp
--- old/prison-6.22.0/src/scanner/imagescanner.cpp      2026-01-02 
18:45:17.000000000 +0100
+++ new/prison-6.23.0/src/scanner/imagescanner.cpp      2026-02-06 
13:18:25.000000000 +0100
@@ -16,19 +16,32 @@
 #define ZX_USE_UTF8 1
 #include <ZXing/BarcodeFormat.h>
 #include <ZXing/ReadBarcode.h>
-#include <ZXing/Result.h>
 
 using namespace Prison;
 
+#if KZXING_VERSION < QT_VERSION_CHECK(2, 3, 0)
 ZXing::Result ImageScanner::readBarcode(const QImage &image, 
Format::BarcodeFormats formats)
+#else
+ZXing::Barcode ImageScanner::readBarcode(const QImage &image, 
Format::BarcodeFormats formats)
+#endif
 {
+#if KZXING_VERSION < QT_VERSION_CHECK(2, 3, 0)
     ZXing::DecodeHints hints;
-    hints.setFormats(formats == Format::NoFormat ? 
ZXing::BarcodeFormats::all() : Format::toZXing(formats));
+#else
+    ZXing::ReaderOptions hints;
+#endif
+    if (formats != Format::NoFormat) {
+        hints.setFormats(Format::toZXing(formats));
+#if KZXING_VERSION < QT_VERSION_CHECK(3, 0, 0)
+    } else {
+        hints.setFormats(ZXing::BarcodeFormats::all());
+#endif
+    }
 
     // handle formats ZXing supports directly
     switch (image.format()) {
     case QImage::Format_Invalid:
-#if ZXING_VERSION < QT_VERSION_CHECK(1, 4, 0)
+#if KZXING_VERSION < QT_VERSION_CHECK(1, 4, 0)
         return ZXing::Result(ZXing::DecodeStatus::FormatError);
 #else
         return {};
@@ -40,7 +53,11 @@
     case QImage::Format_RGB32:
     case QImage::Format_ARGB32:
     case QImage::Format_ARGB32_Premultiplied:
+#if KZXING_VERSION < QT_VERSION_CHECK(2, 3, 0)
         return ZXing::ReadBarcode({image.bits(), image.width(), 
image.height(), ZXing::ImageFormat::XRGB, (int)image.bytesPerLine()}, hints);
+#else
+        return ZXing::ReadBarcode({image.bits(), image.width(), 
image.height(), ZXing::ImageFormat::ARGB, (int)image.bytesPerLine()}, hints);
+#endif
     case QImage::Format_RGB16:
     case QImage::Format_ARGB8565_Premultiplied:
     case QImage::Format_RGB666:
@@ -56,14 +73,18 @@
     case QImage::Format_RGBX8888:
     case QImage::Format_RGBA8888:
     case QImage::Format_RGBA8888_Premultiplied:
+#if KZXING_VERSION < QT_VERSION_CHECK(2, 3, 0)
         return ZXing::ReadBarcode({image.bits(), image.width(), 
image.height(), ZXing::ImageFormat::RGBX, (int)image.bytesPerLine()}, hints);
+#else
+        return ZXing::ReadBarcode({image.bits(), image.width(), 
image.height(), ZXing::ImageFormat::RGBA, (int)image.bytesPerLine()}, hints);
+#endif
     case QImage::Format_BGR30:
     case QImage::Format_A2BGR30_Premultiplied:
     case QImage::Format_RGB30:
     case QImage::Format_A2RGB30_Premultiplied:
         break; // needs conversion
     case QImage::Format_Alpha8:
-#if ZXING_VERSION < QT_VERSION_CHECK(1, 4, 0)
+#if KZXING_VERSION < QT_VERSION_CHECK(1, 4, 0)
         return ZXing::Result(ZXing::DecodeStatus::FormatError);
 #else
         return {};
@@ -84,10 +105,11 @@
     case QImage::Format_RGBX32FPx4:
     case QImage::Format_RGBA32FPx4:
     case QImage::Format_RGBA32FPx4_Premultiplied:
+    case QImage::Format_CMYK8888:
         break; // needs conversion
 
     case QImage::NImageFormats: // silence warnings
-#if ZXING_VERSION < QT_VERSION_CHECK(1, 4, 0)
+#if KZXING_VERSION < QT_VERSION_CHECK(1, 4, 0)
         return ZXing::Result(ZXing::DecodeStatus::FormatError);
 #else
         return {};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prison-6.22.0/src/scanner/imagescanner_p.h 
new/prison-6.23.0/src/scanner/imagescanner_p.h
--- old/prison-6.22.0/src/scanner/imagescanner_p.h      2026-01-02 
18:45:17.000000000 +0100
+++ new/prison-6.23.0/src/scanner/imagescanner_p.h      2026-02-06 
13:18:25.000000000 +0100
@@ -6,10 +6,16 @@
 #ifndef PRISON_IMAGESCANNER_P_H
 #define PRISON_IMAGESCANNER_P_H
 
+#include "config-prison-scanner.h"
+
 #include "format.h"
 
 #define ZX_USE_UTF8 1
+#if KZXING_VERSION < QT_VERSION_CHECK(2, 3, 0)
 #include <ZXing/Result.h>
+#else
+#include <ZXing/Barcode.h>
+#endif
 
 class QImage;
 
@@ -19,8 +25,11 @@
 namespace ImageScanner
 {
 
+#if KZXING_VERSION < QT_VERSION_CHECK(2, 3, 0)
 [[nodiscard]] ZXing::Result readBarcode(const QImage &image, 
Format::BarcodeFormats formats);
-
+#else
+[[nodiscard]] ZXing::Barcode readBarcode(const QImage &image, 
Format::BarcodeFormats formats);
+#endif
 }
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prison-6.22.0/src/scanner/scanresult.cpp 
new/prison-6.23.0/src/scanner/scanresult.cpp
--- old/prison-6.22.0/src/scanner/scanresult.cpp        2026-01-02 
18:45:17.000000000 +0100
+++ new/prison-6.23.0/src/scanner/scanresult.cpp        2026-02-06 
13:18:25.000000000 +0100
@@ -10,7 +10,9 @@
 #include "scanresult_p.h"
 
 #define ZX_USE_UTF8 1
+#if KZXING_VERSION < QT_VERSION_CHECK(2, 3, 0)
 #include <ZXing/TextUtfEncoding.h>
+#endif
 
 using namespace Prison;
 
@@ -68,14 +70,18 @@
     return d->boundingRect;
 }
 
+#if KZXING_VERSION < QT_VERSION_CHECK(2, 3, 0)
 ScanResult ScanResultPrivate::fromZXingResult(const ZXing::Result &zxRes, 
const QTransform &transform)
+#else
+ScanResult ScanResultPrivate::fromZXingResult(const ZXing::Barcode &zxRes, 
const QTransform &transform)
+#endif
 {
     ScanResult res;
     if (!zxRes.isValid()) {
         return res;
     }
 
-#if ZXING_VERSION < QT_VERSION_CHECK(1, 4, 0)
+#if KZXING_VERSION < QT_VERSION_CHECK(1, 4, 0)
     // distinguish between binary and text content
     const auto hasWideChars = std::any_of(zxRes.text().begin(), 
zxRes.text().end(), [](auto c) {
         return c > 255;
@@ -92,7 +98,14 @@
         res.d->content = b;
     }
 #else
-    if (zxRes.contentType() == ZXing::ContentType::Text) {
+    bool isText = zxRes.contentType() == ZXing::ContentType::Text;
+    if (zxRes.contentType() == ZXing::ContentType::GS1) {
+        isText = std::ranges::none_of(zxRes.text(), [](auto c) {
+            return c < 0x20 && c != 0x0a && c != 0x0d;
+        });
+    }
+
+    if (isText) {
         res.d->content = QString::fromStdString(zxRes.text());
     } else {
         QByteArray b;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prison-6.22.0/src/scanner/scanresult_p.h 
new/prison-6.23.0/src/scanner/scanresult_p.h
--- old/prison-6.22.0/src/scanner/scanresult_p.h        2026-01-02 
18:45:17.000000000 +0100
+++ new/prison-6.23.0/src/scanner/scanresult_p.h        2026-02-06 
13:18:25.000000000 +0100
@@ -6,13 +6,19 @@
 #ifndef PRISON_SCANRESULT_P_H
 #define PRISON_SCANRESULT_P_H
 
+#include "config-prison-scanner.h"
+
 #include "scanresult.h"
 
 #include <QSharedData>
 #include <QTransform>
 
 #define ZX_USE_UTF8 1
+#if KZXING_VERSION < QT_VERSION_CHECK(2, 3, 0)
 #include <ZXing/Result.h>
+#else
+#include <ZXing/Barcode.h>
+#endif
 
 namespace Prison
 {
@@ -20,7 +26,11 @@
 class ScanResultPrivate : public QSharedData
 {
 public:
+#if KZXING_VERSION < QT_VERSION_CHECK(2, 3, 0)
     [[nodiscard]] static ScanResult fromZXingResult(const ZXing::Result 
&zxRes, const QTransform &transform = QTransform());
+#else
+    [[nodiscard]] static ScanResult fromZXingResult(const ZXing::Barcode 
&zxRes, const QTransform &transform = QTransform());
+#endif
 
     QVariant content;
     QRect boundingRect;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prison-6.22.0/src/scanner/videoscannerworker.cpp 
new/prison-6.23.0/src/scanner/videoscannerworker.cpp
--- old/prison-6.22.0/src/scanner/videoscannerworker.cpp        2026-01-02 
18:45:17.000000000 +0100
+++ new/prison-6.23.0/src/scanner/videoscannerworker.cpp        2026-02-06 
13:18:25.000000000 +0100
@@ -28,13 +28,25 @@
 
 void VideoScannerWorker::slotScanFrame(VideoScannerFrame frame)
 {
-#if ZXING_VERSION < QT_VERSION_CHECK(1, 4, 0)
+#if KZXING_VERSION < QT_VERSION_CHECK(1, 4, 0)
     ZXing::Result zxRes(ZXing::DecodeStatus::FormatError);
-#else
+#elif KZXING_VERSION < QT_VERSION_CHECK(2, 3, 0)
     ZXing::Result zxRes;
+#else
+    ZXing::Barcode zxRes;
 #endif
+#if KZXING_VERSION < QT_VERSION_CHECK(2, 3, 0)
     ZXing::DecodeHints hints;
-    hints.setFormats(frame.formats() == Format::NoFormat ? 
ZXing::BarcodeFormats::all() : Format::toZXing(frame.formats()));
+#else
+    ZXing::ReaderOptions hints;
+#endif
+    if (frame.formats() != Format::NoFormat) {
+        hints.setFormats(Format::toZXing(frame.formats()));
+#if KZXING_VERSION < QT_VERSION_CHECK(3, 0, 0)
+    } else {
+        hints.setFormats(ZXing::BarcodeFormats::all());
+#endif
+    }
 
     frame.map();
     switch (frame.pixelFormat()) {
@@ -44,20 +56,36 @@
     case QVideoFrameFormat::Format_ARGB8888:
     case QVideoFrameFormat::Format_ARGB8888_Premultiplied:
     case QVideoFrameFormat::Format_XRGB8888:
+#if KZXING_VERSION < QT_VERSION_CHECK(2, 3, 0)
         zxRes = ZXing::ReadBarcode({frame.bits(), frame.width(), 
frame.height(), ZXing::ImageFormat::XRGB, frame.bytesPerLine()}, hints);
+#else
+        zxRes = ZXing::ReadBarcode({frame.bits(), frame.width(), 
frame.height(), ZXing::ImageFormat::ARGB, frame.bytesPerLine()}, hints);
+#endif
         break;
     case QVideoFrameFormat::Format_BGRA8888:
     case QVideoFrameFormat::Format_BGRA8888_Premultiplied:
     case QVideoFrameFormat::Format_BGRX8888:
+#if KZXING_VERSION < QT_VERSION_CHECK(2, 3, 0)
         zxRes = ZXing::ReadBarcode({frame.bits(), frame.width(), 
frame.height(), ZXing::ImageFormat::BGRX, frame.bytesPerLine()}, hints);
+#else
+        zxRes = ZXing::ReadBarcode({frame.bits(), frame.width(), 
frame.height(), ZXing::ImageFormat::BGRA, frame.bytesPerLine()}, hints);
+#endif
         break;
     case QVideoFrameFormat::Format_ABGR8888:
     case QVideoFrameFormat::Format_XBGR8888:
+#if KZXING_VERSION < QT_VERSION_CHECK(2, 3, 0)
         zxRes = ZXing::ReadBarcode({frame.bits(), frame.width(), 
frame.height(), ZXing::ImageFormat::XBGR, frame.bytesPerLine()}, hints);
+#else
+        zxRes = ZXing::ReadBarcode({frame.bits(), frame.width(), 
frame.height(), ZXing::ImageFormat::ABGR, frame.bytesPerLine()}, hints);
+#endif
         break;
     case QVideoFrameFormat::Format_RGBA8888:
     case QVideoFrameFormat::Format_RGBX8888:
+#if KZXING_VERSION < QT_VERSION_CHECK(2, 3, 0)
         zxRes = ZXing::ReadBarcode({frame.bits(), frame.width(), 
frame.height(), ZXing::ImageFormat::RGBX, frame.bytesPerLine()}, hints);
+#else
+        zxRes = ZXing::ReadBarcode({frame.bits(), frame.width(), 
frame.height(), ZXing::ImageFormat::RGBA, frame.bytesPerLine()}, hints);
+#endif
         break;
     case QVideoFrameFormat::Format_AYUV:
     case QVideoFrameFormat::Format_AYUV_Premultiplied:

Reply via email to