Projects
openEuler:Mainline
qt5-qtbase
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
_service:tar_scm:qt5-qtbase.spec
Changed
@@ -34,7 +34,7 @@ Name: qt5-qtbase Summary: Qt5 - QtBase components Version: 5.15.2 -Release: 1 +Release: 6 # See LGPL_EXCEPTIONS.txt, for exception details @@ -57,9 +57,6 @@ # macros Source4: macros.qt5-qtbase -# support multilib optflags -Patch0000: qtbase-multilib_optflags.patch - # borrowed from opensuse # track private api via properly versioned symbols # downside: binaries produced with these differently-versioned symbols are no longer @@ -70,11 +67,6 @@ # namespace QT_VERSION_CHECK to workaround major/minor being pre-defined (#1396755) Patch0002: qtbase-opensource-src-5.8.0-QT_VERSION_CHECK.patch -# 1381828 - Broken window scaling for some QT5 applications (#1381828) -# This patch moves the threshold for 2x scaling from the DPI of 144 to 192, -# the same value GNOME uses. It's not a complete solution... -Patch0003: qtbase-hidpi_scale_at_192.patch - # 1. Workaround moc/multilib issues # https://bugzilla.redhat.com/show_bug.cgi?id=1290020 # https://bugreports.qt.io/browse/QTBUG-49972 @@ -115,9 +107,15 @@ # see also patch90 Patch0014: qtbase-QTBUG-90395.patch Patch0015: qtbase-QTBUG-89977.patch -Patch0016: qtbase-filechooser-portal-send-window-id-in-hex.patch Patch0017: qtbase-QTBUG-91909.patch Patch0018: 0001-modify-kwin_5.18-complier-error.patch +# https://launchpad.net/ubuntu/+source/qtbase-opensource-src/5.15.2+dfsg-15 +Patch0019: CVE-2021-38593.patch +Patch0020: CVE-2022-25255.patch +Patch0021: qt5-qtbase-Add-sw64-architecture.patch +Patch0022: add-loongarch64-support.patch +# https://download.qt.io/official_releases/qt/5.15/CVE-2023-24607-qtbase-5.15.diff +Patch0023: CVE-2023-24607.patch # Do not check any files in %%{_qt5_plugindir}/platformthemes/ for requires. # Those themes are there for platform integration. If the required libraries are # not there, the platform to integrate with isn't either. Then Qt will just @@ -371,6 +369,11 @@ %patch0015 -p1 -b .QTBUG-89977 %patch0017 -p1 -b .QTBUG-91909 %patch0018 -p1 +%patch0019 -p1 +%patch0020 -p1 +%patch0021 -p1 +%patch0022 -p1 +%patch0023 -p1 # move some bundled libs to ensure they're not accidentally used pushd src/3rdparty mkdir UNUSED @@ -1012,6 +1015,21 @@ %changelog +* Fri Apr 28 2023 douyan <douyan@kylinos.cn> - 5.15.2-6 +- fix CVE-2023-24607 + +* Mon Dec 12 2022 huajingyun <huajingyun@loongson.cn> - 5.15.2-5 +- add loongarch64 support + +* Tue Oct 25 2022 wuzx<wuzx1226@qq.com> - 5.15.2-4 +- Add sw64 architecture + +* Wed Jul 27 2022 peijiankang <peijiankang@kylinos.cn> - 5.15.2-3 +- remove unnecessary file + +* Tue Jul 26 2022 wangkai <wangkai385@h-partners.com> - 5.15.2-2 +- Fix CVE-2021-38593 and CVE-2022-25255 + * Sat Dec 11 2021 hua_yadong <huayadong@kylinos.cn> - 5.15.2-1 - update to upstream version 5.15.2
View file
_service:tar_scm:CVE-2021-38593.patch
Added
@@ -0,0 +1,84 @@ +Description: avoid processing-intensive painting of high number of tiny dashes + When stroking a dashed path, an unnecessary amount of processing would + be spent if there is a huge number of dashes visible, e.g. because of + scaling. Since the dashes are too small to be individually visible + anyway, just replace with a semi-transparent solid line for such + cases. +Origin: upstream, commits: + https://code.qt.io/cgit/qt/qtbase.git/commit/?id=f4d791b330d02777 + https://code.qt.io/cgit/qt/qtbase.git/commit/?id=6b400e3147dcfd8c + https://code.qt.io/cgit/qt/qtbase.git/commit/?id=84aba80944a2e1c3 + https://code.qt.io/cgit/qt/qtbase.git/commit/?id=cca8ed0547405b1c +Last-Update: 2021-11-27 + +--- a/src/gui/painting/qpaintengineex.cpp ++++ b/src/gui/painting/qpaintengineex.cpp +@@ -385,10 +385,10 @@ QPainterState *QPaintEngineEx::createSta + + Q_GUI_EXPORT extern bool qt_scaleForTransform(const QTransform &transform, qreal *scale); // qtransform.cpp + +-void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen) ++void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &inPen) + { + #ifdef QT_DEBUG_DRAW +- qDebug() << "QPaintEngineEx::stroke()" << pen; ++ qDebug() << "QPaintEngineEx::stroke()" << inPen; + #endif + + Q_D(QPaintEngineEx); +@@ -403,6 +403,38 @@ void QPaintEngineEx::stroke(const QVecto + d->stroker.setCubicToHook(qpaintengineex_cubicTo); + } + ++ QRectF clipRect; ++ QPen pen = inPen; ++ if (pen.style() > Qt::SolidLine) { ++ QRectF cpRect = path.controlPointRect(); ++ const QTransform &xf = state()->matrix; ++ if (qt_pen_is_cosmetic(pen, state()->renderHints)) { ++ clipRect = d->exDeviceRect; ++ cpRect.translate(xf.dx(), xf.dy()); ++ } else { ++ clipRect = xf.inverted().mapRect(QRectF(d->exDeviceRect)); ++ } ++ // Check to avoid generating unwieldy amount of dashes that will not be visible anyway ++ qreal pw = pen.widthF() ? pen.widthF() : 1; ++ QRectF extentRect = cpRect.adjusted(-pw, -pw, pw, pw) & clipRect; ++ qreal extent = qMax(extentRect.width(), extentRect.height()); ++ qreal patternLength = 0; ++ const QVector<qreal> pattern = pen.dashPattern(); ++ const int patternSize = qMin(pattern.size(), 32); ++ for (int i = 0; i < patternSize; i++) ++ patternLength += qMax(pattern.at(i), qreal(0)); ++ patternLength *= pw; ++ if (qFuzzyIsNull(patternLength)) { ++ pen.setStyle(Qt::NoPen); ++ } else if (extent / patternLength > 10000) { ++ // approximate stream of tiny dashes with semi-transparent solid line ++ pen.setStyle(Qt::SolidLine); ++ QColor color(pen.color()); ++ color.setAlpha(color.alpha() / 2); ++ pen.setColor(color); ++ } ++ } ++ + if (!qpen_fast_equals(pen, d->strokerPen)) { + d->strokerPen = pen; + d->stroker.setJoinStyle(pen.joinStyle()); +@@ -430,14 +462,8 @@ void QPaintEngineEx::stroke(const QVecto + return; + } + +- if (pen.style() > Qt::SolidLine) { +- if (qt_pen_is_cosmetic(pen, state()->renderHints)){ +- d->activeStroker->setClipRect(d->exDeviceRect); +- } else { +- QRectF clipRect = state()->matrix.inverted().mapRect(QRectF(d->exDeviceRect)); +- d->activeStroker->setClipRect(clipRect); +- } +- } ++ if (!clipRect.isNull()) ++ d->activeStroker->setClipRect(clipRect); + + if (d->activeStroker == &d->stroker) + d->stroker.setForceOpen(path.hasExplicitOpen());
View file
_service:tar_scm:CVE-2022-25255.patch
Added
@@ -0,0 +1,92 @@ +Description: QProcess: ensure we don't accidentally execute something from CWD + Unless "." (or the empty string) is in $PATH, we're not supposed to find + executables in the current directory. This is how the Unix shells behave + and we match their behavior. It's also the behavior Qt had prior to 5.9 + (commit 28666d167aa8e602c0bea25ebc4d51b55005db13). On Windows, searching + the current directory is the norm, so we keep that behavior. + . + This commit does not add an explicit check for an empty return from + QStandardPaths::findExecutable(). Instead, we allow that empty string to + go all the way to execve(2), which will fail with ENOENT. We could catch + it early, before fork(2), but why add code for the error case? + . + See https://kde.org/info/security/advisory-20220131-1.txt +Origin: upstream, https://download.qt.io/official_releases/qt/5.15/CVE-2022-25255-qprocess5-15.diff +Last-Update: 2022-02-21 + +--- a/src/corelib/io/qprocess_unix.cpp ++++ b/src/corelib/io/qprocess_unix.cpp +@@ -1,7 +1,7 @@ + /**************************************************************************** + ** + ** Copyright (C) 2016 The Qt Company Ltd. +-** Copyright (C) 2016 Intel Corporation. ++** Copyright (C) 2022 Intel Corporation. + ** Contact: https://www.qt.io/licensing/ + ** + ** This file is part of the QtCore module of the Qt Toolkit. +@@ -422,14 +422,15 @@ void QProcessPrivate::startProcess() + // Add the program name to the argument list. + argv0 = nullptr; + if (!program.contains(QLatin1Char('/'))) { ++ // findExecutable() returns its argument if it's an absolute path, ++ // otherwise it searches $PATH; returns empty if not found (we handle ++ // that case much later) + const QString &exeFilePath = QStandardPaths::findExecutable(program); +- if (!exeFilePath.isEmpty()) { +- const QByteArray &tmp = QFile::encodeName(exeFilePath); +- argv0 = ::strdup(tmp.constData()); +- } +- } +- if (!argv0) ++ const QByteArray &tmp = QFile::encodeName(exeFilePath); ++ argv0 = ::strdup(tmp.constData()); ++ } else { + argv0 = ::strdup(encodedProgramName.constData()); ++ } + + // Add every argument to the list + for (int i = 0; i < arguments.count(); ++i) +@@ -983,15 +984,16 @@ bool QProcessPrivate::startDetached(qint + envp = _q_dupEnvironment(environment.d.constData()->vars, &envc); + } + +- QByteArray tmp; + if (!program.contains(QLatin1Char('/'))) { ++ // findExecutable() returns its argument if it's an absolute path, ++ // otherwise it searches $PATH; returns empty if not found (we handle ++ // that case much later) + const QString &exeFilePath = QStandardPaths::findExecutable(program); +- if (!exeFilePath.isEmpty()) +- tmp = QFile::encodeName(exeFilePath); ++ const QByteArray &tmp = QFile::encodeName(exeFilePath); ++ argv0 = ::strdup(tmp.constData()); ++ } else { ++ argv0 = ::strdup(QFile::encodeName(program)); + } +- if (tmp.isEmpty()) +- tmp = QFile::encodeName(program); +- argv0 = tmp.data(); + + if (envp) + qt_safe_execve(argv0, argv, envp); +--- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp ++++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp +@@ -1449,7 +1449,7 @@ void tst_QApplication::desktopSettingsAw + { + #if QT_CONFIG(process) + QProcess testProcess; +- testProcess.start("desktopsettingsaware_helper"); ++ testProcess.start("./desktopsettingsaware_helper"); + QVERIFY2(testProcess.waitForStarted(), + qPrintable(QString::fromLatin1("Cannot start 'desktopsettingsaware_helper': %1").arg(testProcess.errorString()))); + QVERIFY(testProcess.waitForFinished(10000)); +@@ -2365,7 +2365,7 @@ void tst_QApplication::qtbug_12673() + #if QT_CONFIG(process) + QProcess testProcess; + QStringList arguments; +- testProcess.start("modal_helper", arguments); ++ testProcess.start("./modal_helper", arguments); + QVERIFY2(testProcess.waitForStarted(), + qPrintable(QString::fromLatin1("Cannot start 'modal_helper': %1").arg(testProcess.errorString()))); + QVERIFY(testProcess.waitForFinished(20000));
View file
_service:tar_scm:CVE-2023-24607.patch
Added
@@ -0,0 +1,336 @@ + src/plugins/sqldrivers/odbc/qsql_odbc.cpp | 210 ++++++++++++---------- + 1 file changed, 120 insertions(+), 90 deletions(-) + +diff --git a/src/plugins/sqldrivers/odbc/qsql_odbc.cpp b/src/plugins/sqldrivers/odbc/qsql_odbc.cpp +index 547eb204..8d7ce3e3 100644 +--- a/src/plugins/sqldrivers/odbc/qsql_odbc.cpp ++++ b/src/plugins/sqldrivers/odbc/qsql_odbc.cpp +@@ -91,23 +91,39 @@ inline static QString fromSQLTCHAR(const QVarLengthArray<SQLTCHAR>& input, int s + 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; + } +@@ -768,6 +784,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) + { +@@ -803,10 +826,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; +@@ -821,10 +841,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; +@@ -1027,9 +1044,13 @@ 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)); +@@ -1375,9 +1396,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", +@@ -1405,7 +1429,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)); + +@@ -1582,35 +1606,36 @@ bool QODBCResult::exec() + case QVariant::String: + if (d->unicode) { + QByteArray &ba = tmpStoragei; +- 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, + qParamTypebindValueType(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, + qParamTypebindValueType(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; +@@ -1718,10 +1743,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()); +- valuesi = 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)); ++ valuesi = fromSQLTCHAR(string); + } + break; + } +@@ -1968,14 +1993,16 @@ bool QODBCDriver::open(const QString & db, + 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)); +@@ -2354,17 +2381,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); +@@ -2438,28 +2463,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); +@@ -2540,15 +2567,18 @@ 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); + +-- +2.39.1 +
View file
_service:tar_scm:add-loongarch64-support.patch
Added
@@ -0,0 +1,40 @@ +diff --git a/src/3rdparty/double-conversion/include/double-conversion/utils.h b/src/3rdparty/double-conversion/include/double-conversion/utils.h +index 70e697ca..9be294a2 100644 +--- a/src/3rdparty/double-conversion/include/double-conversion/utils.h ++++ b/src/3rdparty/double-conversion/include/double-conversion/utils.h +@@ -102,6 +102,7 @@ int main(int argc, char** argv) { + defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \ + defined(__riscv) || \ + defined(__or1k__) || defined(__arc__) || \ ++ defined(__loongarch64) || \ + defined(__EMSCRIPTEN__) + #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 + #elif defined(__mc68000__) || \ +diff --git a/src/corelib/global/archdetect.cpp b/src/corelib/global/archdetect.cpp +index 1d00b7f5..74f3c8fc 100644 +--- a/src/corelib/global/archdetect.cpp ++++ b/src/corelib/global/archdetect.cpp +@@ -59,6 +59,8 @@ + # define ARCH_PROCESSOR "x86_64" + #elif defined(Q_PROCESSOR_IA64) + # define ARCH_PROCESSOR "ia64" ++#elif defined(Q_PROCESSOR_LOONGARCH_64) ++# define ARCH_PROCESSOR "loongarch64" + #elif defined(Q_PROCESSOR_MIPS_64) + # define ARCH_PROCESSOR "mips64" + #elif defined(Q_PROCESSOR_MIPS) +diff --git a/src/corelib/global/qprocessordetection.h b/src/corelib/global/qprocessordetection.h +index 8d657208..69f84a15 100644 +--- a/src/corelib/global/qprocessordetection.h ++++ b/src/corelib/global/qprocessordetection.h +@@ -223,6 +223,10 @@ + # define Q_PROCESSOR_WORDSIZE 8 + // Q_BYTE_ORDER not defined, use endianness auto-detection + ++#elif defined(__loongarch64) ++# define Q_PROCESSOR_LOONGARCH_64 ++# define Q_PROCESSOR_WORDSIZE 8 ++ + /* + MIPS family, known revisions: I, II, III, IV, 32, 64 +
View file
_service:tar_scm:qt5-qtbase-Add-sw64-architecture.patch
Added
@@ -0,0 +1,141 @@ +From 2d5384cdea1303e20c3c7f69b24703b4a2ad91b0 Mon Sep 17 00:00:00 2001 +From: wuzx <wuzx1226@qq.com> +Date: Fri, 18 Nov 2022 01:17:49 +0800 +Subject: PATCH Add sw64 architecture + +Signed-off-by: wuzx <wuzx1226@qq.com> +--- + .../include/double-conversion/utils.h | 2 +- + src/3rdparty/sha3/brg_endian.h | 1 + + src/corelib/global/qprocessordetection.h | 3 +- + src/corelib/io/qfilesystemwatcher_inotify.cpp | 4 +++ + src/gui/image/qimage.cpp | 4 +++ + src/testlib/3rdparty/cycle_p.h | 36 +++++++++++++++++++ + 6 files changed, 48 insertions(+), 2 deletions(-) + +diff --git a/src/3rdparty/double-conversion/include/double-conversion/utils.h b/src/3rdparty/double-conversion/include/double-conversion/utils.h +index 70e697ca..1524e931 100644 +--- a/src/3rdparty/double-conversion/include/double-conversion/utils.h ++++ b/src/3rdparty/double-conversion/include/double-conversion/utils.h +@@ -97,7 +97,7 @@ int main(int argc, char** argv) { + defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \ + defined(_POWER) || defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \ + defined(__sparc__) || defined(__sparc) || defined(__s390__) || \ +- defined(__SH4__) || defined(__alpha__) || \ ++ defined(__SH4__) || defined(__alpha__) || defined(__sw_64__) || \ + defined(_MIPS_ARCH_MIPS32R2) || defined(__ARMEB__) ||\ + defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \ + defined(__riscv) || \ +diff --git a/src/3rdparty/sha3/brg_endian.h b/src/3rdparty/sha3/brg_endian.h +index 9bb306e6..e3907596 100644 +--- a/src/3rdparty/sha3/brg_endian.h ++++ b/src/3rdparty/sha3/brg_endian.h +@@ -105,6 +105,7 @@ Changes for ARM 9/9/2010 Downstream relative to Gladman's GitHub, upstream to Q + #if !defined(PLATFORM_BYTE_ORDER) + + #if defined( __alpha__ ) || defined( __alpha ) || defined( i386 ) || \ ++#if defined( __sw_64__ ) || defined( __sw_64 ) || \ + defined( __i386__ ) || defined( _M_I86 ) || defined( _M_IX86 ) || \ + defined( __OS2__ ) || defined( sun386 ) || defined( __TURBOC__ ) || \ + defined( vax ) || defined( vms ) || defined( VMS ) || \ +diff --git a/src/corelib/global/qprocessordetection.h b/src/corelib/global/qprocessordetection.h +index 8d657208..20c9650d 100644 +--- a/src/corelib/global/qprocessordetection.h ++++ b/src/corelib/global/qprocessordetection.h +@@ -87,7 +87,8 @@ + // #elif defined(__alpha__) || defined(_M_ALPHA) + // # define Q_PROCESSOR_ALPHA + // Q_BYTE_ORDER not defined, use endianness auto-detection +- ++//#elif defined(__sw_64__) || defined(_M_SW_64) ++//# define Q_PROCESSOR_SW_64 + /* + ARM family, known revisions: V5, V6, V7, V8 + +diff --git a/src/corelib/io/qfilesystemwatcher_inotify.cpp b/src/corelib/io/qfilesystemwatcher_inotify.cpp +index 94d9d06b..38b1e7e4 100644 +--- a/src/corelib/io/qfilesystemwatcher_inotify.cpp ++++ b/src/corelib/io/qfilesystemwatcher_inotify.cpp +@@ -91,6 +91,10 @@ + # define __NR_inotify_add_watch 285 + # define __NR_inotify_rm_watch 286 + # define __NR_inotify_init1 324 ++#elif defined (__sw_64__) ++# define __NR_inotify_init 444 ++# define __NR_inotify_add_watch 445 ++# define __NR_inotify_rm_watch 446 + #elif defined (__alpha__) + # define __NR_inotify_init 444 + # define __NR_inotify_add_watch 445 +diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp +index ced5a505..c1096f45 100644 +--- a/src/gui/image/qimage.cpp ++++ b/src/gui/image/qimage.cpp +@@ -83,6 +83,10 @@ static inline bool isLocked(QImageData *data) + return data != nullptr && data->is_locked; + } + ++#if defined(Q_CC_DEC) && defined(__sw_64) && (__DECCXX_VER-0 >= 50190001) ++#pragma message disable narrowptr ++#endif ++ + #if defined(Q_CC_DEC) && defined(__alpha) && (__DECCXX_VER-0 >= 50190001) + #pragma message disable narrowptr + #endif +diff --git a/src/testlib/3rdparty/cycle_p.h b/src/testlib/3rdparty/cycle_p.h +index 95e741a8..5577b873 100644 +--- a/src/testlib/3rdparty/cycle_p.h ++++ b/src/testlib/3rdparty/cycle_p.h +@@ -405,6 +405,26 @@ INLINE_ELAPSED(__inline__) + + #define HAVE_TICK_COUNTER + #endif ++/*----------------------------------------------------------------*/ ++#if defined(__GNUC__) && defined(__sw_64__) && !defined(HAVE_TICK_COUNTER) ++/* ++ * The 32-bit cycle counter on sw_64 overflows pretty quickly, ++ * unfortunately. A 1GHz machine overflows in 4 seconds. ++ */ ++typedef unsigned int CycleCounterTicks; ++ ++static __inline__ CycleCounterTicks getticks(void) ++{ ++ unsigned long cc; ++ __asm__ __volatile__ ("rtc %0" : "=r"(cc)); ++ return (cc & 0xFFFFFFFF); ++} ++ ++INLINE_ELAPSED(__inline__) ++ ++#define HAVE_TICK_COUNTER ++#endif ++ + /*----------------------------------------------------------------*/ + #if defined(__GNUC__) && defined(__alpha__) && !defined(HAVE_TICK_COUNTER) + /* +@@ -441,6 +461,22 @@ INLINE_ELAPSED(__inline__) + #define HAVE_TICK_COUNTER + #endif + ++/*----------------------------------------------------------------*/ ++#if (defined(__DECC) || defined(__DECCXX)) && defined(__sw_64) && defined(HAVE_C_ASM_H) && !defined(HAVE_TICK_COUNTER) ++# include <c_asm.h> ++typedef unsigned int CycleCounterTicks; ++ ++static __inline CycleCounterTicks getticks(void) ++{ ++ unsigned long cc; ++ cc = asm("rtc %v0"); ++ return (cc & 0xFFFFFFFF); ++} ++ ++INLINE_ELAPSED(__inline) ++ ++#define HAVE_TICK_COUNTER ++#endif + /*----------------------------------------------------------------*/ + #if (defined(__DECC) || defined(__DECCXX)) && defined(__alpha) && defined(HAVE_C_ASM_H) && !defined(HAVE_TICK_COUNTER) + # include <c_asm.h> +-- +2.33.0 +
View file
_service:tar_scm:qtbase-filechooser-portal-send-window-id-in-hex.patch
Deleted
@@ -1,26 +0,0 @@ -From acaabc9108dfe75530960cf8e3ec4f3602cd82e0 Mon Sep 17 00:00:00 2001 -From: Jan Grulich <jgrulich@redhat.com> -Date: Mon, 08 Mar 2021 12:29:21 +0100 -Subject: PATCH FileChooser portal: send window id in hex - -We send window id in decimal, however, it is expected to be send in hex. -This causes a mismatch and makes portal dialog to show in background. - -Pick-to: 5.15 6.0 6.1 -Change-Id: Ibd77199bbb4a2ad4782a0457ddc5506c6b5608fe -Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> ---- - -diff --git a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp -index ec153f6..85bdd1a 100644 ---- a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp -+++ b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp -@@ -185,7 +185,7 @@ - QLatin1String("/org/freedesktop/portal/desktop"), - QLatin1String("org.freedesktop.portal.FileChooser"), - d->saveFile ? QLatin1String("SaveFile") : QLatin1String("OpenFile")); -- QString parentWindowId = QLatin1String("x11:") + QString::number(d->winId); -+ QString parentWindowId = QLatin1String("x11:") + QString::number(d->winId, 16); - - QVariantMap options; - if (!d->acceptLabel.isEmpty())
View file
_service:tar_scm:qtbase-hidpi_scale_at_192.patch
Deleted
@@ -1,13 +0,0 @@ -diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp -index ec0f9ba..6d0d7a6 100644 ---- a/src/plugins/platforms/xcb/qxcbscreen.cpp -+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp -@@ -747,7 +747,7 @@ void QXcbScreen::updateGeometry(const QRect &geometry, uint8_t rotation) - m_sizeMillimeters = sizeInMillimeters(geometry.size(), virtualDpi()); - - qreal dpi = geometry.width() / physicalSize().width() * qreal(25.4); -- m_pixelDensity = qMax(1, qRound(dpi/96)); -+ m_pixelDensity = qMax(1, (int) (dpi/96)); // instead of rounding at 1.5, round at 2.0 (same as GNOME) - m_geometry = geometry; - m_availableGeometry = geometry & m_virtualDesktop->workArea(); - QWindowSystemInterface::handleScreenGeometryChange(QPlatformScreen::screen(), m_geometry, m_availableGeometry);
View file
_service:tar_scm:qtbase-multilib_optflags.patch
Deleted
@@ -1,33 +0,0 @@ -diff -r -u a/mkspecs/linux-g++/qmake.conf b/mkspecs/linux-g++/qmake.conf ---- a/mkspecs/linux-g++/qmake.conf 2015-10-30 06:20:01.000000000 -0200 -+++ b/mkspecs/linux-g++/qmake.conf 2015-11-05 11:23:23.230741601 -0200 -@@ -5,6 +5,7 @@ - MAKEFILE_GENERATOR = UNIX - CONFIG += incremental - QMAKE_INCREMENTAL_STYLE = sublib -+QMAKE_CFLAGS_RELEASE += -O2 - - include(../common/linux.conf) - include(../common/gcc-base-unix.conf) -diff -r -u a/mkspecs/linux-g++-32/qmake.conf b/mkspecs/linux-g++-32/qmake.conf ---- a/mkspecs/linux-g++-32/qmake.conf 2015-10-30 06:20:01.000000000 -0200 -+++ b/mkspecs/linux-g++-32/qmake.conf 2015-11-05 11:22:19.761494470 -0200 -@@ -10,6 +10,7 @@ - - QMAKE_CFLAGS = -m32 - QMAKE_LFLAGS = -m32 -+QMAKE_CFLAGS_RELEASE += -O2 - - include(../common/gcc-base-unix.conf) - include(../common/g++-unix.conf) -diff -r -u a/mkspecs/linux-g++-64/qmake.conf b/mkspecs/linux-g++-64/qmake.conf ---- a/mkspecs/linux-g++-64/qmake.conf 2015-10-30 06:20:01.000000000 -0200 -+++ b/mkspecs/linux-g++-64/qmake.conf 2015-11-05 11:22:49.497610248 -0200 -@@ -13,6 +13,7 @@ - - QMAKE_CFLAGS = -m64 - QMAKE_LFLAGS = -m64 -+QMAKE_CFLAGS_RELEASE += -O2 - - include(../common/gcc-base-unix.conf) - include(../common/g++-unix.conf)
View file
_service
Changed
@@ -2,7 +2,7 @@ <service name="tar_scm"> <param name="scm">git</param> <param name="url">git@gitee.com:src-openeuler/qt5-qtbase.git</param> - <param name="revision">aafb5302145760521ddace1bdbcd6b8c9ac0d11f</param> + <param name="revision">master</param> <param name="exclude">*</param> <param name="extract">*</param> </service>
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2