diff --git a/CVE-2023-24607-qtbase-5.15.patch b/CVE-2023-24607-qtbase-5.15.patch deleted file mode 100644 index 2f0973771ea158113b5e1a4d896cc574965a4e80..0000000000000000000000000000000000000000 --- a/CVE-2023-24607-qtbase-5.15.patch +++ /dev/null @@ -1,332 +0,0 @@ ---- 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 QVarLengthArray& input, int s - return result; - } - -+template -+void toSQLTCHARImpl(QVarLengthArray &result, const QString &input); // primary template undefined -+ -+template -+void do_append(QVarLengthArray &result, const Container &c) -+{ -+ result.append(reinterpret_cast(c.data()), c.size()); -+} -+ -+template <> -+void toSQLTCHARImpl<1>(QVarLengthArray &result, const QString &input) -+{ -+ const auto u8 = input.toUtf8(); -+ do_append(result, u8); -+} -+ -+template <> -+void toSQLTCHARImpl<2>(QVarLengthArray &result, const QString &input) -+{ -+ do_append(result, input); -+} -+ -+template <> -+void toSQLTCHARImpl<4>(QVarLengthArray &result, const QString &input) -+{ -+ const auto u32 = input.toUcs4(); -+ do_append(result, u32); -+} -+ - inline static QVarLengthArray toSQLTCHAR(const QString &input) - { - QVarLengthArray 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; - } - ---- a/src/plugins/sqldrivers/odbc/qsql_odbc.cpp -+++ b/src/plugins/sqldrivers/odbc/qsql_odbc.cpp -@@ -1732,10 +1732,11 @@ bool QODBCResult::exec() - case QVariant::String: - if (d->unicode) { - if (bindValueType(i) & QSql::Out) { -- const QByteArray &first = tmpStorage.at(i); -- QVarLengthArray 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 string(strSize); -+ memcpy(string.data(), bytes.data(), strSize * sizeof(SQLTCHAR)); -+ values[i] = fromSQLTCHAR(string); - } - break; - } - ---- a/src/plugins/sqldrivers/odbc/qsql_odbc.cpp -+++ b/src/plugins/sqldrivers/odbc/qsql_odbc.cpp -@@ -779,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) - { -@@ -814,10 +822,7 @@ bool QODBCDriverPrivate::setConnectionOptions(const QString& connOpts) - 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; -@@ -832,10 +837,7 @@ bool QODBCDriverPrivate::setConnectionOptions(const QString& connOpts) - 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; -@@ -1038,9 +1040,12 @@ bool QODBCResult::reset (const QString& query) - 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)); -@@ -1387,9 +1392,12 @@ bool QODBCResult::prepare(const QString& query) - 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", -@@ -1417,7 +1425,7 @@ bool QODBCResult::exec() - SQLCloseCursor(d->hStmt); - - QVector& values = boundValues(); -- QVector tmpStorage(values.count(), QByteArray()); // holds temporary buffers -+ QVector tmpStorage(values.count(), QByteArray()); // targets for SQLBindParameter() - QVarLengthArray indicators(values.count()); - memset(indicators.data(), 0, indicators.size() * sizeof(SQLLEN)); - -@@ -1596,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(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 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(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(ba.constData()), -+ const_cast(ba.constData()), // don't detach - ba.size(), - ind); - break; -@@ -1982,14 +1991,16 @@ bool QODBCDriver::open(const QString & db, - SQLSMALLINT cb; - QVarLengthArray 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)); -@@ -2368,17 +2379,15 @@ QStringList QODBCDriver::tables(QSql::TableType type) const - 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); -@@ -2452,28 +2461,30 @@ QSqlIndex QODBCDriver::primaryIndex(const QString& tablename) const - 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); -@@ -2554,15 +2565,17 @@ QSqlRecord QODBCDriver::record(const QString& tablename) const - 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/CVE-2023-32762-qtbase-5.15.patch b/CVE-2023-32762-qtbase-5.15.patch new file mode 100644 index 0000000000000000000000000000000000000000..eec93f03362ac44e6781f2b13a4d38248fe596d6 --- /dev/null +++ b/CVE-2023-32762-qtbase-5.15.patch @@ -0,0 +1,13 @@ +--- a/src/network/access/qhsts.cpp ++++ b/src/network/access/qhsts.cpp +@@ -364,8 +364,8 @@ quoted-pair = "\" CHAR + bool QHstsHeaderParser::parse(const QList> &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/CVE-2023-32763-qtbase-5.15.patch b/CVE-2023-32763-qtbase-5.15.patch new file mode 100644 index 0000000000000000000000000000000000000000..9685620945586f6e3eb9013c30f2954632fec5f1 --- /dev/null +++ b/CVE-2023-32763-qtbase-5.15.patch @@ -0,0 +1,49 @@ +diff --git a/src/gui/painting/qfixed_p.h b/src/gui/painting/qfixed_p.h +index 84659288..57d750a4 100644 +--- a/src/gui/painting/qfixed_p.h ++++ b/src/gui/painting/qfixed_p.h +@@ -54,6 +54,7 @@ + #include + #include "QtCore/qdebug.h" + #include "QtCore/qpoint.h" ++#include + #include "QtCore/qsize.h" + + QT_BEGIN_NAMESPACE +@@ -182,6 +183,14 @@ Q_DECL_CONSTEXPR inline bool operator<(int i, const QFixed &f) { return i * 64 < + 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(); } +diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp +index 26ac37b0..f6c69ff4 100644 +--- 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/kde-5.15-rollup-20230105.patch.gz b/kde-5.15-rollup-20230105.patch.gz deleted file mode 100644 index a804da54ee17448f713e02c41817437f59b06686..0000000000000000000000000000000000000000 Binary files a/kde-5.15-rollup-20230105.patch.gz and /dev/null differ diff --git a/kde-5.15-rollup-20230411.patch.gz b/kde-5.15-rollup-20230411.patch.gz new file mode 100644 index 0000000000000000000000000000000000000000..055e7f947e98d558d56c3edf1aac16de7ce2397d Binary files /dev/null and b/kde-5.15-rollup-20230411.patch.gz differ diff --git a/qt5-qtbase.spec b/qt5-qtbase.spec index 28f6e311a22415f1780aa8e1348d0573de86f644..4cea10f81b8a798fc39fe85f656f2bfa88a35fcd 100644 --- a/qt5-qtbase.spec +++ b/qt5-qtbase.spec @@ -1,4 +1,4 @@ -%define anolis_release 5 +%define anolis_release 1 %global openssl -openssl-linked %global zstd 1 @@ -32,7 +32,7 @@ BuildRequires: pkgconfig(libsystemd) Name: qt5-qtbase Summary: Qt5 - QtBase components -Version: 5.15.8 +Version: 5.15.9 Release: %{anolis_release}%{?dist} License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -56,13 +56,26 @@ Patch61: %{name}-cxxflag.patch Patch63: %{name}-5.12.1-firebird.patch Patch64: %{name}-5.12.1-firebird-4.0.0.patch Patch65: qtbase-opensource-src-5.9.0-mysql.patch -Patch68: qtbase-everywhere-src-5.11.1-python3.patch Patch80: qtbase-use-wayland-on-gnome.patch Patch90: %{name}-gcc11.patch -Patch100: kde-5.15-rollup-20230105.patch.gz +## upstream patches +# https://invent.kde.org/qt/qt/qtbase, kde/5.15 branch +# git diff v5.15.9-lts-lgpl..HEAD | gzip > kde-5.15-rollup-$(date +%Y%m%d).patch.gz +# patch100 in lookaside cache due to large'ish size -- rdieter +Patch100: kde-5.15-rollup-20230411.patch.gz + Patch101: qtbase-5.15.8-fix-missing-qtsan-include.patch -Patch102: CVE-2023-24607-qtbase-5.15.patch +# Workaround for font rendering issue with cjk-vf-fonts +# https://bugreports.qt.io/browse/QTBUG-111994 +# https://bugreports.qt.io/browse/QTBUG-112136 +Patch102: qtbase-QTBUG-111994.patch +Patch103: qtbase-QTBUG-112136.patch +# IBus input method cannot set panel position correctly with DPI scaling +# https://bugreports.qt.io/browse/QTBUG-103393 +Patch104: qtbase-QTBUG-103393.patch +Patch105: CVE-2023-32762-qtbase-5.15.patch +Patch106: CVE-2023-32763-qtbase-5.15.patch %global __requires_exclude_from ^%{_qt5_plugindir}/platformthemes/.*$ # filter plugin provides @@ -238,7 +251,6 @@ Qt5 libraries used for drawing widgets and OpenGL items. %patch61 -p1 -b .%{name}-cxxflag %patch64 -p1 -b .firebird %patch65 -p1 -b .mysql -%patch68 -p1 %patch80 -p1 -b .use-wayland-on-gnome.patch @@ -247,6 +259,10 @@ Qt5 libraries used for drawing widgets and OpenGL items. %patch100 -p1 %patch101 -p1 %patch102 -p1 +%patch103 -p1 +%patch104 -p1 +%patch105 -p1 +%patch106 -p1 pushd src/3rdparty mkdir UNUSED @@ -874,6 +890,9 @@ fi %changelog +* Mon Apr 17 2023 Funda Wang - 5.15.9-1 +- New version 5.15.9 + * Mon Apr 17 2023 Zhongling He - 5.15.8-5 - refactor rpm spec diff --git a/qtbase-5.15.8-fix-missing-qtsan-include.patch b/qtbase-5.15.8-fix-missing-qtsan-include.patch index f2e9a2664ec3b9cfcba8e1177af228d93423a72a..06facbbe9133d35698d5f2f6ecb3319305f1b6cd 100644 --- a/qtbase-5.15.8-fix-missing-qtsan-include.patch +++ b/qtbase-5.15.8-fix-missing-qtsan-include.patch @@ -1,11 +1,11 @@ -From 260d60d49b748d3ec2d48399704c0b9d22102eb6 Mon Sep 17 00:00:00 2001 +From f0ba62c20333bb08a2a0e34126d01bc3c316571f Mon Sep 17 00:00:00 2001 From: Jan Grulich -Date: Thu, 5 Jan 2023 10:43:50 +0100 -Subject: Fix missing qtsan_impl include +Date: Tue, 11 Apr 2023 11:06:07 +0200 +Subject: Fix missing qtsan include diff --git a/include/QtCore/headers.pri b/include/QtCore/headers.pri -index e8818bd4..af60c6ce 100644 +index 276ed14f..0f4f7781 100644 --- a/include/QtCore/headers.pri +++ b/include/QtCore/headers.pri @@ -1,6 +1,6 @@ @@ -16,7 +16,7 @@ index e8818bd4..af60c6ce 100644 SYNCQT.QPA_HEADER_FILES = -SYNCQT.CLEAN_HEADER_FILES = animation/qabstractanimation.h:animation animation/qanimationgroup.h:animation animation/qparallelanimationgroup.h:animation animation/qpauseanimation.h:animation animation/qpropertyanimation.h:animation animation/qsequentialanimationgroup.h:animation animation/qvariantanimation.h:animation codecs/qtextcodec.h:textcodec global/qcompilerdetection.h global/qendian.h global/qflags.h global/qfloat16.h global/qglobal.h global/qglobalstatic.h global/qisenum.h global/qlibraryinfo.h global/qlogging.h global/qnamespace.h global/qnumeric.h global/qoperatingsystemversion.h global/qprocessordetection.h global/qrandom.h global/qsysinfo.h global/qsystemdetection.h global/qtypeinfo.h global/qtypetraits.h global/qversiontagging.h io/qbuffer.h io/qdebug.h io/qdir.h io/qdiriterator.h io/qfile.h io/qfiledevice.h io/qfileinfo.h io/qfileselector.h io/qfilesystemwatcher.h:filesystemwatcher io/qiodevice.h io/qlockfile.h io/qloggingcategory.h io/qprocess.h:processenvironment io/qresource.h io/qsavefile.h io/qsettings.h:settings io/qstandardpaths.h io/qstorageinfo.h io/qtemporarydir.h io/qtemporaryfile.h io/qurl.h io/qurlquery.h itemmodels/qabstractitemmodel.h:itemmodel itemmodels/qabstractproxymodel.h:proxymodel itemmodels/qconcatenatetablesproxymodel.h:concatenatetablesproxymodel itemmodels/qidentityproxymodel.h:identityproxymodel itemmodels/qitemselectionmodel.h:itemmodel itemmodels/qsortfilterproxymodel.h:sortfilterproxymodel itemmodels/qstringlistmodel.h:stringlistmodel itemmodels/qtransposeproxymodel.h:transposeproxymodel kernel/qabstracteventdispatcher.h kernel/qabstractnativeeventfilter.h kernel/qbasictimer.h kernel/qcoreapplication.h kernel/qcoreevent.h kernel/qdeadlinetimer.h kernel/qelapsedtimer.h kernel/qeventloop.h kernel/qfunctions_nacl.h kernel/qfunctions_vxworks.h kernel/qfunctions_winrt.h kernel/qmath.h kernel/qmetaobject.h kernel/qmetatype.h kernel/qmimedata.h kernel/qobject.h kernel/qobjectcleanuphandler.h kernel/qobjectdefs.h kernel/qpointer.h kernel/qsharedmemory.h kernel/qsignalmapper.h kernel/qsocketnotifier.h kernel/qsystemsemaphore.h kernel/qtestsupport_core.h kernel/qtimer.h kernel/qtranslator.h kernel/qvariant.h kernel/qwineventnotifier.h mimetypes/qmimedatabase.h:mimetype mimetypes/qmimetype.h:mimetype plugin/qfactoryinterface.h plugin/qlibrary.h:library plugin/qplugin.h plugin/qpluginloader.h plugin/quuid.h serialization/qcborarray.h serialization/qcborcommon.h serialization/qcbormap.h serialization/qcborstream.h serialization/qcborstreamreader.h:cborstreamreader serialization/qcborstreamwriter.h:cborstreamwriter serialization/qcborvalue.h serialization/qdatastream.h serialization/qjsonarray.h serialization/qjsondocument.h serialization/qjsonobject.h serialization/qjsonvalue.h serialization/qtextstream.h serialization/qxmlstream.h statemachine/qabstractstate.h:statemachine statemachine/qabstracttransition.h:statemachine statemachine/qeventtransition.h:qeventtransition statemachine/qfinalstate.h:statemachine statemachine/qhistorystate.h:statemachine statemachine/qsignaltransition.h:statemachine statemachine/qstate.h:statemachine statemachine/qstatemachine.h:statemachine text/qbytearray.h text/qbytearraylist.h text/qbytearraymatcher.h text/qchar.h text/qcollator.h text/qlocale.h text/qregexp.h text/qregularexpression.h:regularexpression text/qstring.h text/qstringalgorithms.h text/qstringbuilder.h text/qstringlist.h text/qstringliteral.h text/qstringmatcher.h text/qstringview.h text/qtextboundaryfinder.h thread/qatomic.h thread/qbasicatomic.h thread/qexception.h:future thread/qfuture.h:future thread/qfutureinterface.h:future thread/qfuturesynchronizer.h:future thread/qfuturewatcher.h:future thread/qmutex.h thread/qreadwritelock.h thread/qresultstore.h:future thread/qrunnable.h thread/qsemaphore.h:thread thread/qthread.h thread/qthreadpool.h:thread thread/qthreadstorage.h thread/qwaitcondition.h time/qcalendar.h time/qdatetime.h time/qtimezone.h:timezone tools/qalgorithms.h tools/qarraydata.h tools/qarraydataops.h tools/qarraydatapointer.h tools/qbitarray.h tools/qcache.h tools/qcommandlineoption.h:commandlineparser tools/qcommandlineparser.h:commandlineparser tools/qcontainerfwd.h tools/qcontiguouscache.h tools/qcryptographichash.h tools/qeasingcurve.h:easingcurve tools/qhash.h tools/qhashfunctions.h tools/qiterator.h tools/qline.h tools/qlinkedlist.h tools/qlist.h tools/qmap.h tools/qmargins.h tools/qmessageauthenticationcode.h tools/qpair.h tools/qpoint.h tools/qqueue.h tools/qrect.h tools/qrefcount.h tools/qscopedpointer.h tools/qscopedvaluerollback.h tools/qscopeguard.h tools/qset.h tools/qshareddata.h tools/qsharedpointer.h tools/qsize.h tools/qstack.h tools/qtimeline.h:easingcurve tools/qvarlengtharray.h tools/qvector.h tools/qversionnumber.h +SYNCQT.CLEAN_HEADER_FILES = animation/qabstractanimation.h:animation animation/qanimationgroup.h:animation animation/qparallelanimationgroup.h:animation animation/qpauseanimation.h:animation animation/qpropertyanimation.h:animation animation/qsequentialanimationgroup.h:animation animation/qvariantanimation.h:animation codecs/qtextcodec.h:textcodec global/qcompilerdetection.h global/qendian.h global/qflags.h global/qfloat16.h global/qglobal.h global/qglobalstatic.h global/qisenum.h global/qlibraryinfo.h global/qlogging.h global/qnamespace.h global/qnumeric.h global/qoperatingsystemversion.h global/qprocessordetection.h global/qrandom.h global/qsysinfo.h global/qsystemdetection.h global/qtypeinfo.h global/qtypetraits.h global/qversiontagging.h io/qbuffer.h io/qdebug.h io/qdir.h io/qdiriterator.h io/qfile.h io/qfiledevice.h io/qfileinfo.h io/qfileselector.h io/qfilesystemwatcher.h:filesystemwatcher io/qiodevice.h io/qlockfile.h io/qloggingcategory.h io/qprocess.h:processenvironment io/qresource.h io/qsavefile.h io/qsettings.h:settings io/qstandardpaths.h io/qstorageinfo.h io/qtemporarydir.h io/qtemporaryfile.h io/qurl.h io/qurlquery.h itemmodels/qabstractitemmodel.h:itemmodel itemmodels/qabstractproxymodel.h:proxymodel itemmodels/qconcatenatetablesproxymodel.h:concatenatetablesproxymodel itemmodels/qidentityproxymodel.h:identityproxymodel itemmodels/qitemselectionmodel.h:itemmodel itemmodels/qsortfilterproxymodel.h:sortfilterproxymodel itemmodels/qstringlistmodel.h:stringlistmodel itemmodels/qtransposeproxymodel.h:transposeproxymodel kernel/qabstracteventdispatcher.h kernel/qabstractnativeeventfilter.h kernel/qbasictimer.h kernel/qcoreapplication.h kernel/qcoreevent.h kernel/qdeadlinetimer.h kernel/qelapsedtimer.h kernel/qeventloop.h kernel/qfunctions_nacl.h kernel/qfunctions_vxworks.h kernel/qfunctions_winrt.h kernel/qmath.h kernel/qmetaobject.h kernel/qmetatype.h kernel/qmimedata.h kernel/qobject.h kernel/qobjectcleanuphandler.h kernel/qobjectdefs.h kernel/qpointer.h kernel/qsharedmemory.h kernel/qsignalmapper.h kernel/qsocketnotifier.h kernel/qsystemsemaphore.h kernel/qtestsupport_core.h kernel/qtimer.h kernel/qtranslator.h kernel/qvariant.h kernel/qwineventnotifier.h mimetypes/qmimedatabase.h:mimetype mimetypes/qmimetype.h:mimetype plugin/qfactoryinterface.h plugin/qlibrary.h:library plugin/qplugin.h plugin/qpluginloader.h plugin/quuid.h serialization/qcborarray.h serialization/qcborcommon.h serialization/qcbormap.h serialization/qcborstream.h serialization/qcborstreamreader.h:cborstreamreader serialization/qcborstreamwriter.h:cborstreamwriter serialization/qcborvalue.h serialization/qdatastream.h serialization/qjsonarray.h serialization/qjsondocument.h serialization/qjsonobject.h serialization/qjsonvalue.h serialization/qtextstream.h serialization/qxmlstream.h statemachine/qabstractstate.h:statemachine statemachine/qabstracttransition.h:statemachine statemachine/qeventtransition.h:qeventtransition statemachine/qfinalstate.h:statemachine statemachine/qhistorystate.h:statemachine statemachine/qsignaltransition.h:statemachine statemachine/qstate.h:statemachine statemachine/qstatemachine.h:statemachine text/qbytearray.h text/qbytearraylist.h text/qbytearraymatcher.h text/qchar.h text/qcollator.h text/qlocale.h text/qregexp.h text/qregularexpression.h:regularexpression text/qstring.h text/qstringalgorithms.h text/qstringbuilder.h text/qstringlist.h text/qstringliteral.h text/qstringmatcher.h text/qstringview.h text/qtextboundaryfinder.h thread/qatomic.h thread/qbasicatomic.h thread/qexception.h:future thread/qfuture.h:future thread/qfutureinterface.h:future thread/qfuturesynchronizer.h:future thread/qfuturewatcher.h:future thread/qmutex.h thread/qreadwritelock.h thread/qresultstore.h:future thread/qrunnable.h thread/qsemaphore.h:thread thread/qthread.h thread/qthreadpool.h:thread thread/qthreadstorage.h thread/qwaitcondition.h thread/qtsan_impl.h time/qcalendar.h time/qdatetime.h time/qtimezone.h:timezone tools/qalgorithms.h tools/qarraydata.h tools/qarraydataops.h tools/qarraydatapointer.h tools/qbitarray.h tools/qcache.h tools/qcommandlineoption.h:commandlineparser tools/qcommandlineparser.h:commandlineparser tools/qcontainerfwd.h tools/qcontiguouscache.h tools/qcryptographichash.h tools/qeasingcurve.h:easingcurve tools/qhash.h tools/qhashfunctions.h tools/qiterator.h tools/qline.h tools/qlinkedlist.h tools/qlist.h tools/qmap.h tools/qmargins.h tools/qmessageauthenticationcode.h tools/qpair.h tools/qpoint.h tools/qqueue.h tools/qrect.h tools/qrefcount.h tools/qscopedpointer.h tools/qscopedvaluerollback.h tools/qscopeguard.h tools/qset.h tools/qshareddata.h tools/qsharedpointer.h tools/qsize.h tools/qstack.h tools/qtimeline.h:easingcurve tools/qvarlengtharray.h tools/qvector.h tools/qversionnumber.h - SYNCQT.INJECTIONS = src/corelib/global/qconfig.h:qconfig.h:QtConfig src/corelib/global/qconfig_p.h:5.15.8/QtCore/private/qconfig_p.h + SYNCQT.INJECTIONS = src/corelib/global/qconfig.h:qconfig.h:QtConfig src/corelib/global/qconfig_p.h:5.15.9/QtCore/private/qconfig_p.h diff --git a/include/QtCore/qtsan_impl.h b/include/QtCore/qtsan_impl.h new file mode 100644 index 00000000..e9209cbc diff --git a/qtbase-QTBUG-103393.patch b/qtbase-QTBUG-103393.patch new file mode 100644 index 0000000000000000000000000000000000000000..9a2141974c0b68b4497a24a3ddd21d77ddb81086 --- /dev/null +++ b/qtbase-QTBUG-103393.patch @@ -0,0 +1,56 @@ +diff --git a/src/plugins/platforminputcontexts/ibus/interfaces/org.freedesktop.IBus.InputContext.xml b/src/plugins/platforminputcontexts/ibus/interfaces/org.freedesktop.IBus.InputContext.xml +index 9c67a38c5701..30c326d06fc2 100644 +--- a/src/plugins/platforminputcontexts/ibus/interfaces/org.freedesktop.IBus.InputContext.xml ++++ b/src/plugins/platforminputcontexts/ibus/interfaces/org.freedesktop.IBus.InputContext.xml +@@ -14,6 +14,12 @@ + + + ++ ++ ++ ++ ++ ++ + + + +diff --git a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp +index 086025472640350341768efed5206b418f324460..49a44519b6aee8cae3c04265ab5065c99005d838 100644 +--- a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp ++++ b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp +@@ -222,10 +222,31 @@ void QIBusPlatformInputContext::cursorRectChanged() + QWindow *inputWindow = qApp->focusWindow(); + if (!inputWindow) + return; +- r.moveTopLeft(inputWindow->mapToGlobal(r.topLeft())); ++ if (!inputWindow->screen()) ++ return; ++ ++ if (QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive)) { ++ auto margins = inputWindow->frameMargins(); ++ r.translate(margins.left(), margins.top()); ++ qreal scale = inputWindow->devicePixelRatio(); ++ QRect newRect = QRect(r.x() * scale, r.y() * scale, r.width() * scale, r.height() * scale); ++ if (debug) ++ qDebug() << "microFocus" << newRect; ++ d->context->SetCursorLocationRelative(newRect.x(), newRect.y(), ++ newRect.width(), newRect.height()); ++ return; ++ } ++ ++ // x11/xcb ++ auto screenGeometry = inputWindow->screen()->geometry(); ++ auto point = inputWindow->mapToGlobal(r.topLeft()); ++ qreal scale = inputWindow->devicePixelRatio(); ++ auto native = (point - screenGeometry.topLeft()) * scale + screenGeometry.topLeft(); ++ QRect newRect(native, r.size() * scale); + if (debug) +- qDebug() << "microFocus" << r; +- d->context->SetCursorLocation(r.x(), r.y(), r.width(), r.height()); ++ qDebug() << "microFocus" << newRect; ++ d->context->SetCursorLocation(newRect.x(), newRect.y(), ++ newRect.width(), newRect.height()); + } + + void QIBusPlatformInputContext::setFocusObject(QObject *object) diff --git a/qtbase-QTBUG-111994.patch b/qtbase-QTBUG-111994.patch new file mode 100644 index 0000000000000000000000000000000000000000..a5edc75d9e80db33edfff22fdcbc21f6be9e7174 --- /dev/null +++ b/qtbase-QTBUG-111994.patch @@ -0,0 +1,12 @@ +diff --git a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp +index 00aa80cd..dd715b73 100644 +--- a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp ++++ b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp +@@ -564,6 +564,7 @@ void QFontconfigDatabase::populateFontDatabase() + FcObjectSetAdd(os, *p); + ++p; + } ++ FcPatternAddBool(pattern, FC_VARIABLE, FcFalse); + fonts = FcFontList(nullptr, pattern, os); + FcObjectSetDestroy(os); + FcPatternDestroy(pattern); diff --git a/qtbase-QTBUG-112136.patch b/qtbase-QTBUG-112136.patch new file mode 100644 index 0000000000000000000000000000000000000000..ae7bb0e8d21103813e52883ad2fbcecf4a861e78 --- /dev/null +++ b/qtbase-QTBUG-112136.patch @@ -0,0 +1,108 @@ +diff --git a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp +index dd715b73..3d88af3a 100644 +--- a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp ++++ b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp +@@ -954,6 +954,7 @@ void QFontconfigDatabase::setupFontEngine(QFontEngineFT *engine, const QFontDef + QFontEngine::GlyphFormat format; + // try and get the pattern + FcPattern *pattern = FcPatternCreate(); ++ FcPattern *match = NULL; + + FcValue value; + value.type = FcTypeString; +@@ -980,7 +981,41 @@ void QFontconfigDatabase::setupFontEngine(QFontEngineFT *engine, const QFontDef + FcConfigSubstitute(nullptr, pattern, FcMatchPattern); + FcDefaultSubstitute(pattern); + +- FcPattern *match = FcFontMatch(nullptr, pattern, &result); ++ if (!fid.filename.isEmpty()) { ++ // FC_INDEX is ignored during processing in FcFontMatch. ++ // So iterate FcPatterns directly and find it out. ++ FcFontSet *fcsets[2], *fcfs; ++ ++ fcsets[0] = FcConfigGetFonts(nullptr, FcSetSystem); ++ fcsets[1] = FcConfigGetFonts(nullptr, FcSetApplication); ++ for (int nset = 0; nset < 2; nset++) { ++ fcfs = fcsets[nset]; ++ for (int fnum = 0; fnum < fcfs->nfont; fnum++) { ++ FcPattern *fcpat = fcfs->fonts[fnum]; ++ FcChar8 *fcfile; ++ FcBool variable; ++ int fcindex; ++ ++ // FIXME: Ignore a FcPattern which has variable=true at this point. ++ if (FcPatternGetBool(fcpat, FC_VARIABLE, 0, &variable) == FcResultMatch && ++ variable == FcTrue) ++ continue; ++ if (FcPatternGetString(fcpat, FC_FILE, 0, &fcfile) == FcResultMatch && ++ FcPatternGetInteger(fcpat, FC_INDEX, 0, &fcindex) == FcResultMatch) { ++ QByteArray f = QByteArray::fromRawData((const char *)fcfile, ++ strlen((const char *)fcfile)); ++ if (f == fid.filename && fcindex == fid.index) { ++ // We found it. ++ match = FcFontRenderPrepare(nullptr, pattern, fcpat); ++ goto bail; ++ } ++ } ++ } ++ } ++ } ++bail: ++ if (!match) ++ match = FcFontMatch(nullptr, pattern, &result); + if (match) { + engine->setDefaultHintStyle(defaultHintStyleFromMatch((QFont::HintingPreference)fontDef.hintingPreference, match, useXftConf)); + +@@ -1000,6 +1035,11 @@ void QFontconfigDatabase::setupFontEngine(QFontEngineFT *engine, const QFontDef + antialias = fc_antialias; + } + ++ FcBool embolden; ++ engine->auto_embolden = true; ++ if (FcPatternGetBool(match, FC_EMBOLDEN, 0, &embolden) == FcResultMatch) ++ engine->embolden = embolden; ++ + if (antialias) { + QFontEngine::SubpixelAntialiasingType subpixelType = QFontEngine::Subpixel_None; + if (!(fontDef.styleStrategy & QFont::NoSubpixelAntialias)) +diff --git a/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp b/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp +index 52ce36b0..9626490b 100644 +--- a/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp ++++ b/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp +@@ -681,6 +681,7 @@ QFontEngineFT::QFontEngineFT(const QFontDef &fd) + kerning_pairs_loaded = false; + transform = false; + embolden = false; ++ auto_embolden = false; + obliquen = false; + antialias = true; + freetype = nullptr; +@@ -748,7 +749,7 @@ bool QFontEngineFT::init(FaceId faceId, bool antialias, GlyphFormat format, + FT_Set_Transform(face, &matrix, nullptr); + freetype->matrix = matrix; + // fake bold +- if ((fontDef.weight >= QFont::Bold) && !(face->style_flags & FT_STYLE_FLAG_BOLD) && !FT_IS_FIXED_WIDTH(face) && !qEnvironmentVariableIsSet("QT_NO_SYNTHESIZED_BOLD")) { ++ if (!auto_embolden && (fontDef.weight >= QFont::Bold) && !(face->style_flags & FT_STYLE_FLAG_BOLD) && !FT_IS_FIXED_WIDTH(face) && !qEnvironmentVariableIsSet("QT_NO_SYNTHESIZED_BOLD")) { + if (const TT_OS2 *os2 = reinterpret_cast(FT_Get_Sfnt_Table(face, ft_sfnt_os2))) { + if (os2->usWeightClass < 700 && + (fontDef.pixelSize < 64 || qEnvironmentVariableIsSet("QT_NO_SYNTHESIZED_BOLD_LIMIT"))) { +@@ -2104,6 +2105,7 @@ bool QFontEngineFT::initFromFontEngine(const QFontEngineFT *fe) + antialias = fe->antialias; + transform = fe->transform; + embolden = fe->embolden; ++ auto_embolden = fe->auto_embolden; + obliquen = fe->obliquen; + subpixelType = fe->subpixelType; + lcdFilterType = fe->lcdFilterType; +diff --git a/src/platformsupport/fontdatabases/freetype/qfontengine_ft_p.h b/src/platformsupport/fontdatabases/freetype/qfontengine_ft_p.h +index 2e3aef69..4372f913 100644 +--- a/src/platformsupport/fontdatabases/freetype/qfontengine_ft_p.h ++++ b/src/platformsupport/fontdatabases/freetype/qfontengine_ft_p.h +@@ -295,6 +295,7 @@ protected: + bool cacheEnabled; + bool forceAutoHint; + bool stemDarkeningDriver; ++ bool auto_embolden; // a flag to decide if embolden is set by fontconfig + + private: + friend class QFontEngineFTRawFont; diff --git a/qtbase-everywhere-opensource-src-5.15.8.tar.xz b/qtbase-everywhere-opensource-src-5.15.9.tar.xz similarity index 80% rename from qtbase-everywhere-opensource-src-5.15.8.tar.xz rename to qtbase-everywhere-opensource-src-5.15.9.tar.xz index 1a320815f17a5d52334d36d0c11d6c8fa7676e20..29474d369bca7379c03dcf73acb305da3c09dc47 100644 Binary files a/qtbase-everywhere-opensource-src-5.15.8.tar.xz and b/qtbase-everywhere-opensource-src-5.15.9.tar.xz differ diff --git a/qtbase-everywhere-src-5.11.1-python3.patch b/qtbase-everywhere-src-5.11.1-python3.patch deleted file mode 100644 index 40dfd479021c59e0336bc3948c9b8c3a3fd6ddba..0000000000000000000000000000000000000000 --- a/qtbase-everywhere-src-5.11.1-python3.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff -up qtbase-everywhere-src-5.11.1/mkspecs/features/uikit/devices.py.me qtbase-everywhere-src-5.11.1/mkspecs/features/uikit/devices.py ---- qtbase-everywhere-src-5.11.1/mkspecs/features/uikit/devices.py.me 2018-06-23 11:29:21.750066271 +0200 -+++ qtbase-everywhere-src-5.11.1/mkspecs/features/uikit/devices.py 2018-06-23 11:30:07.457292033 +0200 -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python3 - - ############################################################################# - ##