[neon/qt/qtbase/Neon/release] debian/patches: refresh patches
Carlos De Maine
null at kde.org
Sat Apr 6 06:30:07 BST 2024
Git commit 70a87674804e2330ebcafa1abb4333904cdb9191 by Carlos De Maine.
Committed on 06/04/2024 at 05:29.
Pushed by carlosdem into branch 'Neon/release'.
refresh patches
D +0 -54 debian/patches/0001-let-qlibraryinfo-fall-back-to-locate-qt.conf-via-XDG.patch
D +0 -330 debian/patches/CVE-2023-24607.diff
D +0 -18 debian/patches/CVE-2023-32762.diff
D +0 -50 debian/patches/CVE-2023-32763.diff
D +0 -77 debian/patches/CVE-2023-33285.diff
D +0 -34 debian/patches/CVE-2023-34410.diff
M +1 -1 debian/patches/a11y_root.diff
M +3 -5 debian/patches/cast_types_for_egl_x11_test.diff
D +0 -39 debian/patches/dont_use_O_PATH.diff
D +0 -80 debian/patches/fix_alt_backtick.diff
D +0 -32 debian/patches/fix_qdbusmacros_h.diff
D +0 -27 debian/patches/fusion_checkable_qpushbutton.diff
M +1 -1 debian/patches/gnome_wayland.diff
M +1 -1 debian/patches/gnukfreebsd.diff
D +0 -66 debian/patches/image_deletion_order.diff
D +0 -51 debian/patches/mime_globs.diff
D +0 -44 debian/patches/mysql_remove_version_checks.diff
M +2 -2 debian/patches/nonlinux_utime.diff
M +1 -1 debian/patches/path_max.diff
M +1 -1 debian/patches/qdoc_default_incdirs.diff
D +0 -21 debian/patches/qiodevice_readline_memory.diff
M +3 -3 debian/patches/qmenu_set_transient_parent.diff
D +0 -25 debian/patches/qnam_connect_memory_leak.diff
D +0 -25 debian/patches/qshapedpixmapwindow_no_tooltip.diff
M +2 -2 debian/patches/qstorageinfo_linux.diff
M +2 -4 debian/patches/qtbase-avoid-hardcoding-kernel-version.patch
D +0 -44 debian/patches/qxcbwindow_set_geometry.diff
M +1 -1 debian/patches/remove_privacy_breaches.diff
D +0 -102 debian/patches/revert_startBlocking_removal.diff
M +9 -27 debian/patches/series
D +0 -32 debian/patches/sql_odbc_fix_unicode_check.diff
D +0 -35 debian/patches/sql_odbc_more_unicode_checks.diff
D +0 -53 debian/patches/xcb_add_a_timeout_control_when_reading_INCR_property.diff
D +0 -26 debian/patches/xcb_screens_uaf.patch
https://invent.kde.org/neon/qt/qtbase/-/commit/70a87674804e2330ebcafa1abb4333904cdb9191
diff --git a/debian/patches/0001-let-qlibraryinfo-fall-back-to-locate-qt.conf-via-XDG.patch b/debian/patches/0001-let-qlibraryinfo-fall-back-to-locate-qt.conf-via-XDG.patch
deleted file mode 100644
index 822c212..0000000
--- a/debian/patches/0001-let-qlibraryinfo-fall-back-to-locate-qt.conf-via-XDG.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 31674c78fe9c38ace338335f0aefd2ce4db7df4a Mon Sep 17 00:00:00 2001
-From: Harald Sitter <sitter at kde.org>
-Date: Wed, 16 Jan 2019 12:02:19 +0100
-Subject: [PATCH] let qlibraryinfo fall back to locate qt.conf via XDG_* env
- vars
-
-this makes qt/qtwebengine somewhat more relocatable as it enables snaps
-to generate a qt.conf at runtime and put it in a path so that QLI might
-find it. without this we literally cannot run QWE without extensive and
-expensive hacks as it fails to locate its runtime assets.
----
- src/corelib/global/qlibraryinfo.cpp | 22 +++++++++++++++++++++-
- 1 file changed, 21 insertions(+), 1 deletion(-)
-
-Index: qtbase-everywhere-src-5.15.0/src/corelib/global/qlibraryinfo.cpp
-===================================================================
---- qtbase-everywhere-src-5.15.0.orig/src/corelib/global/qlibraryinfo.cpp
-+++ qtbase-everywhere-src-5.15.0/src/corelib/global/qlibraryinfo.cpp
-@@ -180,6 +180,26 @@ void QLibrarySettings::load()
- }
- }
-
-+static QSettings *__qli_findXDGConfig()
-+{
-+ // https://bugreports.qt.io/browse/QTBUG-14150
-+ if (qgetenv("SNAP").isEmpty())
-+ return 0;
-+ const QString configHome = qEnvironmentVariable("XDG_CONFIG_HOME");
-+ const QString configDirs = qEnvironmentVariable("XDG_CONFIG_DIRS");
-+ const QString pathVars[] = { configHome, configDirs };
-+ for (const QString &paths : pathVars) {
-+ for (const QString &path : paths.split(QChar(':'))) {
-+ if (path.isEmpty())
-+ continue;
-+ const QString qtconfig = path + QStringLiteral("/qt.conf");
-+ if (QFile::exists(qtconfig))
-+ return new QSettings(qtconfig, QSettings::IniFormat);
-+ }
-+ }
-+ return 0;
-+}
-+
- QSettings *QLibraryInfoPrivate::findConfiguration()
- {
- #ifdef QT_BUILD_QMAKE
-@@ -212,7 +232,7 @@ QSettings *QLibraryInfoPrivate::findConf
- return new QSettings(qtconfig, QSettings::IniFormat);
- }
- #endif
-- return nullptr; //no luck
-+ return __qli_findXDGConfig(); //no luck
- }
-
- #endif // settings
diff --git a/debian/patches/CVE-2023-24607.diff b/debian/patches/CVE-2023-24607.diff
deleted file mode 100644
index a7977dc..0000000
--- a/debian/patches/CVE-2023-24607.diff
+++ /dev/null
@@ -1,330 +0,0 @@
-Description: Fix denial-of-service in Qt SQL ODBC driver plugin
-Origin: upstream, https://download.qt.io/official_releases/qt/5.15/CVE-2023-24607-qtbase-5.15.diff
-Last-Update: 2023-02-26
-
---- a/src/plugins/sqldrivers/odbc/qsql_odbc.cpp
-+++ b/src/plugins/sqldrivers/odbc/qsql_odbc.cpp
-@@ -92,23 +92,39 @@ inline static QString fromSQLTCHAR(const
- return result;
- }
-
-+template <size_t SizeOfChar = sizeof(SQLTCHAR)>
-+void toSQLTCHARImpl(QVarLengthArray<SQLTCHAR> &result, const QString &input); // primary template undefined
-+
-+template <typename Container>
-+void do_append(QVarLengthArray<SQLTCHAR> &result, const Container &c)
-+{
-+ result.append(reinterpret_cast<const SQLTCHAR *>(c.data()), c.size());
-+}
-+
-+template <>
-+void toSQLTCHARImpl<1>(QVarLengthArray<SQLTCHAR> &result, const QString &input)
-+{
-+ const auto u8 = input.toUtf8();
-+ do_append(result, u8);
-+}
-+
-+template <>
-+void toSQLTCHARImpl<2>(QVarLengthArray<SQLTCHAR> &result, const QString &input)
-+{
-+ do_append(result, input);
-+}
-+
-+template <>
-+void toSQLTCHARImpl<4>(QVarLengthArray<SQLTCHAR> &result, const QString &input)
-+{
-+ const auto u32 = input.toUcs4();
-+ do_append(result, u32);
-+}
-+
- inline static QVarLengthArray<SQLTCHAR> toSQLTCHAR(const QString &input)
- {
- QVarLengthArray<SQLTCHAR> result;
-- result.resize(input.size());
-- switch(sizeof(SQLTCHAR)) {
-- case 1:
-- memcpy(result.data(), input.toUtf8().data(), input.size());
-- break;
-- case 2:
-- memcpy(result.data(), input.unicode(), input.size() * 2);
-- break;
-- case 4:
-- memcpy(result.data(), input.toUcs4().data(), input.size() * 4);
-- break;
-- default:
-- qCritical("sizeof(SQLTCHAR) is %d. Don't know how to handle this.", int(sizeof(SQLTCHAR)));
-- }
-+ toSQLTCHARImpl(result, input);
- result.append(0); // make sure it's null terminated, doesn't matter if it already is, it does if it isn't.
- return result;
- }
-@@ -763,6 +779,14 @@ QChar QODBCDriverPrivate::quoteChar()
- return quote;
- }
-
-+static SQLRETURN qt_string_SQLSetConnectAttr(SQLHDBC handle, SQLINTEGER attr, const QString &val)
-+{
-+ auto encoded = toSQLTCHAR(val);
-+ return SQLSetConnectAttr(handle, attr,
-+ encoded.data(),
-+ SQLINTEGER(encoded.size() * sizeof(SQLTCHAR))); // size in bytes
-+}
-+
-
- bool QODBCDriverPrivate::setConnectionOptions(const QString& connOpts)
- {
-@@ -798,10 +822,7 @@ bool QODBCDriverPrivate::setConnectionOp
- v = val.toUInt();
- r = SQLSetConnectAttr(hDbc, SQL_ATTR_LOGIN_TIMEOUT, (SQLPOINTER) size_t(v), 0);
- } else if (opt.toUpper() == QLatin1String("SQL_ATTR_CURRENT_CATALOG")) {
-- val.utf16(); // 0 terminate
-- r = SQLSetConnectAttr(hDbc, SQL_ATTR_CURRENT_CATALOG,
-- toSQLTCHAR(val).data(),
-- val.length()*sizeof(SQLTCHAR));
-+ r = qt_string_SQLSetConnectAttr(hDbc, SQL_ATTR_CURRENT_CATALOG, val);
- } else if (opt.toUpper() == QLatin1String("SQL_ATTR_METADATA_ID")) {
- if (val.toUpper() == QLatin1String("SQL_TRUE")) {
- v = SQL_TRUE;
-@@ -816,10 +837,7 @@ bool QODBCDriverPrivate::setConnectionOp
- v = val.toUInt();
- r = SQLSetConnectAttr(hDbc, SQL_ATTR_PACKET_SIZE, (SQLPOINTER) size_t(v), 0);
- } else if (opt.toUpper() == QLatin1String("SQL_ATTR_TRACEFILE")) {
-- val.utf16(); // 0 terminate
-- r = SQLSetConnectAttr(hDbc, SQL_ATTR_TRACEFILE,
-- toSQLTCHAR(val).data(),
-- val.length()*sizeof(SQLTCHAR));
-+ r = qt_string_SQLSetConnectAttr(hDbc, SQL_ATTR_TRACEFILE, val);
- } else if (opt.toUpper() == QLatin1String("SQL_ATTR_TRACE")) {
- if (val.toUpper() == QLatin1String("SQL_OPT_TRACE_OFF")) {
- v = SQL_OPT_TRACE_OFF;
-@@ -1022,9 +1040,12 @@ bool QODBCResult::reset (const QString&
- return false;
- }
-
-- r = SQLExecDirect(d->hStmt,
-- toSQLTCHAR(query).data(),
-- (SQLINTEGER) query.length());
-+ {
-+ auto encoded = toSQLTCHAR(query);
-+ r = SQLExecDirect(d->hStmt,
-+ encoded.data(),
-+ SQLINTEGER(encoded.size()));
-+ }
- if (r != SQL_SUCCESS && r != SQL_SUCCESS_WITH_INFO && r!= SQL_NO_DATA) {
- setLastError(qMakeError(QCoreApplication::translate("QODBCResult",
- "Unable to execute statement"), QSqlError::StatementError, d));
-@@ -1371,9 +1392,12 @@ bool QODBCResult::prepare(const QString&
- return false;
- }
-
-- r = SQLPrepare(d->hStmt,
-- toSQLTCHAR(query).data(),
-- (SQLINTEGER) query.length());
-+ {
-+ auto encoded = toSQLTCHAR(query);
-+ r = SQLPrepare(d->hStmt,
-+ encoded.data(),
-+ SQLINTEGER(encoded.size()));
-+ }
-
- if (r != SQL_SUCCESS) {
- setLastError(qMakeError(QCoreApplication::translate("QODBCResult",
-@@ -1401,7 +1425,7 @@ bool QODBCResult::exec()
- SQLCloseCursor(d->hStmt);
-
- QVector<QVariant>& values = boundValues();
-- QVector<QByteArray> tmpStorage(values.count(), QByteArray()); // holds temporary buffers
-+ QVector<QByteArray> tmpStorage(values.count(), QByteArray()); // targets for SQLBindParameter()
- QVarLengthArray<SQLLEN, 32> indicators(values.count());
- memset(indicators.data(), 0, indicators.size() * sizeof(SQLLEN));
-
-@@ -1580,35 +1604,36 @@ bool QODBCResult::exec()
- case QVariant::String:
- if (d->unicode) {
- QByteArray &ba = tmpStorage[i];
-- QString str = val.toString();
-+ {
-+ const auto encoded = toSQLTCHAR(val.toString());
-+ ba = QByteArray(reinterpret_cast<const char *>(encoded.data()),
-+ encoded.size() * sizeof(SQLTCHAR));
-+ }
-+
- if (*ind != SQL_NULL_DATA)
-- *ind = str.length() * sizeof(SQLTCHAR);
-- int strSize = str.length() * sizeof(SQLTCHAR);
-+ *ind = ba.size();
-
- if (bindValueType(i) & QSql::Out) {
-- const QVarLengthArray<SQLTCHAR> a(toSQLTCHAR(str));
-- ba = QByteArray((const char *)a.constData(), a.size() * sizeof(SQLTCHAR));
- r = SQLBindParameter(d->hStmt,
- i + 1,
- qParamType[bindValueType(i) & QSql::InOut],
- SQL_C_TCHAR,
-- strSize > 254 ? SQL_WLONGVARCHAR : SQL_WVARCHAR,
-+ ba.size() > 254 ? SQL_WLONGVARCHAR : SQL_WVARCHAR,
- 0, // god knows... don't change this!
- 0,
-- ba.data(),
-+ const_cast<char *>(ba.constData()), // don't detach
- ba.size(),
- ind);
- break;
- }
-- ba = QByteArray ((const char *)toSQLTCHAR(str).constData(), str.size()*sizeof(SQLTCHAR));
- r = SQLBindParameter(d->hStmt,
- i + 1,
- qParamType[bindValueType(i) & QSql::InOut],
- SQL_C_TCHAR,
-- strSize > 254 ? SQL_WLONGVARCHAR : SQL_WVARCHAR,
-- strSize,
-+ ba.size() > 254 ? SQL_WLONGVARCHAR : SQL_WVARCHAR,
-+ ba.size(),
- 0,
-- const_cast<char *>(ba.constData()),
-+ const_cast<char *>(ba.constData()), // don't detach
- ba.size(),
- ind);
- break;
-@@ -1716,10 +1741,11 @@ bool QODBCResult::exec()
- case QVariant::String:
- if (d->unicode) {
- if (bindValueType(i) & QSql::Out) {
-- const QByteArray &first = tmpStorage.at(i);
-- QVarLengthArray<SQLTCHAR> array;
-- array.append((const SQLTCHAR *)first.constData(), first.size());
-- values[i] = fromSQLTCHAR(array, first.size()/sizeof(SQLTCHAR));
-+ const QByteArray &bytes = tmpStorage.at(i);
-+ const auto strSize = bytes.size() / int(sizeof(SQLTCHAR));
-+ QVarLengthArray<SQLTCHAR> string(strSize);
-+ memcpy(string.data(), bytes.data(), strSize * sizeof(SQLTCHAR));
-+ values[i] = fromSQLTCHAR(string);
- }
- break;
- }
-@@ -1966,14 +1992,16 @@ bool QODBCDriver::open(const QString & d
- SQLSMALLINT cb;
- QVarLengthArray<SQLTCHAR> connOut(1024);
- memset(connOut.data(), 0, connOut.size() * sizeof(SQLTCHAR));
-- r = SQLDriverConnect(d->hDbc,
-- NULL,
-- toSQLTCHAR(connQStr).data(),
-- (SQLSMALLINT)connQStr.length(),
-- connOut.data(),
-- 1024,
-- &cb,
-- /*SQL_DRIVER_NOPROMPT*/0);
-+ {
-+ auto encoded = toSQLTCHAR(connQStr);
-+ r = SQLDriverConnect(d->hDbc,
-+ nullptr,
-+ encoded.data(), SQLSMALLINT(encoded.size()),
-+ connOut.data(),
-+ 1024,
-+ &cb,
-+ /*SQL_DRIVER_NOPROMPT*/0);
-+ }
-
- if (r != SQL_SUCCESS && r != SQL_SUCCESS_WITH_INFO) {
- setLastError(qMakeError(tr("Unable to connect"), QSqlError::ConnectionError, d));
-@@ -2352,17 +2380,15 @@ QStringList QODBCDriver::tables(QSql::Ta
- if (tableType.isEmpty())
- return tl;
-
-- QString joinedTableTypeString = tableType.join(QLatin1Char(','));
-+ {
-+ auto joinedTableTypeString = toSQLTCHAR(tableType.join(u','));
-
-- r = SQLTables(hStmt,
-- NULL,
-- 0,
-- NULL,
-- 0,
-- NULL,
-- 0,
-- toSQLTCHAR(joinedTableTypeString).data(),
-- joinedTableTypeString.length() /* characters, not bytes */);
-+ r = SQLTables(hStmt,
-+ nullptr, 0,
-+ nullptr, 0,
-+ nullptr, 0,
-+ joinedTableTypeString.data(), joinedTableTypeString.size());
-+ }
-
- if (r != SQL_SUCCESS)
- qSqlWarning(QLatin1String("QODBCDriver::tables Unable to execute table list"), d);
-@@ -2436,28 +2462,30 @@ QSqlIndex QODBCDriver::primaryIndex(cons
- SQL_ATTR_CURSOR_TYPE,
- (SQLPOINTER)SQL_CURSOR_FORWARD_ONLY,
- SQL_IS_UINTEGER);
-- r = SQLPrimaryKeys(hStmt,
-- catalog.length() == 0 ? NULL : toSQLTCHAR(catalog).data(),
-- catalog.length(),
-- schema.length() == 0 ? NULL : toSQLTCHAR(schema).data(),
-- schema.length(),
-- toSQLTCHAR(table).data(),
-- table.length() /* in characters, not in bytes */);
-+ {
-+ auto c = toSQLTCHAR(catalog);
-+ auto s = toSQLTCHAR(schema);
-+ auto t = toSQLTCHAR(table);
-+ r = SQLPrimaryKeys(hStmt,
-+ catalog.isEmpty() ? nullptr : c.data(), c.size(),
-+ schema.isEmpty() ? nullptr : s.data(), s.size(),
-+ t.data(), t.size());
-+ }
-
- // if the SQLPrimaryKeys() call does not succeed (e.g the driver
- // does not support it) - try an alternative method to get hold of
- // the primary index (e.g MS Access and FoxPro)
- if (r != SQL_SUCCESS) {
-- r = SQLSpecialColumns(hStmt,
-- SQL_BEST_ROWID,
-- catalog.length() == 0 ? NULL : toSQLTCHAR(catalog).data(),
-- catalog.length(),
-- schema.length() == 0 ? NULL : toSQLTCHAR(schema).data(),
-- schema.length(),
-- toSQLTCHAR(table).data(),
-- table.length(),
-- SQL_SCOPE_CURROW,
-- SQL_NULLABLE);
-+ auto c = toSQLTCHAR(catalog);
-+ auto s = toSQLTCHAR(schema);
-+ auto t = toSQLTCHAR(table);
-+ r = SQLSpecialColumns(hStmt,
-+ SQL_BEST_ROWID,
-+ catalog.isEmpty() ? nullptr : c.data(), c.size(),
-+ schema.isEmpty() ? nullptr : s.data(), s.size(),
-+ t.data(), t.size(),
-+ SQL_SCOPE_CURROW,
-+ SQL_NULLABLE);
-
- if (r != SQL_SUCCESS) {
- qSqlWarning(QLatin1String("QODBCDriver::primaryIndex: Unable to execute primary key list"), d);
-@@ -2538,15 +2566,17 @@ QSqlRecord QODBCDriver::record(const QSt
- SQL_ATTR_CURSOR_TYPE,
- (SQLPOINTER)SQL_CURSOR_FORWARD_ONLY,
- SQL_IS_UINTEGER);
-- r = SQLColumns(hStmt,
-- catalog.length() == 0 ? NULL : toSQLTCHAR(catalog).data(),
-- catalog.length(),
-- schema.length() == 0 ? NULL : toSQLTCHAR(schema).data(),
-- schema.length(),
-- toSQLTCHAR(table).data(),
-- table.length(),
-- NULL,
-- 0);
-+ {
-+ auto c = toSQLTCHAR(catalog);
-+ auto s = toSQLTCHAR(schema);
-+ auto t = toSQLTCHAR(table);
-+ r = SQLColumns(hStmt,
-+ catalog.isEmpty() ? nullptr : c.data(), c.size(),
-+ schema.isEmpty() ? nullptr : s.data(), s.size(),
-+ t.data(), t.size(),
-+ nullptr,
-+ 0);
-+ }
- if (r != SQL_SUCCESS)
- qSqlWarning(QLatin1String("QODBCDriver::record: Unable to execute column list"), d);
-
diff --git a/debian/patches/CVE-2023-32762.diff b/debian/patches/CVE-2023-32762.diff
deleted file mode 100644
index ef4376d..0000000
--- a/debian/patches/CVE-2023-32762.diff
+++ /dev/null
@@ -1,18 +0,0 @@
-Description: hsts: match header names case insensitively
- Header field names are always considered to be case-insensitive.
-Origin: upstream, https://download.qt.io/official_releases/qt/5.15/CVE-2023-32762-qtbase-5.15.diff
-Last-Update: 2023-05-22
-
---- a/src/network/access/qhsts.cpp
-+++ b/src/network/access/qhsts.cpp
-@@ -364,8 +364,8 @@ quoted-pair = "\" CHAR
- bool QHstsHeaderParser::parse(const QList<QPair<QByteArray, QByteArray>> &headers)
- {
- for (const auto &h : headers) {
-- // We use '==' since header name was already 'trimmed' for us:
-- if (h.first == "Strict-Transport-Security") {
-+ // We compare directly because header name was already 'trimmed' for us:
-+ if (h.first.compare("Strict-Transport-Security", Qt::CaseInsensitive) == 0) {
- header = h.second;
- // RFC6797, 8.1:
- //
diff --git a/debian/patches/CVE-2023-32763.diff b/debian/patches/CVE-2023-32763.diff
deleted file mode 100644
index 3de1b41..0000000
--- a/debian/patches/CVE-2023-32763.diff
+++ /dev/null
@@ -1,50 +0,0 @@
-Description: fix buffer overflow in Qt SVG
- Adds qAddOverflow and qMulOverflow definitions to QFixed.
-Origin: upstream, https://download.qt.io/official_releases/qt/5.15/CVE-2023-32763-qtbase-5.15.diff
-Last-Update: 2023-05-22
-
---- a/src/gui/painting/qfixed_p.h
-+++ b/src/gui/painting/qfixed_p.h
-@@ -54,6 +54,7 @@
- #include <QtGui/private/qtguiglobal_p.h>
- #include "QtCore/qdebug.h"
- #include "QtCore/qpoint.h"
-+#include <QtCore/private/qnumeric_p.h>
- #include "QtCore/qsize.h"
-
- QT_BEGIN_NAMESPACE
-@@ -182,6 +183,14 @@ Q_DECL_CONSTEXPR inline bool operator<(i
- Q_DECL_CONSTEXPR inline bool operator>(const QFixed &f, int i) { return f.value() > i * 64; }
- Q_DECL_CONSTEXPR inline bool operator>(int i, const QFixed &f) { return i * 64 > f.value(); }
-
-+inline bool qAddOverflow(QFixed v1, QFixed v2, QFixed *r)
-+{
-+ int val;
-+ bool result = add_overflow(v1.value(), v2.value(), &val);
-+ r->setValue(val);
-+ return result;
-+}
-+
- #ifndef QT_NO_DEBUG_STREAM
- inline QDebug &operator<<(QDebug &dbg, const QFixed &f)
- { return dbg << f.toReal(); }
---- a/src/gui/text/qtextlayout.cpp
-+++ b/src/gui/text/qtextlayout.cpp
-@@ -2150,11 +2150,14 @@ found:
- eng->maxWidth = qMax(eng->maxWidth, line.textWidth);
- } else {
- eng->minWidth = qMax(eng->minWidth, lbh.minw);
-- eng->maxWidth += line.textWidth;
-+ if (qAddOverflow(eng->maxWidth, line.textWidth, &eng->maxWidth))
-+ eng->maxWidth = QFIXED_MAX;
- }
-
-- if (line.textWidth > 0 && item < eng->layoutData->items.size())
-- eng->maxWidth += lbh.spaceData.textWidth;
-+ if (line.textWidth > 0 && item < eng->layoutData->items.size()) {
-+ if (qAddOverflow(eng->maxWidth, lbh.spaceData.textWidth, &eng->maxWidth))
-+ eng->maxWidth = QFIXED_MAX;
-+ }
-
- line.textWidth += trailingSpace;
- if (lbh.spaceData.length) {
diff --git a/debian/patches/CVE-2023-33285.diff b/debian/patches/CVE-2023-33285.diff
deleted file mode 100644
index 9eadaf6..0000000
--- a/debian/patches/CVE-2023-33285.diff
+++ /dev/null
@@ -1,77 +0,0 @@
-Description: QDnsLookup/Unix: make sure we don't overflow the buffer
- The DNS Records are variable length and encode their size in 16 bits
- before the Record Data (RDATA). Ensure that both the RDATA and the
- Record header fields before it fall inside the buffer we have.
- .
- Additionally reject any replies containing more than one query records.
-Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=7dba2c87619d558a
-Last-Update: 2023-05-25
-
---- a/src/network/kernel/qdnslookup_unix.cpp
-+++ b/src/network/kernel/qdnslookup_unix.cpp
-@@ -227,7 +227,6 @@ void QDnsLookupRunnable::query(const int
- // responseLength in case of error, we still can extract the
- // exact error code from the response.
- HEADER *header = (HEADER*)response;
-- const int answerCount = ntohs(header->ancount);
- switch (header->rcode) {
- case NOERROR:
- break;
-@@ -260,18 +259,31 @@ void QDnsLookupRunnable::query(const int
- return;
- }
-
-- // Skip the query host, type (2 bytes) and class (2 bytes).
- char host[PACKETSZ], answer[PACKETSZ];
- unsigned char *p = response + sizeof(HEADER);
-- int status = local_dn_expand(response, response + responseLength, p, host, sizeof(host));
-- if (status < 0) {
-+ int status;
-+
-+ if (ntohs(header->qdcount) == 1) {
-+ // Skip the query host, type (2 bytes) and class (2 bytes).
-+ status = local_dn_expand(response, response + responseLength, p, host, sizeof(host));
-+ if (status < 0) {
-+ reply->error = QDnsLookup::InvalidReplyError;
-+ reply->errorString = tr("Could not expand domain name");
-+ return;
-+ }
-+ if ((p - response) + status + 4 >= responseLength)
-+ header->qdcount = 0xffff; // invalid reply below
-+ else
-+ p += status + 4;
-+ }
-+ if (ntohs(header->qdcount) > 1) {
- reply->error = QDnsLookup::InvalidReplyError;
-- reply->errorString = tr("Could not expand domain name");
-+ reply->errorString = tr("Invalid reply received");
- return;
- }
-- p += status + 4;
-
- // Extract results.
-+ const int answerCount = ntohs(header->ancount);
- int answerIndex = 0;
- while ((p < response + responseLength) && (answerIndex < answerCount)) {
- status = local_dn_expand(response, response + responseLength, p, host, sizeof(host));
-@@ -283,6 +295,11 @@ void QDnsLookupRunnable::query(const int
- const QString name = QUrl::fromAce(host);
-
- p += status;
-+
-+ if ((p - response) + 10 > responseLength) {
-+ // probably just a truncated reply, return what we have
-+ return;
-+ }
- const quint16 type = (p[0] << 8) | p[1];
- p += 2; // RR type
- p += 2; // RR class
-@@ -290,6 +307,8 @@ void QDnsLookupRunnable::query(const int
- p += 4;
- const quint16 size = (p[0] << 8) | p[1];
- p += 2;
-+ if ((p - response) + size > responseLength)
-+ return; // truncated
-
- if (type == QDnsLookup::A) {
- if (size != 4) {
diff --git a/debian/patches/CVE-2023-34410.diff b/debian/patches/CVE-2023-34410.diff
deleted file mode 100644
index bc5e30d..0000000
--- a/debian/patches/CVE-2023-34410.diff
+++ /dev/null
@@ -1,34 +0,0 @@
-Description: Ssl: Copy the on-demand cert loading bool from default config
- Otherwise individual sockets will still load system certificates when
- a chain doesn't match against the configured CA certificates.
- That's not intended behavior, since specifically setting the CA
- certificates means you don't want the system certificates to be used.
- .
- This is potentially a breaking change because now, if you ever add a
- CA to the default config, it will disable loading system certificates
- on demand for all sockets. And the only way to re-enable it is to
- create a null-QSslConfiguration and set it as the new default.
-Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=57ba6260c0801055
-Last-Update: 2023-06-08
-
---- a/src/network/ssl/qsslsocket.cpp
-+++ b/src/network/ssl/qsslsocket.cpp
-@@ -2221,6 +2221,10 @@ QSslSocketPrivate::QSslSocketPrivate()
- , flushTriggered(false)
- {
- QSslConfigurationPrivate::deepCopyDefaultConfiguration(&configuration);
-+ // If the global configuration doesn't allow root certificates to be loaded
-+ // on demand then we have to disable it for this socket as well.
-+ if (!configuration.allowRootCertOnDemandLoading)
-+ allowRootCertOnDemandLoading = false;
- }
-
- /*!
-@@ -2470,6 +2474,7 @@ void QSslConfigurationPrivate::deepCopyD
- ptr->sessionProtocol = global->sessionProtocol;
- ptr->ciphers = global->ciphers;
- ptr->caCertificates = global->caCertificates;
-+ ptr->allowRootCertOnDemandLoading = global->allowRootCertOnDemandLoading;
- ptr->protocol = global->protocol;
- ptr->peerVerifyMode = global->peerVerifyMode;
- ptr->peerVerifyDepth = global->peerVerifyDepth;
diff --git a/debian/patches/a11y_root.diff b/debian/patches/a11y_root.diff
index 0a770c9..a7df01d 100644
--- a/debian/patches/a11y_root.diff
+++ b/debian/patches/a11y_root.diff
@@ -14,7 +14,7 @@ Last-Update: 2023-04-15
--- a/src/platformsupport/linuxaccessibility/bridge.cpp
+++ b/src/platformsupport/linuxaccessibility/bridge.cpp
-@@ -65,6 +65,14 @@ QSpiAccessibleBridge::QSpiAccessibleBrid
+@@ -65,6 +65,14 @@
{
dbusConnection = new DBusConnection();
connect(dbusConnection, SIGNAL(enabledChanged(bool)), this, SLOT(enabledChanged(bool)));
diff --git a/debian/patches/cast_types_for_egl_x11_test.diff b/debian/patches/cast_types_for_egl_x11_test.diff
index 2104403..b8f36d8 100644
--- a/debian/patches/cast_types_for_egl_x11_test.diff
+++ b/debian/patches/cast_types_for_egl_x11_test.diff
@@ -2,11 +2,9 @@ Description: properly cast types for libglvnd 1.3.4
Origin: https://src.fedoraproject.org/rpms/qt5-qtbase/blob/rawhide/f/qtbase-everywhere-src-5.15.2-libglvnd.patch
Author: Rex Dieter <rdieter at gmail.com>
-Index: qtbase-everywhere-src-5.15.5/src/gui/configure.json
-===================================================================
---- qtbase-everywhere-src-5.15.5.orig/src/gui/configure.json
-+++ qtbase-everywhere-src-5.15.5/src/gui/configure.json
-@@ -838,9 +838,9 @@
+--- a/src/gui/configure.json
++++ b/src/gui/configure.json
+@@ -839,9 +839,9 @@
],
"include": [ "EGL/egl.h", "X11/Xlib.h" ],
"main": [
diff --git a/debian/patches/dont_use_O_PATH.diff b/debian/patches/dont_use_O_PATH.diff
deleted file mode 100644
index 2a2a8ca..0000000
--- a/debian/patches/dont_use_O_PATH.diff
+++ /dev/null
@@ -1,39 +0,0 @@
-Description: OpenFile portal: do not use O_PATH fds
- Using O_PATH requires correctly specifying whether the fd is writable or
- not. Stating that the fd is writable without it actually being writable
- results into rejection on xdg-desktop-portal side. Other implementations
- like xdg-open or gtk have also moved away from O_PATH fds so this will
- make a matching implementation and avoid possible rejections from xdp.
-Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=03cbcba7b2b0e42a
-Last-Update: 2023-05-13
-
---- a/src/platformsupport/services/genericunix/qgenericunixservices.cpp
-+++ b/src/platformsupport/services/genericunix/qgenericunixservices.cpp
-@@ -203,8 +203,7 @@ static inline QDBusMessage xdgDesktopPor
- // handle_token (s) - A string that will be used as the last element of the @handle.
- // writable (b) - Whether to allow the chosen application to write to the file.
-
--#ifdef O_PATH
-- const int fd = qt_safe_open(QFile::encodeName(url.toLocalFile()), O_PATH);
-+ const int fd = qt_safe_open(QFile::encodeName(url.toLocalFile()), O_RDONLY);
- if (fd != -1) {
- QDBusMessage message = QDBusMessage::createMethodCall(QLatin1String("org.freedesktop.portal.Desktop"),
- QLatin1String("/org/freedesktop/portal/desktop"),
-@@ -214,16 +213,13 @@ static inline QDBusMessage xdgDesktopPor
- QDBusUnixFileDescriptor descriptor;
- descriptor.giveFileDescriptor(fd);
-
-- const QVariantMap options = {{QLatin1String("writable"), true}};
-+ const QVariantMap options = {};
-
- // FIXME parent_window_id
- message << QString() << QVariant::fromValue(descriptor) << options;
-
- return QDBusConnection::sessionBus().call(message);
- }
--#else
-- Q_UNUSED(url)
--#endif
-
- return QDBusMessage::createError(QDBusError::InternalError, qt_error_string());
- }
diff --git a/debian/patches/fix_alt_backtick.diff b/debian/patches/fix_alt_backtick.diff
deleted file mode 100644
index cd094c0..0000000
--- a/debian/patches/fix_alt_backtick.diff
+++ /dev/null
@@ -1,80 +0,0 @@
-Description: fix Alt+` shortcut on non-US layouts
- Make it possible for non-letter-keys with Latin 1 symbols (`, !, @ etc.)
- to participate in shortcuts also, when the keys generate national
- symbols on non-Latin layout.
- .
- For example, in Russian layout, "`" key generates cyrillic "ё" letter of
- national alphabet, so shortcuts with the key should still work
- regardless of the actual layout.
-Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit?id=62e697fd568f6acd
-Last-Update: 2022-12-03
-
---- a/src/platformsupport/input/xkbcommon/qxkbcommon.cpp
-+++ b/src/platformsupport/input/xkbcommon/qxkbcommon.cpp
-@@ -471,7 +471,7 @@ QVector<xkb_keysym_t> QXkbCommon::toKeys
- } else if (event->modifiers() & Qt::KeypadModifier) {
- if (qtKey >= Qt::Key_0 && qtKey <= Qt::Key_9)
- keysyms.append(XKB_KEY_KP_0 + (qtKey - Qt::Key_0));
-- } else if (isLatin(qtKey) && event->text().isUpper()) {
-+ } else if (isLatin1(qtKey) && event->text().isUpper()) {
- keysyms.append(qtKey);
- }
-
-@@ -523,7 +523,7 @@ int QXkbCommon::keysymToQtKey(xkb_keysym
- // With standard shortcuts we should prefer a latin character, this is
- // for checks like "some qkeyevent == QKeySequence::Copy" to work even
- // when using for example 'russian' keyboard layout.
-- if (!QXkbCommon::isLatin(keysym)) {
-+ if (!QXkbCommon::isLatin1(keysym)) {
- xkb_keysym_t latinKeysym = QXkbCommon::lookupLatinKeysym(state, code);
- if (latinKeysym != XKB_KEY_NoSymbol)
- keysym = latinKeysym;
-@@ -546,7 +546,7 @@ static int keysymToQtKey_internal(xkb_ke
- } else if (keysym >= XKB_KEY_KP_0 && keysym <= XKB_KEY_KP_9) {
- // numeric keypad keys
- qtKey = Qt::Key_0 + (keysym - XKB_KEY_KP_0);
-- } else if (QXkbCommon::isLatin(keysym)) {
-+ } else if (QXkbCommon::isLatin1(keysym)) {
- qtKey = QXkbCommon::qxkbcommon_xkb_keysym_to_upper(keysym);
- } else {
- // check if we have a direct mapping
-@@ -678,7 +678,7 @@ QList<int> QXkbCommon::possibleKeys(xkb_
- Qt::KeyboardModifiers neededMods = ModsTbl[i];
- if ((modifiers & neededMods) == neededMods) {
- if (i == 8) {
-- if (isLatin(baseQtKey))
-+ if (isLatin1(baseQtKey))
- continue;
- // add a latin key as a fall back key
- sym = lookupLatinKeysym(state, keycode);
-@@ -733,7 +733,7 @@ void QXkbCommon::verifyHasLatinLayout(xk
- for (xkb_layout_index_t layout = 0; layout < layoutCount; ++layout) {
- for (xkb_keycode_t code = minKeycode; code < maxKeycode; ++code) {
- xkb_keymap_key_get_syms_by_level(keymap, code, layout, 0, &keysyms);
-- if (keysyms && isLatin(keysyms[0]))
-+ if (keysyms && isLatin1(keysyms[0]))
- nrLatinKeys++;
- if (nrLatinKeys > 10) // arbitrarily chosen threshold
- return;
-@@ -766,7 +766,7 @@ xkb_keysym_t QXkbCommon::lookupLatinKeys
- xkb_level_index_t level = xkb_state_key_get_level(state, keycode, layout);
- if (xkb_keymap_key_get_syms_by_level(keymap, keycode, layout, level, &syms) != 1)
- continue;
-- if (isLatin(syms[0])) {
-+ if (isLatin1(syms[0])) {
- sym = syms[0];
- break;
- }
---- a/src/platformsupport/input/xkbcommon/qxkbcommon_p.h
-+++ b/src/platformsupport/input/xkbcommon/qxkbcommon_p.h
-@@ -94,8 +94,8 @@ public:
- static void verifyHasLatinLayout(xkb_keymap *keymap);
- static xkb_keysym_t lookupLatinKeysym(xkb_state *state, xkb_keycode_t keycode);
-
-- static bool isLatin(xkb_keysym_t sym) {
-- return ((sym >= 'a' && sym <= 'z') || (sym >= 'A' && sym <= 'Z'));
-+ static bool isLatin1(xkb_keysym_t sym) {
-+ return sym <= 0xff;
- }
- static bool isKeypad(xkb_keysym_t sym) {
- return sym >= XKB_KEY_KP_Space && sym <= XKB_KEY_KP_9;
diff --git a/debian/patches/fix_qdbusmacros_h.diff b/debian/patches/fix_qdbusmacros_h.diff
deleted file mode 100644
index 563df7f..0000000
--- a/debian/patches/fix_qdbusmacros_h.diff
+++ /dev/null
@@ -1,32 +0,0 @@
-Description: fix capitalization error in auto-generated qdbusmacros.h include
-Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=dca0304c26012a57
-Last-Update: 2023-05-13
-
---- a/include/QtDBus/qdbusmacros.h
-+++ b/include/QtDBus/qdbusmacros.h
-@@ -1,11 +1,11 @@
- #ifndef DEPRECATED_HEADER_QtDBus_qdbusmacros_h
- #define DEPRECATED_HEADER_QtDBus_qdbusmacros_h
- #if defined(__GNUC__)
--# warning Header <QtDBus/qdbusmacros.h> is deprecated. Please include <QtDbus/qtdbusglobal.h> instead.
-+# warning Header <QtDBus/qdbusmacros.h> is deprecated. Please include <QtDBus/qtdbusglobal.h> instead.
- #elif defined(_MSC_VER)
--# pragma message ("Header <QtDBus/qdbusmacros.h> is deprecated. Please include <QtDbus/qtdbusglobal.h> instead.")
-+# pragma message ("Header <QtDBus/qdbusmacros.h> is deprecated. Please include <QtDBus/qtdbusglobal.h> instead.")
- #endif
--#include <QtDbus/qtdbusglobal.h>
-+#include <QtDBus/qtdbusglobal.h>
- #if 0
- #pragma qt_no_master_include
- #endif
---- a/sync.profile
-+++ b/sync.profile
-@@ -77,7 +77,7 @@
- "qsql.h" => "QtSql/qtsqlglobal.h"
- },
- "QtDBus" => {
-- "qdbusmacros.h" => "QtDbus/qtdbusglobal.h"
-+ "qdbusmacros.h" => "QtDBus/qtdbusglobal.h"
- },
- "QtTest" => {
- "qtest_global.h" => "QtTest/qttestglobal.h"
diff --git a/debian/patches/fusion_checkable_qpushbutton.diff b/debian/patches/fusion_checkable_qpushbutton.diff
deleted file mode 100644
index 239cc38..0000000
--- a/debian/patches/fusion_checkable_qpushbutton.diff
+++ /dev/null
@@ -1,27 +0,0 @@
-Description: QPushButton/fusion style: don't ignore QIcon::On icon
- The fusion style did ignore the QIcon::On icon because it reset
- State_On to avoid the visual shift of a pressed button.
- But it's not needed to reset this flag - the shift does not happen
- because the fusion style does return 0 as offset for
- PM_ButtonShiftHorizontal/PM_ButtonShiftVertical so no shifting will
- happen.
-Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=e9ccdf4d84157173
-Last-Update: 2021-08-10
-
---- a/src/widgets/styles/qfusionstyle.cpp
-+++ b/src/widgets/styles/qfusionstyle.cpp
-@@ -1772,14 +1772,6 @@ void QFusionStyle::drawControl(ControlEl
- proxy()->drawControl(CE_PushButtonLabel, &subopt, painter, widget);
- }
- break;
-- case CE_PushButtonLabel:
-- if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) {
-- QStyleOptionButton b(*button);
-- // no PM_ButtonShiftHorizontal and PM_ButtonShiftVertical for fusion style
-- b.state &= ~(State_On | State_Sunken);
-- QCommonStyle::drawControl(element, &b, painter, widget);
-- }
-- break;
- case CE_MenuBarEmptyArea:
- painter->save();
- {
diff --git a/debian/patches/gnome_wayland.diff b/debian/patches/gnome_wayland.diff
index 9f7375c..85cf30d 100644
--- a/debian/patches/gnome_wayland.diff
+++ b/debian/patches/gnome_wayland.diff
@@ -7,7 +7,7 @@ Last-Update: 2022-10-16
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
-@@ -1412,14 +1412,7 @@ void QGuiApplicationPrivate::createPlatf
+@@ -1412,14 +1412,7 @@
if (sessionType == QByteArrayLiteral("x11") && !platformName.contains(QByteArrayLiteral("xcb"))) {
platformName = QByteArrayLiteral("xcb");
} else if (sessionType == QByteArrayLiteral("wayland") && !platformName.contains(QByteArrayLiteral("wayland"))) {
diff --git a/debian/patches/gnukfreebsd.diff b/debian/patches/gnukfreebsd.diff
index 079c02f..118ae7b 100644
--- a/debian/patches/gnukfreebsd.diff
+++ b/debian/patches/gnukfreebsd.diff
@@ -157,7 +157,7 @@ Forwarded: no
+#endif // QPLATFORMDEFS_H
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
-@@ -215,6 +215,8 @@ defineTest(qtAddTargetEnv) {
+@@ -215,6 +215,8 @@
deppath.name = PATH
} else:contains(QMAKE_HOST.os, Linux|FreeBSD|OpenBSD|NetBSD|DragonFly|SunOS|HP-UX|QNX|GNU) {
deppath.name = LD_LIBRARY_PATH
diff --git a/debian/patches/image_deletion_order.diff b/debian/patches/image_deletion_order.diff
deleted file mode 100644
index b20f5cb..0000000
--- a/debian/patches/image_deletion_order.diff
+++ /dev/null
@@ -1,66 +0,0 @@
-Description: fix deletion order in QImageReader/Writer destructors
- The device would be deleted before the image format handler, and hence
- be a dangling pointer that could easily cause a crash if the handler
- or codec would access it on destruction, e.g. for cleanup.
-Origin: upstream, commits
- https://code.qt.io/cgit/qt/qtbase.git/commit/?id=f091026be1deb4b4
- https://code.qt.io/cgit/qt/qtbase.git/commit/?id=5633cb69f68ca3d3
-Last-Update: 2023-02-26
-
---- a/src/gui/image/qimagereader.cpp
-+++ b/src/gui/image/qimagereader.cpp
-@@ -515,9 +515,9 @@ QImageReaderPrivate::QImageReaderPrivate
- */
- QImageReaderPrivate::~QImageReaderPrivate()
- {
-+ delete handler;
- if (deleteDevice)
- delete device;
-- delete handler;
- }
-
- /*!
-@@ -774,12 +774,12 @@ bool QImageReader::decideFormatFromConte
- */
- void QImageReader::setDevice(QIODevice *device)
- {
-+ delete d->handler;
-+ d->handler = nullptr;
- if (d->device && d->deleteDevice)
- delete d->device;
- d->device = device;
- d->deleteDevice = false;
-- delete d->handler;
-- d->handler = nullptr;
- d->text.clear();
- }
-
---- a/src/gui/image/qimagewriter.cpp
-+++ b/src/gui/image/qimagewriter.cpp
-@@ -349,9 +349,9 @@ QImageWriter::QImageWriter(const QString
- */
- QImageWriter::~QImageWriter()
- {
-+ delete d->handler;
- if (d->deleteDevice)
- delete d->device;
-- delete d->handler;
- delete d;
- }
-
-@@ -396,13 +396,13 @@ QByteArray QImageWriter::format() const
- */
- void QImageWriter::setDevice(QIODevice *device)
- {
-+ delete d->handler;
-+ d->handler = nullptr;
- if (d->device && d->deleteDevice)
- delete d->device;
-
- d->device = device;
- d->deleteDevice = false;
-- delete d->handler;
-- d->handler = nullptr;
- }
-
- /*!
diff --git a/debian/patches/mime_globs.diff b/debian/patches/mime_globs.diff
deleted file mode 100644
index 1c66eba..0000000
--- a/debian/patches/mime_globs.diff
+++ /dev/null
@@ -1,51 +0,0 @@
-Description: adjust QMimeDatabase implementation
- When multiple globs match, and the result from magic sniffing is
- unrelated to any of those globs, globs have priority and one of them
- should be picked up.
-Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=0cbbba2aa5b47224
-Last-Update: 2021-06-12
-
---- a/src/corelib/mimetypes/qmimedatabase.cpp
-+++ b/src/corelib/mimetypes/qmimedatabase.cpp
-@@ -389,20 +389,23 @@ QMimeType QMimeDatabasePrivate::mimeType
- // Disambiguate conflicting extensions (if magic matching found something)
- if (candidateByData.isValid() && magicAccuracy > 0) {
- const QString sniffedMime = candidateByData.name();
-- // If the sniffedMime matches a glob match, use it
-+ // If the sniffedMime matches a highest-weight glob match, use it
- if (candidatesByName.m_matchingMimeTypes.contains(sniffedMime)) {
- *accuracyPtr = 100;
- return candidateByData;
- }
-- for (const QString &m : qAsConst(candidatesByName.m_matchingMimeTypes)) {
-+ for (const QString &m : qAsConst(candidatesByName.m_allMatchingMimeTypes)) {
- if (inherits(m, sniffedMime)) {
- // We have magic + pattern pointing to this, so it's a pretty good match
- *accuracyPtr = 100;
- return mimeTypeForName(m);
- }
- }
-- *accuracyPtr = magicAccuracy;
-- return candidateByData;
-+ if (candidatesByName.m_allMatchingMimeTypes.isEmpty()) {
-+ // No glob, use magic
-+ *accuracyPtr = magicAccuracy;
-+ return candidateByData;
-+ }
- }
- }
-
---- a/src/corelib/mimetypes/qmimeglobpattern.cpp
-+++ b/src/corelib/mimetypes/qmimeglobpattern.cpp
-@@ -83,7 +83,10 @@ void QMimeGlobMatchResult::addMatch(cons
- }
- if (!m_matchingMimeTypes.contains(mimeType)) {
- m_matchingMimeTypes.append(mimeType);
-- m_allMatchingMimeTypes.append(mimeType);
-+ if (replace)
-+ m_allMatchingMimeTypes.prepend(mimeType); // highest-weight first
-+ else
-+ m_allMatchingMimeTypes.append(mimeType);
- m_knownSuffixLength = knownSuffixLength;
- }
- }
diff --git a/debian/patches/mysql_remove_version_checks.diff b/debian/patches/mysql_remove_version_checks.diff
deleted file mode 100644
index 40b7f1d..0000000
--- a/debian/patches/mysql_remove_version_checks.diff
+++ /dev/null
@@ -1,44 +0,0 @@
-Description: remove the version number checks in favor of actual functionality
- MariaDB library version 3.2 no longer returns the server version in the
- 10.x range but the library version itself, which is lower than 4.x. That
- meant we concluded the server did not support prepared statements.
- .
- And because of the lack of prepared statements, all QDateTime
- conversions failed, because of the timezone. I don't know if this was
- intended or what, but it's a side issue.
-Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=211369133cf40b2f
-Last-Update: 2021-08-10
-
---- a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
-+++ b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
-@@ -158,6 +158,20 @@ static inline QVariant qDateTimeFromStri
- #endif
- }
-
-+// check if this client and server version of MySQL/MariaDB support prepared statements
-+static inline bool checkPreparedQueries(MYSQL *mysql)
-+{
-+ std::unique_ptr<MYSQL_STMT, decltype(&mysql_stmt_close)> stmt(mysql_stmt_init(mysql), &mysql_stmt_close);
-+ if (!stmt)
-+ return false;
-+
-+ static const char dummyQuery[] = "SELECT ? + ?";
-+ if (mysql_stmt_prepare(stmt.get(), dummyQuery, sizeof(dummyQuery) - 1))
-+ return false;
-+
-+ return mysql_stmt_param_count(stmt.get()) == 2;
-+}
-+
- class QMYSQLResultPrivate;
-
- class QMYSQLResult : public QSqlResult
-@@ -1371,8 +1385,7 @@ bool QMYSQLDriver::open(const QString& d
- }
- #endif // MYSQL_VERSION_ID >= 50007
-
-- d->preparedQuerysEnabled = mysql_get_client_version() >= 40108
-- && mysql_get_server_version(d->mysql) >= 40100;
-+ d->preparedQuerysEnabled = checkPreparedQueries(d->mysql);
-
- #if QT_CONFIG(thread)
- mysql_thread_init();
diff --git a/debian/patches/nonlinux_utime.diff b/debian/patches/nonlinux_utime.diff
index ae67a47..a344de1 100644
--- a/debian/patches/nonlinux_utime.diff
+++ b/debian/patches/nonlinux_utime.diff
@@ -11,7 +11,7 @@ Last-Update: 2018-02-22
--- a/qmake/library/ioutils.cpp
+++ b/qmake/library/ioutils.cpp
-@@ -228,7 +228,7 @@ bool IoUtils::touchFile(const QString &t
+@@ -228,7 +228,7 @@
*errorString = fL1S("Cannot stat() reference file %1: %2.").arg(referenceFileName, fL1S(strerror(errno)));
return false;
}
@@ -22,7 +22,7 @@ Last-Update: 2018-02-22
# else
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
-@@ -1595,7 +1595,7 @@ bool QFileSystemEngine::setFileTime(int
+@@ -1608,7 +1608,7 @@
return false;
}
diff --git a/debian/patches/path_max.diff b/debian/patches/path_max.diff
index b9014fa..695735f 100644
--- a/debian/patches/path_max.diff
+++ b/debian/patches/path_max.diff
@@ -7,7 +7,7 @@ Last-Update: 2020-04-19
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
-@@ -689,7 +689,11 @@ QFileSystemEntry QFileSystemEngine::cano
+@@ -690,7 +690,11 @@
Q_UNUSED(data);
return QFileSystemEntry(slowCanonicalized(absoluteName(entry).filePath()));
#else
diff --git a/debian/patches/qdoc_default_incdirs.diff b/debian/patches/qdoc_default_incdirs.diff
index 4c559a3..a6d789c 100644
--- a/debian/patches/qdoc_default_incdirs.diff
+++ b/debian/patches/qdoc_default_incdirs.diff
@@ -10,7 +10,7 @@ Last-Update: 2020-01-28
--- a/mkspecs/features/qt_docs.prf
+++ b/mkspecs/features/qt_docs.prf
-@@ -98,6 +98,10 @@ doc_command = $$QDOC $$QMAKE_DOCS
+@@ -98,6 +98,10 @@
prepare_docs {
prepare_docs.commands += $$doc_command -prepare $$PREP_DOC_INDEXES -no-link-errors $$QDOC_INCLUDE_PATHS
generate_docs.commands += $$doc_command -generate $$DOC_INDEXES $$QDOC_INCLUDE_PATHS
diff --git a/debian/patches/qiodevice_readline_memory.diff b/debian/patches/qiodevice_readline_memory.diff
deleted file mode 100644
index 4ce27af..0000000
--- a/debian/patches/qiodevice_readline_memory.diff
+++ /dev/null
@@ -1,21 +0,0 @@
-Description: fix allocated memory of QByteArray returned by QIODevice::readLine
-Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=6485b6d45ad165cf
-Last-Update: 2021-02-20
-
---- a/src/corelib/io/qiodevice.cpp
-+++ b/src/corelib/io/qiodevice.cpp
-@@ -1480,10 +1480,12 @@ QByteArray QIODevice::readLine(qint64 ma
- } else
- readBytes = readLine(result.data(), result.size());
-
-- if (readBytes <= 0)
-+ if (readBytes <= 0) {
- result.clear();
-- else
-+ } else {
- result.resize(readBytes);
-+ result.squeeze();
-+ }
-
- return result;
- }
diff --git a/debian/patches/qmenu_set_transient_parent.diff b/debian/patches/qmenu_set_transient_parent.diff
index a2afbb2..64ebe21 100644
--- a/debian/patches/qmenu_set_transient_parent.diff
+++ b/debian/patches/qmenu_set_transient_parent.diff
@@ -9,7 +9,7 @@ Last-Update: 2022-10-16
--- a/src/widgets/widgets/qmenu.cpp
+++ b/src/widgets/widgets/qmenu.cpp
-@@ -624,6 +624,29 @@ void QMenuPrivate::hideMenu(QMenu *menu)
+@@ -624,6 +624,29 @@
menu->d_func()->causedPopup.widget = nullptr;
}
@@ -39,7 +39,7 @@ Last-Update: 2022-10-16
void QMenuPrivate::popupAction(QAction *action, int delay, bool activateFirst)
{
Q_Q(QMenu);
-@@ -3060,6 +3083,8 @@ QMenu::event(QEvent *e)
+@@ -3060,6 +3083,8 @@
d->sloppyState.reset();
if (d->currentAction)
d->popupAction(d->currentAction, 0, false);
@@ -50,7 +50,7 @@ Last-Update: 2022-10-16
case QEvent::ToolTip:
--- a/src/widgets/widgets/qmenu_p.h
+++ b/src/widgets/widgets/qmenu_p.h
-@@ -440,6 +440,7 @@ public:
+@@ -440,6 +440,7 @@
QMenuCaused causedPopup;
void hideUpToMenuBar();
void hideMenu(QMenu *menu);
diff --git a/debian/patches/qnam_connect_memory_leak.diff b/debian/patches/qnam_connect_memory_leak.diff
deleted file mode 100644
index f16b2bc..0000000
--- a/debian/patches/qnam_connect_memory_leak.diff
+++ /dev/null
@@ -1,25 +0,0 @@
-Description: QNAM: work around QObject finicky orphan cleanup details
-Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=0807f16eb407eaf8
-Last-Update: 2021-01-26
-
---- a/src/network/access/qnetworkreplyhttpimpl.cpp
-+++ b/src/network/access/qnetworkreplyhttpimpl.cpp
-@@ -808,7 +808,17 @@ void QNetworkReplyHttpImplPrivate::postR
-
- // For the synchronous HTTP, this is the normal way the delegate gets deleted
- // For the asynchronous HTTP this is a safety measure, the delegate deletes itself when HTTP is finished
-- QObject::connect(thread, SIGNAL(finished()), delegate, SLOT(deleteLater()));
-+ QMetaObject::Connection threadFinishedConnection =
-+ QObject::connect(thread, SIGNAL(finished()), delegate, SLOT(deleteLater()));
-+
-+ // QTBUG-88063: When 'delegate' is deleted the connection will be added to 'thread''s orphaned
-+ // connections list. This orphaned list will be cleaned up next time 'thread' emits a signal,
-+ // unfortunately that's the finished signal. It leads to a soft-leak so we do this to disconnect
-+ // it on deletion so that it cleans up the orphan immediately.
-+ QObject::connect(delegate, &QObject::destroyed, delegate, [threadFinishedConnection]() {
-+ if (bool(threadFinishedConnection))
-+ QObject::disconnect(threadFinishedConnection);
-+ });
-
- // Set the properties it needs
- delegate->httpRequest = httpRequest;
diff --git a/debian/patches/qshapedpixmapwindow_no_tooltip.diff b/debian/patches/qshapedpixmapwindow_no_tooltip.diff
deleted file mode 100644
index 7e4dabf..0000000
--- a/debian/patches/qshapedpixmapwindow_no_tooltip.diff
+++ /dev/null
@@ -1,25 +0,0 @@
-Description: do not set Qt::ToolTip flag for QShapedPixmapWindow
- This hint is not really needed in the first place and only causes
- problems in some environments.
- .
- For example in KDE, the compositor animates changes in position and size
- for all ToolTip windows. However, this is not wanted here because we use
- this window as a thumbnail for a drag-and-drop operation.
- Before this patch the dragged element would lag significantly behind the
- cursor. Now it works as expected, i.e. the dragged element follows the
- cursor immediately.
-Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=180b496b537089b8
-Bug: https://bugreports.qt.io/browse/QTBUG-98048
-Last-Update: 2023-05-20
-
---- a/src/gui/kernel/qshapedpixmapdndwindow.cpp
-+++ b/src/gui/kernel/qshapedpixmapdndwindow.cpp
-@@ -56,7 +56,7 @@ QShapedPixmapWindow::QShapedPixmapWindow
- QSurfaceFormat format;
- format.setAlphaBufferSize(8);
- setFormat(format);
-- setFlags(Qt::ToolTip | Qt::FramelessWindowHint | Qt::X11BypassWindowManagerHint
-+ setFlags(Qt::FramelessWindowHint | Qt::BypassWindowManagerHint
- | Qt::WindowTransparentForInput | Qt::WindowDoesNotAcceptFocus);
- }
-
diff --git a/debian/patches/qstorageinfo_linux.diff b/debian/patches/qstorageinfo_linux.diff
index b1da1fc..19d3796 100644
--- a/debian/patches/qstorageinfo_linux.diff
+++ b/debian/patches/qstorageinfo_linux.diff
@@ -10,7 +10,7 @@ Last-Update: 2020-04-19
--- a/src/corelib/io/qstorageinfo_unix.cpp
+++ b/src/corelib/io/qstorageinfo_unix.cpp
-@@ -566,6 +566,7 @@ inline QByteArray QStorageIterator::file
+@@ -566,6 +566,7 @@
inline QByteArray QStorageIterator::device() const
{
@@ -18,7 +18,7 @@ Last-Update: 2020-04-19
// check that the device exists
if (mnt.mnt_fsname[0] == '/' && access(mnt.mnt_fsname, F_OK) != 0) {
// It doesn't, so let's try to resolve the dev_t from /dev/block.
-@@ -581,6 +582,7 @@ inline QByteArray QStorageIterator::devi
+@@ -581,6 +582,7 @@
return dev;
}
}
diff --git a/debian/patches/qtbase-avoid-hardcoding-kernel-version.patch b/debian/patches/qtbase-avoid-hardcoding-kernel-version.patch
index bfcf9ac..193f5b2 100644
--- a/debian/patches/qtbase-avoid-hardcoding-kernel-version.patch
+++ b/debian/patches/qtbase-avoid-hardcoding-kernel-version.patch
@@ -1,7 +1,5 @@
-Index: qtbase-everywhere-src-5.15.2/src/corelib/configure.json
-===================================================================
---- qtbase-everywhere-src-5.15.2.orig/src/corelib/configure.json
-+++ qtbase-everywhere-src-5.15.2/src/corelib/configure.json
+--- a/src/corelib/configure.json
++++ b/src/corelib/configure.json
@@ -639,7 +639,7 @@
},
"getentropy": {
diff --git a/debian/patches/qxcbwindow_set_geometry.diff b/debian/patches/qxcbwindow_set_geometry.diff
deleted file mode 100644
index 76ac96a..0000000
--- a/debian/patches/qxcbwindow_set_geometry.diff
+++ /dev/null
@@ -1,44 +0,0 @@
-Description: set geometry property in QXcbWindow after checking minimum size
- QXcbWindow::create() bound the window's size to windowMinimumSize(),
- after its size had been inherited from parent().
- QPlatformWindow::setGeometry() was called before that sanity check.
- .
- When a fullscreen window is re-mapped from a deactivated screen to the
- remaining screen, the call to QPlatformWindow::setGeometry() assigns
- an invalid QRect to QPlatformWindowPrivate::rect
- The negative int values x2 and/or y2 cause
- QXcbBackingStoreImage::flushPixmap to address unmapped memory and
- crash.
- .
- This patch moves the call to QPlatformWindow::setGeometry() from
- before to after bounding to a minimum value. That assures a valid
- rectangle to be assigned in all cases.
-Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=6a3627b6c5aa5109
-Last-Update: 2023-01-04
-
---- a/src/plugins/platforms/xcb/qxcbwindow.cpp
-+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
-@@ -299,11 +299,6 @@ void QXcbWindow::create()
- return;
- }
-
-- QPlatformWindow::setGeometry(rect);
--
-- if (platformScreen != currentScreen)
-- QWindowSystemInterface::handleWindowScreenChanged(window(), platformScreen->QPlatformScreen::screen());
--
- const QSize minimumSize = windowMinimumSize();
- if (rect.width() > 0 || rect.height() > 0) {
- rect.setWidth(qBound(1, rect.width(), XCOORD_MAX));
-@@ -315,6 +310,11 @@ void QXcbWindow::create()
- rect.setHeight(QHighDpi::toNativePixels(int(defaultWindowHeight), platformScreen->QPlatformScreen::screen()));
- }
-
-+ QPlatformWindow::setGeometry(rect);
-+
-+ if (platformScreen != currentScreen)
-+ QWindowSystemInterface::handleWindowScreenChanged(window(), platformScreen->QPlatformScreen::screen());
-+
- xcb_window_t xcb_parent_id = platformScreen->root();
- if (parent()) {
- xcb_parent_id = static_cast<QXcbWindow *>(parent())->xcb_window();
diff --git a/debian/patches/remove_privacy_breaches.diff b/debian/patches/remove_privacy_breaches.diff
index e911149..b61f9c7 100644
--- a/debian/patches/remove_privacy_breaches.diff
+++ b/debian/patches/remove_privacy_breaches.diff
@@ -12,7 +12,7 @@ Last-Update: 2015-02-18
--- a/doc/global/template/scripts/main.js
+++ b/doc/global/template/scripts/main.js
-@@ -94,11 +94,6 @@ $(document).ready(function($) {
+@@ -94,11 +94,6 @@
});
$( window ).load(function() {
diff --git a/debian/patches/revert_startBlocking_removal.diff b/debian/patches/revert_startBlocking_removal.diff
deleted file mode 100644
index 3537b75..0000000
--- a/debian/patches/revert_startBlocking_removal.diff
+++ /dev/null
@@ -1,102 +0,0 @@
-Description: revert "Remove the dead code for blocking methods from QtConcurrent"
- It's a binary incompatible change.
-Origin: KDE, https://invent.kde.org/qt/qt/qtbase/-/commit/eeadc036d77b75be
- Also submitted to upstream 5.15 branch according to
- https://lists.qt-project.org/pipermail/development/2022-September/042951.html.
-Last-Update: 2022-09-10
-
---- a/src/concurrent/qtconcurrentthreadengine.cpp
-+++ b/src/concurrent/qtconcurrentthreadengine.cpp
-@@ -176,6 +176,39 @@ void ThreadEngineBase::startSingleThread
- finish();
- }
-
-+void ThreadEngineBase::startBlocking()
-+{
-+ start();
-+ barrier.acquire();
-+ startThreads();
-+
-+ bool throttled = false;
-+#ifndef QT_NO_EXCEPTIONS
-+ try {
-+#endif
-+ while (threadFunction() == ThrottleThread) {
-+ if (threadThrottleExit()) {
-+ throttled = true;
-+ break;
-+ }
-+ }
-+#ifndef QT_NO_EXCEPTIONS
-+ } catch (QException &e) {
-+ handleException(e);
-+ } catch (...) {
-+ handleException(QUnhandledException());
-+ }
-+#endif
-+
-+ if (throttled == false) {
-+ barrier.release();
-+ }
-+
-+ barrier.wait();
-+ finish();
-+ exceptionStore.throwPossibleException();
-+}
-+
- void ThreadEngineBase::startThread()
- {
- startThreadInternal();
---- a/src/concurrent/qtconcurrentthreadengine.h
-+++ b/src/concurrent/qtconcurrentthreadengine.h
-@@ -91,6 +91,7 @@ public:
- ThreadEngineBase();
- virtual ~ThreadEngineBase();
- void startSingleThreaded();
-+ void startBlocking();
- void startThread();
- bool isCanceled();
- void waitForResume();
-@@ -144,6 +145,15 @@ public:
- }
-
- // Runs the user algorithm using multiple threads.
-+ // This function blocks until the algorithm is finished,
-+ // and then returns the result.
-+ T *startBlocking()
-+ {
-+ ThreadEngineBase::startBlocking();
-+ return result();
-+ }
-+
-+ // Runs the user algorithm using multiple threads.
- // Does not block, returns a future.
- QFuture<T> startAsynchronously()
- {
-@@ -223,6 +233,13 @@ class ThreadEngineStarter : public Threa
- public:
- ThreadEngineStarter(TypedThreadEngine *eng)
- : Base(eng) { }
-+
-+ T startBlocking()
-+ {
-+ T t = *this->threadEngine->startBlocking();
-+ delete this->threadEngine;
-+ return t;
-+ }
- };
-
- // Full template specialization where T is void.
-@@ -232,6 +249,12 @@ class ThreadEngineStarter<void> : public
- public:
- ThreadEngineStarter(ThreadEngine<void> *_threadEngine)
- : ThreadEngineStarterBase<void>(_threadEngine) {}
-+
-+ void startBlocking()
-+ {
-+ this->threadEngine->startBlocking();
-+ delete this->threadEngine;
-+ }
- };
-
- //! [qtconcurrentthreadengine-1]
diff --git a/debian/patches/series b/debian/patches/series
index 4e10564..ffda2d7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,37 +1,19 @@
# Backported from upstream.
-#mime_globs.diff
-#fusion_checkable_qpushbutton.diff
-#openssl3.diff
-#openssl_set_options.diff
-qmenu_set_transient_parent.diff
-gnome_wayland.diff
-#fix_alt_backtick.diff
-#image_deletion_order.diff
-#qxcbwindow_set_geometry.diff
-#CVE-2023-24607.diff
-#qshapedpixmapwindow_no_tooltip.diff
-#CVE-2023-32763.diff
-#CVE-2023-32762.diff
-#CVE-2023-33285.diff
-#CVE-2023-34410.diff
-sql_odbc_more_unicode_checks.diff
-sql_odbc_fix_unicode_check.diff
a11y_root.diff
-#dont_use_O_PATH.diff
-#fix_qdbusmacros_h.diff
-
+gnome_wayland.diff
+qmenu_set_transient_parent.diff
# Debian specific.
+armv4.diff
+cast_types_for_egl_x11_test.diff
+cross_build_mysql.diff
gnukfreebsd.diff
-no_htmlinfo_example.diff
-remove_privacy_breaches.diff
-link_fbclient.diff
gnukfreebsd_linker_warnings.diff
-armv4.diff
+link_fbclient.diff
+no_htmlinfo_example.diff
nonlinux_utime.diff
-qdoc_default_incdirs.diff
path_max.diff
+qdoc_default_incdirs.diff
qstorageinfo_linux.diff
-cross_build_mysql.diff
-cast_types_for_egl_x11_test.diff
qtbase-avoid-hardcoding-kernel-version.patch
+remove_privacy_breaches.diff
diff --git a/debian/patches/sql_odbc_fix_unicode_check.diff b/debian/patches/sql_odbc_fix_unicode_check.diff
deleted file mode 100644
index dd27b32..0000000
--- a/debian/patches/sql_odbc_fix_unicode_check.diff
+++ /dev/null
@@ -1,32 +0,0 @@
-Description: QSQL/ODBC: fix regression (trailing NUL)
- When we fixed the callers of toSQLTCHAR() to use the result's size()
- instead of the input's (which differ, if sizeof(SQLTCHAR) != 2), we
- exposed callers to the append(0), which changes the size() of the
- result QVLA. Callers that don't rely on NUL-termination (all?) now saw
- an additional training NUL.
- .
- Fix by not NUL-terminating, and changing the only user of SQL_NTS to
- use an explicit length.
-Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=9020034b3b6a3a81
-Last-Update: 2023-06-30
-
---- a/src/plugins/sqldrivers/odbc/qsql_odbc.cpp
-+++ b/src/plugins/sqldrivers/odbc/qsql_odbc.cpp
-@@ -125,7 +125,6 @@ inline static QVarLengthArray<SQLTCHAR>
- {
- QVarLengthArray<SQLTCHAR> result;
- toSQLTCHARImpl(result, input);
-- result.append(0); // make sure it's null terminated, doesn't matter if it already is, it does if it isn't.
- return result;
- }
-
-@@ -2119,7 +2118,8 @@ void QODBCDriverPrivate::checkUnicode()
- QLatin1String("select 'test' from dual"),
- };
- for (const auto &statement : statements) {
-- r = SQLExecDirect(hStmt, toSQLTCHAR(statement).data(), SQL_NTS);
-+ auto encoded = toSQLTCHAR(statement);
-+ r = SQLExecDirect(hStmt, encoded.data(), SQLINTEGER(encoded.size()));
- if (r == SQL_SUCCESS)
- break;
- }
diff --git a/debian/patches/sql_odbc_more_unicode_checks.diff b/debian/patches/sql_odbc_more_unicode_checks.diff
deleted file mode 100644
index de7d2d9..0000000
--- a/debian/patches/sql_odbc_more_unicode_checks.diff
+++ /dev/null
@@ -1,35 +0,0 @@
-Description: SQL/ODBC: add another check to detect unicode availability in driver
- Since ODBC does not have a direct way finding out if unicode is
- supported by the underlying driver the ODBC plugin does some checks. As
- a last resort a sql statement is executed which returns a string. But
- even this may fail because the select statement has no FROM part which
- is rejected by at least Oracle does not allow. Therefore add another
- query which is correct for Oracle & DB2 as a workaround. The question
- why the first three statements to check for unicode availability fail
- is still open but can't be checked since I've no access to an oracle
- database.
-Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=f19320748d282b1e
-Last-Update: 2023-06-30
-
---- a/src/plugins/sqldrivers/odbc/qsql_odbc.cpp
-+++ b/src/plugins/sqldrivers/odbc/qsql_odbc.cpp
-@@ -2111,7 +2111,18 @@ void QODBCDriverPrivate::checkUnicode()
- hDbc,
- &hStmt);
-
-- r = SQLExecDirect(hStmt, toSQLTCHAR(QLatin1String("select 'test'")).data(), SQL_NTS);
-+ // for databases which do not return something useful in SQLGetInfo and are picky about a
-+ // 'SELECT' statement without 'FROM' but support VALUE(foo) statement like e.g. DB2 or Oracle
-+ const auto statements = {
-+ QLatin1String("select 'test'"),
-+ QLatin1String("values('test')"),
-+ QLatin1String("select 'test' from dual"),
-+ };
-+ for (const auto &statement : statements) {
-+ r = SQLExecDirect(hStmt, toSQLTCHAR(statement).data(), SQL_NTS);
-+ if (r == SQL_SUCCESS)
-+ break;
-+ }
- if(r == SQL_SUCCESS) {
- r = SQLFetch(hStmt);
- if(r == SQL_SUCCESS) {
diff --git a/debian/patches/xcb_add_a_timeout_control_when_reading_INCR_property.diff b/debian/patches/xcb_add_a_timeout_control_when_reading_INCR_property.diff
deleted file mode 100644
index ff20bf4..0000000
--- a/debian/patches/xcb_add_a_timeout_control_when_reading_INCR_property.diff
+++ /dev/null
@@ -1,53 +0,0 @@
-From 02248eea5562c1df39ee23f195011afacc6759b0 Mon Sep 17 00:00:00 2001
-From: Liang Qi <liang.qi at qt.io>
-Date: Wed, 7 Jul 2021 13:19:14 +0200
-Subject: [PATCH] xcb: add a timeout control when reading INCR property
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-For the first call of QXcbClipboard::clipboardReadProperty()
-inside of clipboardReadIncrementalProperty() in getSelection(),
-it will get a XCB_NONE reply before the contents arrived via
-property change. Then we give a chance to read more.
-
-Manually tested with following setups:
-* examples/widgets/mainwindows/application with gvim(gtk3)
-* examples/widgets/widgets/imageviewer with GIMP 2.10.18(based on
-gtk2) and GIMP 2.99.6(based on gtk3 via flatpak)
-
-Fixes: QTBUG-56595
-Pick-to: 5.12 5.15 6.1 6.2
-Done-With: JiDe Zhang <zhangjide at uniontech.com>
-Change-Id: Ib45f08464d39ad79137b1da99808c89b7dca2d08
-Reviewed-by: JiDe Zhang <zhangjide at uniontech.com>
-Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo at qt.io>
----
- src/plugins/platforms/xcb/qxcbclipboard.cpp | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
---- a/src/plugins/platforms/xcb/qxcbclipboard.cpp
-+++ b/src/plugins/platforms/xcb/qxcbclipboard.cpp
-@@ -835,6 +835,8 @@ QByteArray QXcbClipboard::clipboardReadI
- alloc_error = buf.size() != nbytes+1;
- }
-
-+ QElapsedTimer timer;
-+ timer.start();
- for (;;) {
- connection()->flush();
- xcb_generic_event_t *ge = waitForClipboardEvent(win, XCB_PROPERTY_NOTIFY);
-@@ -870,9 +872,11 @@ QByteArray QXcbClipboard::clipboardReadI
- tmp_buf.resize(0);
- offset += length;
- }
-- } else {
-- break;
- }
-+
-+ const auto elapsed = timer.elapsed();
-+ if (elapsed > clipboard_timeout)
-+ break;
- }
-
- // timed out ... create a new requestor window, otherwise the requestor
diff --git a/debian/patches/xcb_screens_uaf.patch b/debian/patches/xcb_screens_uaf.patch
deleted file mode 100644
index 600e10d..0000000
--- a/debian/patches/xcb_screens_uaf.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Description: Avoid use-after-free in QXcbConnection::initializeScreens()
-Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=86b8c5c3f32c2457
-Last-Update: 2020-11-23
-
---- a/src/plugins/platforms/xcb/qxcbconnection_screens.cpp
-+++ b/src/plugins/platforms/xcb/qxcbconnection_screens.cpp
-@@ -290,6 +290,8 @@ void QXcbConnection::initializeScreens()
- // RRGetScreenResources in this case.
- auto resources_current = Q_XCB_REPLY(xcb_randr_get_screen_resources_current,
- xcb_connection(), xcbScreen->root);
-+ decltype(Q_XCB_REPLY(xcb_randr_get_screen_resources,
-+ xcb_connection(), xcbScreen->root)) resources;
- if (!resources_current) {
- qWarning("failed to get the current screen resources");
- } else {
-@@ -300,8 +302,8 @@ void QXcbConnection::initializeScreens()
- timestamp = resources_current->config_timestamp;
- outputs = xcb_randr_get_screen_resources_current_outputs(resources_current.get());
- } else {
-- auto resources = Q_XCB_REPLY(xcb_randr_get_screen_resources,
-- xcb_connection(), xcbScreen->root);
-+ resources = Q_XCB_REPLY(xcb_randr_get_screen_resources,
-+ xcb_connection(), xcbScreen->root);
- if (!resources) {
- qWarning("failed to get the screen resources");
- } else {
More information about the Neon-commits
mailing list