[neon/extras/kdb/Neon/release] debian/patches: add patch from branch

Jonathan Esk-Riddell null at kde.org
Fri Oct 14 15:14:27 BST 2022


Git commit bb4aaa9f270e0036bb52c3eb13133c237123ad12 by Jonathan Esk-Riddell.
Committed on 14/10/2022 at 14:13.
Pushed by jriddell into branch 'Neon/release'.

add patch from branch

A  +61   -0    debian/patches/build-with-newer-qt.diff
M  +1    -0    debian/patches/series

https://invent.kde.org/neon/extras/kdb/commit/bb4aaa9f270e0036bb52c3eb13133c237123ad12

diff --git a/debian/patches/build-with-newer-qt.diff b/debian/patches/build-with-newer-qt.diff
new file mode 100644
index 0000000..a1d8776
--- /dev/null
+++ b/debian/patches/build-with-newer-qt.diff
@@ -0,0 +1,61 @@
+commit b36d74f13a1421437a725fb74502c993c359392a
+Author: Nicolas Fella <nicolas.fella at gmx.de>
+Date:   Mon Nov 16 16:41:27 2020 +0100
+
+    Fix build with newer Qt
+
+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;
+ }
diff --git a/debian/patches/series b/debian/patches/series
index 0570496..3fbf691 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 postgres12.diff
+build-with-newer-qt.diff


More information about the Neon-commits mailing list