[neon/extras/kdb/Neon/release] debian: fix build with newer Qt 5.12.x (#1013562)
Pino Toscano
null at kde.org
Mon Oct 17 10:38:43 BST 2022
Git commit 96c756211fcb4f86b726a272b1eabc8530e391ad by Pino Toscano.
Committed on 03/07/2022 at 05:27.
Pushed by jriddell into branch 'Neon/release'.
fix build with newer Qt 5.12.x (#1013562)
backport upstream commit 3a31ad05fcc7682bf3b65143af99fdb9b2e1e248
M +3 -0 debian/changelog
M +1 -0 debian/patches/series
A +68 -0 debian/patches/upstream_Fix-build-with-newer-Qt.patch
https://invent.kde.org/neon/extras/kdb/commit/96c756211fcb4f86b726a272b1eabc8530e391ad
diff --git a/debian/changelog b/debian/changelog
index 5708a90..aab26d7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,9 @@ kdb (3.2.0-6) UNRELEASED; urgency=medium
[ Pino Toscano ]
* CI: enable the blhc job again.
* Bump Standards-Version to 4.6.1, no changes required.
+ * Backport upstream commit 3a31ad05fcc7682bf3b65143af99fdb9b2e1e248 to fix the
+ build with newer Qt 5.12.x; patch upstream_Fix-build-with-newer-Qt.patch.
+ (Closes: #1013562)
-- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org> Sun, 24 Apr 2022 20:27:03 +0200
diff --git a/debian/patches/series b/debian/patches/series
index ba2db54..d3386f7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
upstream_PgSQL-driver-fix-build-with-PostgreSQL-12.patch
+upstream_Fix-build-with-newer-Qt.patch
enable_debianabimanager.diff
diff --git a/debian/patches/upstream_Fix-build-with-newer-Qt.patch b/debian/patches/upstream_Fix-build-with-newer-Qt.patch
new file mode 100644
index 0000000..0fa7b4e
--- /dev/null
+++ b/debian/patches/upstream_Fix-build-with-newer-Qt.patch
@@ -0,0 +1,68 @@
+From 3a31ad05fcc7682bf3b65143af99fdb9b2e1e248 Mon Sep 17 00:00:00 2001
+From: Nicolas Fella <nicolas.fella at gmx.de>
+Date: Mon, 16 Nov 2020 16:41:27 +0100
+Subject: [PATCH] Fix build with newer Qt
+
+(cherry picked from commit b36d74f13a1421437a725fb74502c993c359392a)
+---
+ src/KDb.cpp | 34 +++++++++++++++++-----------------
+ 1 file changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/src/KDb.cpp b/src/KDb.cpp
+index 5c3b601f..ee92c2ee 100644
+--- a/src/KDb.cpp
++++ b/src/KDb.cpp
+@@ -1635,33 +1635,33 @@ QString KDb::escapeBLOB(const QByteArray& array, BLOBEscapingType type)
+ for (int i = 0; i < size; i++) {
+ const unsigned char val = array[i];
+ if (val < 32 || val >= 127 || val == 39 || val == 92) {
+- str[new_length++] = '\\';
+- str[new_length++] = '\\';
+- str[new_length++] = '0' + val / 64;
+- str[new_length++] = '0' + (val % 64) / 8;
+- str[new_length++] = '0' + val % 8;
++ str[new_length++] = QLatin1Char('\\');
++ str[new_length++] = QLatin1Char('\\');
++ str[new_length++] = QChar::fromLatin1('0' + val / 64);
++ str[new_length++] = QChar::fromLatin1('0' + (val % 64) / 8);
++ str[new_length++] = QChar::fromLatin1('0' + val % 8);
+ } else {
+- str[new_length++] = val;
++ str[new_length++] = QChar::fromLatin1(val);
+ }
+ }
+ } else {
+ for (int i = 0; i < size; i++) {
+ const unsigned char val = array[i];
+- str[new_length++] = intToHexDigit(val / 16);
+- str[new_length++] = intToHexDigit(val % 16);
++ str[new_length++] = QChar::fromLatin1(intToHexDigit(val / 16));
++ str[new_length++] = QChar::fromLatin1(intToHexDigit(val % 16));
+ }
+ }
+ if (type == BLOBEscapingType::XHex || type == BLOBEscapingType::Octal) {
+- str[new_length++] = '\'';
++ str[new_length++] = QLatin1Char('\'');
+ } else if (type == BLOBEscapingType::ByteaHex) {
+- str[new_length++] = '\'';
+- str[new_length++] = ':';
+- str[new_length++] = ':';
+- str[new_length++] = 'b';
+- str[new_length++] = 'y';
+- str[new_length++] = 't';
+- str[new_length++] = 'e';
+- str[new_length++] = 'a';
++ str[new_length++] = QLatin1Char('\'');
++ str[new_length++] = QLatin1Char(':');
++ str[new_length++] = QLatin1Char(':');
++ str[new_length++] = QLatin1Char('b');
++ str[new_length++] = QLatin1Char('y');
++ str[new_length++] = QLatin1Char('t');
++ str[new_length++] = QLatin1Char('e');
++ str[new_length++] = QLatin1Char('a');
+ }
+ return str;
+ }
+--
+2.35.1
+
More information about the Neon-commits
mailing list