From 39172f15beaeda42ee1bc5395c78e4c34f184c8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Fri, 11 Mar 2022 23:45:12 +0100 Subject: [PATCH] kdb: Fix build with Qt 5.15.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Müller --- .../kdb/0001-Fix-build-with-newer-Qt.patch | 71 +++++++++++++++++++ recipes-kde/apps/calligra/kdb_3.2.0.bb | 1 + 2 files changed, 72 insertions(+) create mode 100644 recipes-kde/apps/calligra/kdb/0001-Fix-build-with-newer-Qt.patch diff --git a/recipes-kde/apps/calligra/kdb/0001-Fix-build-with-newer-Qt.patch b/recipes-kde/apps/calligra/kdb/0001-Fix-build-with-newer-Qt.patch new file mode 100644 index 00000000..87e98ae2 --- /dev/null +++ b/recipes-kde/apps/calligra/kdb/0001-Fix-build-with-newer-Qt.patch @@ -0,0 +1,71 @@ +From 3a31ad05fcc7682bf3b65143af99fdb9b2e1e248 Mon Sep 17 00:00:00 2001 +From: Nicolas Fella +Date: Mon, 16 Nov 2020 16:41:27 +0100 +Subject: [PATCH 20/22] Fix build with newer Qt + +(cherry picked from commit b36d74f13a1421437a725fb74502c993c359392a) + +Upstream-Status: Accepted +--- + 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.31.1 + + diff --git a/recipes-kde/apps/calligra/kdb_3.2.0.bb b/recipes-kde/apps/calligra/kdb_3.2.0.bb index 70b7e3c0..ed05c9e5 100644 --- a/recipes-kde/apps/calligra/kdb_3.2.0.bb +++ b/recipes-kde/apps/calligra/kdb_3.2.0.bb @@ -18,6 +18,7 @@ DEPENDS += " \ SRC_URI = " \ ${KDE_MIRROR}/stable/${BPN}/src/${BPN}-${PV}.tar.xz \ file://0001-Do-not-rely-on-python2.patch \ + file://0001-Fix-build-with-newer-Qt.patch \ " SRC_URI[sha256sum] = "8f8983bc8d143832dc14bc2003ba6af1af27688e477c0c791fd61445464f2069"