!71 [sync] PR-70: update to upstream version 5.15.10
From: @openeuler-sync-bot Reviewed-by: @peijiankang Signed-off-by: @peijiankang
This commit is contained in:
commit
bdf3b88c02
@ -1,233 +0,0 @@
|
||||
From bc16340b2eee8b7f7c7a8fd4cf7ba0c288bfc6bc Mon Sep 17 00:00:00 2001
|
||||
From: pei-jiankang <peijiankang@kylinos.cn>
|
||||
Date: Wed, 10 Nov 2021 22:09:24 +0800
|
||||
Subject: [PATCH] modify-kwin_5.18-complier-error
|
||||
|
||||
---
|
||||
examples/corelib/serialization/cbordump/main.cpp | 8 ++++----
|
||||
.../src_corelib_serialization_qcborstream.cpp | 2 +-
|
||||
src/corelib/serialization/qcborcommon.h | 4 ++--
|
||||
src/corelib/serialization/qcborstreamreader.h | 6 +++---
|
||||
src/corelib/serialization/qcborstreamwriter.h | 2 +-
|
||||
src/corelib/serialization/qcborvalue.cpp | 4 ++--
|
||||
src/corelib/serialization/qcborvalue.h | 4 ++--
|
||||
.../corelib/kernel/qmetatype/tst_qmetatype.h | 2 +-
|
||||
.../qcborstreamreader/tst_qcborstreamreader.cpp | 8 ++++----
|
||||
.../serialization/qcborvalue/tst_qcborvalue.cpp | 16 ++++++++--------
|
||||
10 files changed, 28 insertions(+), 28 deletions(-)
|
||||
|
||||
diff --git a/examples/corelib/serialization/cbordump/main.cpp b/examples/corelib/serialization/cbordump/main.cpp
|
||||
index 222bd436..b43650eb 100644
|
||||
--- a/examples/corelib/serialization/cbordump/main.cpp
|
||||
+++ b/examples/corelib/serialization/cbordump/main.cpp
|
||||
@@ -385,10 +385,10 @@ void CborDumper::dumpOne(int nestingLevel)
|
||||
|
||||
case QCborStreamReader::SimpleType:
|
||||
switch (reader.toSimpleType()) {
|
||||
- case QCborSimpleType::False:
|
||||
+ case QCborSimpleType::False_QCb:
|
||||
printf("false");
|
||||
break;
|
||||
- case QCborSimpleType::True:
|
||||
+ case QCborSimpleType::True_QCb:
|
||||
printf("true");
|
||||
break;
|
||||
case QCborSimpleType::Null:
|
||||
@@ -620,10 +620,10 @@ void CborDumper::dumpOneDetailed(int nestingLevel)
|
||||
QCborSimpleType st = reader.toSimpleType();
|
||||
reader.next();
|
||||
switch (st) {
|
||||
- case QCborSimpleType::False:
|
||||
+ case QCborSimpleType::False_QCb:
|
||||
print("Simple Type", "false");
|
||||
break;
|
||||
- case QCborSimpleType::True:
|
||||
+ case QCborSimpleType::True_QCb:
|
||||
print("Simple Type", "true");
|
||||
break;
|
||||
case QCborSimpleType::Null:
|
||||
diff --git a/src/corelib/doc/snippets/code/src_corelib_serialization_qcborstream.cpp b/src/corelib/doc/snippets/code/src_corelib_serialization_qcborstream.cpp
|
||||
index 6ddb5a93..993a0a03 100644
|
||||
--- a/src/corelib/doc/snippets/code/src_corelib_serialization_qcborstream.cpp
|
||||
+++ b/src/corelib/doc/snippets/code/src_corelib_serialization_qcborstream.cpp
|
||||
@@ -192,7 +192,7 @@
|
||||
//! [15]
|
||||
|
||||
//! [16]
|
||||
- writer.append(b ? QCborSimpleType::True : QCborSimpleType::False);
|
||||
+ writer.append(b ? QCborSimpleType::True_QCb : QCborSimpleType::False_QCb);
|
||||
//! [16]
|
||||
|
||||
//! [17]
|
||||
diff --git a/src/corelib/serialization/qcborcommon.h b/src/corelib/serialization/qcborcommon.h
|
||||
index bec46399..1d80e076 100644
|
||||
--- a/src/corelib/serialization/qcborcommon.h
|
||||
+++ b/src/corelib/serialization/qcborcommon.h
|
||||
@@ -58,8 +58,8 @@
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
enum class QCborSimpleType : quint8 {
|
||||
- False = 20,
|
||||
- True = 21,
|
||||
+ False_QCb = 20,
|
||||
+ True_QCb = 21,
|
||||
Null = 22,
|
||||
Undefined = 23
|
||||
};
|
||||
diff --git a/src/corelib/serialization/qcborstreamreader.h b/src/corelib/serialization/qcborstreamreader.h
|
||||
index 6d5feccf..1fd22b79 100644
|
||||
--- a/src/corelib/serialization/qcborstreamreader.h
|
||||
+++ b/src/corelib/serialization/qcborstreamreader.h
|
||||
@@ -140,8 +140,8 @@ public:
|
||||
bool isInvalid() const { return type() == Invalid; }
|
||||
|
||||
bool isSimpleType(QCborSimpleType st) const { return isSimpleType() && toSimpleType() == st; }
|
||||
- bool isFalse() const { return isSimpleType(QCborSimpleType::False); }
|
||||
- bool isTrue() const { return isSimpleType(QCborSimpleType::True); }
|
||||
+ bool isFalse() const { return isSimpleType(QCborSimpleType::False_QCb); }
|
||||
+ bool isTrue() const { return isSimpleType(QCborSimpleType::True_QCb); }
|
||||
bool isBool() const { return isFalse() || isTrue(); }
|
||||
bool isNull() const { return isSimpleType(QCborSimpleType::Null); }
|
||||
bool isUndefined() const { return isSimpleType(QCborSimpleType::Undefined); }
|
||||
@@ -158,7 +158,7 @@ public:
|
||||
qsizetype currentStringChunkSize() const{ Q_ASSERT(isString() || isByteArray()); return _currentStringChunkSize(); }
|
||||
StringResult<qsizetype> readStringChunk(char *ptr, qsizetype maxlen);
|
||||
|
||||
- bool toBool() const { Q_ASSERT(isBool()); return value64 - int(QCborSimpleType::False); }
|
||||
+ bool toBool() const { Q_ASSERT(isBool()); return value64 - int(QCborSimpleType::False_QCb); }
|
||||
QCborTag toTag() const { Q_ASSERT(isTag()); return QCborTag(value64); }
|
||||
quint64 toUnsignedInteger() const { Q_ASSERT(isUnsignedInteger()); return value64; }
|
||||
QCborNegativeInteger toNegativeInteger() const { Q_ASSERT(isNegativeInteger()); return QCborNegativeInteger(value64 + 1); }
|
||||
diff --git a/src/corelib/serialization/qcborstreamwriter.h b/src/corelib/serialization/qcborstreamwriter.h
|
||||
index f8c94ceb..befea659 100644
|
||||
--- a/src/corelib/serialization/qcborstreamwriter.h
|
||||
+++ b/src/corelib/serialization/qcborstreamwriter.h
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
void appendTextString(const char *utf8, qsizetype len);
|
||||
|
||||
// convenience
|
||||
- void append(bool b) { append(b ? QCborSimpleType::True : QCborSimpleType::False); }
|
||||
+ void append(bool b) { append(b ? QCborSimpleType::True_QCb : QCborSimpleType::False_QCb); }
|
||||
void appendNull() { append(QCborSimpleType::Null); }
|
||||
void appendUndefined() { append(QCborSimpleType::Undefined); }
|
||||
|
||||
diff --git a/src/corelib/serialization/qcborvalue.cpp b/src/corelib/serialization/qcborvalue.cpp
|
||||
index 89a928d3..465b8d20 100644
|
||||
--- a/src/corelib/serialization/qcborvalue.cpp
|
||||
+++ b/src/corelib/serialization/qcborvalue.cpp
|
||||
@@ -3060,9 +3060,9 @@ QDebug operator<<(QDebug dbg, const QCborValue &v)
|
||||
Q_CORE_EXPORT const char *qt_cbor_simpletype_id(QCborSimpleType st)
|
||||
{
|
||||
switch (st) {
|
||||
- case QCborSimpleType::False:
|
||||
+ case QCborSimpleType::False_QCb:
|
||||
return "False";
|
||||
- case QCborSimpleType::True:
|
||||
+ case QCborSimpleType::True_QCb:
|
||||
return "True";
|
||||
case QCborSimpleType::Null:
|
||||
return "Null";
|
||||
diff --git a/src/corelib/serialization/qcborvalue.h b/src/corelib/serialization/qcborvalue.h
|
||||
index aa51e5da..b96d500d 100644
|
||||
--- a/src/corelib/serialization/qcborvalue.h
|
||||
+++ b/src/corelib/serialization/qcborvalue.h
|
||||
@@ -117,8 +117,8 @@ public:
|
||||
|
||||
// range 0x100 - 0x1ff for Simple Types
|
||||
SimpleType = 0x100,
|
||||
- False = SimpleType + int(QCborSimpleType::False),
|
||||
- True = SimpleType + int(QCborSimpleType::True),
|
||||
+ False = SimpleType + int(QCborSimpleType::False_QCb),
|
||||
+ True = SimpleType + int(QCborSimpleType::True_QCb),
|
||||
Null = SimpleType + int(QCborSimpleType::Null),
|
||||
Undefined = SimpleType + int(QCborSimpleType::Undefined),
|
||||
|
||||
diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h
|
||||
index 22bcb69a..4d5bdc1a 100644
|
||||
--- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h
|
||||
+++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h
|
||||
@@ -275,7 +275,7 @@ template<> struct TestValueFactory<QMetaType::QJsonDocument> {
|
||||
};
|
||||
|
||||
template<> struct TestValueFactory<QMetaType::QCborSimpleType> {
|
||||
- static QCborSimpleType *create() { return new QCborSimpleType(QCborSimpleType::True); }
|
||||
+ static QCborSimpleType *create() { return new QCborSimpleType(QCborSimpleType::True_QCb); }
|
||||
};
|
||||
template<> struct TestValueFactory<QMetaType::QCborValue> {
|
||||
static QCborValue *create() { return new QCborValue(123.); }
|
||||
diff --git a/tests/auto/corelib/serialization/qcborstreamreader/tst_qcborstreamreader.cpp b/tests/auto/corelib/serialization/qcborstreamreader/tst_qcborstreamreader.cpp
|
||||
index f969bb90..a4d75422 100644
|
||||
--- a/tests/auto/corelib/serialization/qcborstreamreader/tst_qcborstreamreader.cpp
|
||||
+++ b/tests/auto/corelib/serialization/qcborstreamreader/tst_qcborstreamreader.cpp
|
||||
@@ -454,10 +454,10 @@ static QString parseOne(QCborStreamReader &reader)
|
||||
}
|
||||
case QCborStreamReader::SimpleType:
|
||||
switch (reader.toSimpleType()) {
|
||||
- case QCborSimpleType::False:
|
||||
+ case QCborSimpleType::False_QCb:
|
||||
result = QStringLiteral("false");
|
||||
break;
|
||||
- case QCborSimpleType::True:
|
||||
+ case QCborSimpleType::True_QCb:
|
||||
result = QStringLiteral("true");
|
||||
break;
|
||||
case QCborSimpleType::Null:
|
||||
@@ -577,10 +577,10 @@ bool parseNonRecursive(QString &result, bool &printingStringChunks, QCborStreamR
|
||||
continue; // skip the comma
|
||||
case QCborStreamReader::SimpleType:
|
||||
switch (reader.toSimpleType()) {
|
||||
- case QCborSimpleType::False:
|
||||
+ case QCborSimpleType::False_QCb:
|
||||
result += QStringLiteral("false");
|
||||
break;
|
||||
- case QCborSimpleType::True:
|
||||
+ case QCborSimpleType::True_QCb:
|
||||
result += QStringLiteral("true");
|
||||
break;
|
||||
case QCborSimpleType::Null:
|
||||
diff --git a/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp b/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp
|
||||
index 0a780d3e..cf3f9df3 100644
|
||||
--- a/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp
|
||||
+++ b/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp
|
||||
@@ -240,12 +240,12 @@ void tst_QCborValue::basics_data()
|
||||
add(QCborValue::Null, QCborValue::Null, st(QCborSimpleType::Null));
|
||||
QTest::newRow("nullptr") << QCborValue::Null << QCborValue(nullptr)
|
||||
<< st(QCborSimpleType::Null);
|
||||
- add(QCborValue::False, false, st(QCborSimpleType::False));
|
||||
+ add(QCborValue::False, false, st(QCborSimpleType::False_QCb));
|
||||
QTest::newRow("false") << QCborValue::False << QCborValue(QCborValue::False)
|
||||
- << st(QCborSimpleType::False);
|
||||
- add(QCborValue::True, true, st(QCborSimpleType::True));
|
||||
+ << st(QCborSimpleType::False_QCb);
|
||||
+ add(QCborValue::True, true, st(QCborSimpleType::True_QCb));
|
||||
QTest::newRow("true") << QCborValue::True << QCborValue(QCborValue::True)
|
||||
- << st(QCborSimpleType::True);
|
||||
+ << st(QCborSimpleType::True_QCb);
|
||||
QTest::newRow("simpletype") << QCborValue::Type(QCborValue::SimpleType + 255)
|
||||
<< QCborValue(QCborSimpleType(255))
|
||||
<< st(QCborSimpleType(255));
|
||||
@@ -297,8 +297,8 @@ static void basicTypeCheck(QCborValue::Type type, const QCborValue &v, const QVa
|
||||
QCOMPARE(v.isInvalid(), type == QCborValue::Invalid);
|
||||
QCOMPARE(v.isContainer(), type == QCborValue::Array || type == QCborValue::Map);
|
||||
QCOMPARE(v.isSimpleType(), isSimpleType);
|
||||
- QCOMPARE(v.isSimpleType(QCborSimpleType::False), st == QCborSimpleType::False);
|
||||
- QCOMPARE(v.isSimpleType(QCborSimpleType::True), st == QCborSimpleType::True);
|
||||
+ QCOMPARE(v.isSimpleType(QCborSimpleType::False_QCb), st == QCborSimpleType::False_QCb);
|
||||
+ QCOMPARE(v.isSimpleType(QCborSimpleType::True_QCb), st == QCborSimpleType::True_QCb);
|
||||
QCOMPARE(v.isSimpleType(QCborSimpleType::Null), st == QCborSimpleType::Null);
|
||||
QCOMPARE(v.isSimpleType(QCborSimpleType::Undefined), st == QCborSimpleType::Undefined);
|
||||
QCOMPARE(v.isSimpleType(QCborSimpleType(255)), st == QCborSimpleType(255));
|
||||
@@ -310,8 +310,8 @@ static void basicTypeCheck(QCborValue::Type type, const QCborValue &v, const QVa
|
||||
QCOMPARE(v.toInteger(), qint64(expectedValue.toDouble()));
|
||||
QCOMPARE(v.toDouble(), expectedValue.toDouble());
|
||||
}
|
||||
- QCOMPARE(v.toBool(true), st != QCborSimpleType::False);
|
||||
- QCOMPARE(v.toBool(), st == QCborSimpleType::True);
|
||||
+ QCOMPARE(v.toBool(true), st != QCborSimpleType::False_QCb);
|
||||
+ QCOMPARE(v.toBool(), st == QCborSimpleType::True_QCb);
|
||||
if (st == QCborSimpleType::Undefined)
|
||||
QCOMPARE(v.toSimpleType(QCborSimpleType::Null), QCborSimpleType::Undefined);
|
||||
else if (isSimpleType)
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,84 +0,0 @@
|
||||
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());
|
||||
@ -1,92 +0,0 @@
|
||||
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.
|
||||
argv[0] = 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);
|
||||
- argv[0] = ::strdup(tmp.constData());
|
||||
- }
|
||||
- }
|
||||
- if (!argv[0])
|
||||
+ const QByteArray &tmp = QFile::encodeName(exeFilePath);
|
||||
+ argv[0] = ::strdup(tmp.constData());
|
||||
+ } else {
|
||||
argv[0] = ::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);
|
||||
+ argv[0] = ::strdup(tmp.constData());
|
||||
+ } else {
|
||||
+ argv[0] = ::strdup(QFile::encodeName(program));
|
||||
}
|
||||
- if (tmp.isEmpty())
|
||||
- tmp = QFile::encodeName(program);
|
||||
- argv[0] = tmp.data();
|
||||
|
||||
if (envp)
|
||||
qt_safe_execve(argv[0], 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));
|
||||
@ -1,336 +0,0 @@
|
||||
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 = 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;
|
||||
@@ -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());
|
||||
- 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;
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@ -1,50 +0,0 @@
|
||||
From 1b736a815be0222f4b24289cf17575fc15707305 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= <marten.nordheim@qt.io>
|
||||
Date: Fri, 5 May 2023 11:07:26 +0200
|
||||
Subject: [PATCH] Hsts: match header names case insensitively
|
||||
|
||||
Header field names are always considered to be case-insensitive.
|
||||
|
||||
Pick-to: 6.5 6.5.1 6.2 5.15
|
||||
Fixes: QTBUG-113392
|
||||
Change-Id: Ifb4def4bb7f2ac070416cdc76581a769f1e52b43
|
||||
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
||||
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
||||
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
||||
---
|
||||
src/network/access/qhsts.cpp | 4 ++--
|
||||
tests/auto/network/access/hsts/tst_qhsts.cpp | 6 ++++++
|
||||
2 files changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/network/access/qhsts.cpp b/src/network/access/qhsts.cpp
|
||||
index 39905f354807..82deede17298 100644
|
||||
--- a/src/network/access/qhsts.cpp
|
||||
+++ b/src/network/access/qhsts.cpp
|
||||
@@ -327,8 +327,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/tests/auto/network/access/hsts/tst_qhsts.cpp b/tests/auto/network/access/hsts/tst_qhsts.cpp
|
||||
index 252f5e8f5792..97a2d2889e57 100644
|
||||
--- a/tests/auto/network/access/hsts/tst_qhsts.cpp
|
||||
+++ b/tests/auto/network/access/hsts/tst_qhsts.cpp
|
||||
@@ -216,6 +216,12 @@ void tst_QHsts::testSTSHeaderParser()
|
||||
QVERIFY(parser.expirationDate() > QDateTime::currentDateTimeUtc());
|
||||
QVERIFY(parser.includeSubDomains());
|
||||
|
||||
+ list.pop_back();
|
||||
+ list << Header("strict-transport-security", "includeSubDomains;max-age=1000");
|
||||
+ QVERIFY(parser.parse(list));
|
||||
+ QVERIFY(parser.expirationDate() > QDateTime::currentDateTimeUtc());
|
||||
+ QVERIFY(parser.includeSubDomains());
|
||||
+
|
||||
list.pop_back();
|
||||
// Invalid (includeSubDomains twice):
|
||||
list << Header("Strict-Transport-Security", "max-age = 1000 ; includeSubDomains;includeSubDomains");
|
||||
@ -1,64 +0,0 @@
|
||||
From 9e92024a183e93c63cb96a0a48cca07c20c7a243 Mon Sep 17 00:00:00 2001
|
||||
From: starlet-dx <15929766099@163.com>
|
||||
Date: Wed, 28 Jun 2023 11:47:13 +0800
|
||||
Subject: [PATCH 1/1] Fix CVE-2023-32763
|
||||
|
||||
Origin: https://download.qt.io/official_releases/qt/5.15/CVE-2023-32763-qtbase-5.15.diff
|
||||
|
||||
---
|
||||
src/gui/painting/qfixed_p.h | 9 +++++++++
|
||||
src/gui/text/qtextlayout.cpp | 9 ++++++---
|
||||
2 files changed, 15 insertions(+), 3 deletions(-)
|
||||
|
||||
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 <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<(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 b2f12ef1..897a1bc9 100644
|
||||
--- a/src/gui/text/qtextlayout.cpp
|
||||
+++ b/src/gui/text/qtextlayout.cpp
|
||||
@@ -2138,11 +2138,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) {
|
||||
--
|
||||
2.30.0
|
||||
|
||||
@ -5,24 +5,9 @@ Subject: [PATCH] Fix lupdate command execution error on loongarch64
|
||||
|
||||
Signed-off-by: Jingyun Hua <huajingyun@loongson.cn>
|
||||
---
|
||||
src/3rdparty/forkfd/forkfd_linux.c | 3 ++-
|
||||
src/corelib/global/qprocessordetection.h | 5 +++--
|
||||
2 files changed, 5 insertions(+), 3 deletions(-)
|
||||
1 files changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/3rdparty/forkfd/forkfd_linux.c b/src/3rdparty/forkfd/forkfd_linux.c
|
||||
index ffe0e9a5..b1f5408d 100644
|
||||
--- a/src/3rdparty/forkfd/forkfd_linux.c
|
||||
+++ b/src/3rdparty/forkfd/forkfd_linux.c
|
||||
@@ -82,7 +82,8 @@ static int sys_clone(unsigned long cloneflags, int *ptid)
|
||||
return syscall(__NR_clone, cloneflags, child_stack, stack_size, ptid, newtls, ctid);
|
||||
#elif defined(__arc__) || defined(__arm__) || defined(__aarch64__) || defined(__mips__) || \
|
||||
defined(__nds32__) || defined(__hppa__) || defined(__powerpc__) || defined(__i386__) || \
|
||||
- defined(__x86_64__) || defined(__xtensa__) || defined(__alpha__) || defined(__riscv)
|
||||
+ defined(__x86_64__) || defined(__xtensa__) || defined(__alpha__) || defined(__riscv) || \
|
||||
+ defined(__loongarch__)
|
||||
/* ctid and newtls are inverted on CONFIG_CLONE_BACKWARDS architectures,
|
||||
* but since both values are 0, there's no harm. */
|
||||
return syscall(__NR_clone, cloneflags, child_stack, ptid, ctid, newtls);
|
||||
diff --git a/src/corelib/global/qprocessordetection.h b/src/corelib/global/qprocessordetection.h
|
||||
index ca9d4080..6f0bc7e7 100644
|
||||
--- a/src/corelib/global/qprocessordetection.h
|
||||
|
||||
105025
kde-5.15-rollup-20230613.patch
Normal file
105025
kde-5.15-rollup-20230613.patch
Normal file
File diff suppressed because it is too large
Load Diff
BIN
kde-5.15-rollup-20230613.patch.gz
Normal file
BIN
kde-5.15-rollup-20230613.patch.gz
Normal file
Binary file not shown.
17
qt5-qtbase-5.12.1-firebird-4.0.0.patch
Normal file
17
qt5-qtbase-5.12.1-firebird-4.0.0.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff -up qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/configure.json.firebird qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/configure.json
|
||||
--- qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/configure.json.firebird 2019-01-28 11:11:52.000000000 -0600
|
||||
+++ qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/configure.json 2019-02-03 13:41:27.392305128 -0600
|
||||
@@ -49,10 +49,11 @@
|
||||
"ibase": {
|
||||
"label": "InterBase",
|
||||
"test": {},
|
||||
- "headers": "ibase.h",
|
||||
+ "headers": "ibase.h",
|
||||
"sources": [
|
||||
{ "libs": "-lgds32_ms", "condition": "config.win32" },
|
||||
- { "libs": "-lgds", "condition": "!config.win32" }
|
||||
+ { "libs": "-lgds", "condition": "!config.win32" },
|
||||
+ { "libs": "-lfbclient", "condition": "!config.win32" }
|
||||
]
|
||||
},
|
||||
"mysql": {
|
||||
180
qt5-qtbase.spec
180
qt5-qtbase.spec
@ -2,8 +2,6 @@
|
||||
%global multilib_archs x86_64 %{ix86} %{?mips} ppc64 ppc s390x s390 sparc64 sparcv9
|
||||
%global multilib_basearchs x86_64 %{?mips64} ppc64 s390x sparc64
|
||||
|
||||
%global openssl -openssl-linked
|
||||
|
||||
# support qtchooser (adds qtchooser .conf file)
|
||||
%global qtchooser 1
|
||||
%if 0%{?qtchooser}
|
||||
@ -13,6 +11,9 @@
|
||||
%endif
|
||||
%endif
|
||||
|
||||
# Disable automatic .la file removal
|
||||
%global __brp_remove_la_files %nil
|
||||
|
||||
%global platform linux-g++
|
||||
|
||||
%if 0%{?use_clang}
|
||||
@ -23,9 +24,6 @@
|
||||
|
||||
%global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
|
||||
|
||||
%global journald -journald
|
||||
BuildRequires: make
|
||||
BuildRequires: pkgconfig(libsystemd)
|
||||
|
||||
%global examples 1
|
||||
## skip for now, until we're better at it --rex
|
||||
@ -33,15 +31,14 @@ BuildRequires: pkgconfig(libsystemd)
|
||||
|
||||
Name: qt5-qtbase
|
||||
Summary: Qt5 - QtBase components
|
||||
Version: 5.15.2
|
||||
Release: 8
|
||||
|
||||
Version: 5.15.10
|
||||
Release: 1
|
||||
|
||||
# See LGPL_EXCEPTIONS.txt, for exception details
|
||||
License: LGPLv2 with exceptions or GPLv3 with exceptions
|
||||
License: LGPL-3.0-only OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
Url: http://qt-project.org/
|
||||
%global majmin %(echo %{version} | cut -d. -f1-2)
|
||||
Source0: https://download.qt.io/official_releases/qt/%{majmin}/%{version}/submodules/%{qt_module}-everywhere-src-%{version}.tar.xz
|
||||
Source0: https://download.qt.io/official_releases/qt/%{majmin}/%{version}/submodules/%{qt_module}-everywhere-opensource-src-%{version}.tar.xz
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1227295
|
||||
Source1: qtlogging.ini
|
||||
@ -57,16 +54,21 @@ Source3: 10-qt5-check-opengl2.sh
|
||||
# macros
|
||||
Source4: macros.qt5-qtbase
|
||||
|
||||
# borrowed from opensuse
|
||||
# track private api via properly versioned symbols
|
||||
# downside: binaries produced with these differently-versioned symbols are no longer
|
||||
# compatible with qt-project.org's Qt binary releases.
|
||||
Patch0001: tell-the-truth-about-private-api.patch
|
||||
# support multilib optflags
|
||||
#Patch2: qtbase-multilib_optflags.patch
|
||||
|
||||
# make mixing versions with private apis a warning instead of fatal error
|
||||
Patch0001: qtbase-everywhere-src-5.15.6-private_api_warning.patch
|
||||
|
||||
# upstreamable patches
|
||||
# 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...
|
||||
#Patch51: 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
|
||||
@ -83,6 +85,9 @@ Patch0006: qtbase-qmake_LFLAGS.patch
|
||||
# don't use relocatable heuristics to guess prefix when using -no-feature-relocatable
|
||||
Patch0007: qtbase-everywhere-src-5.14.2-no_relocatable.patch
|
||||
|
||||
# fix FTBFS against libglvnd-1.3.4+
|
||||
Patch0011: qtbase-everywhere-src-5.15.2-libglvnd.patch
|
||||
|
||||
# drop -O3 and make -O2 by default
|
||||
Patch0008: qt5-qtbase-cxxflag.patch
|
||||
|
||||
@ -92,33 +97,35 @@ Patch0009: qt5-qtbase-5.12.1-firebird.patch
|
||||
# fix for new mariadb
|
||||
Patch0010: qtbase-opensource-src-5.9.0-mysql.patch
|
||||
|
||||
# python3
|
||||
Patch0011: qtbase-everywhere-src-5.11.1-python3.patch
|
||||
|
||||
# https://fedoraproject.org/wiki/Changes/Qt_Wayland_By_Default_On_Gnome
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1732129
|
||||
Patch0012: qtbase-use-wayland-on-gnome.patch
|
||||
|
||||
# gcc-11
|
||||
Patch0013: %{name}-gcc11.patch
|
||||
|
||||
# glibc stat
|
||||
|
||||
## upstream patches
|
||||
# see also patch90
|
||||
Patch0014: qtbase-QTBUG-90395.patch
|
||||
Patch0015: qtbase-QTBUG-89977.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
|
||||
# https://invent.kde.org/qt/qt/qtbase, kde/5.15 branch
|
||||
# git diff v5.15.10-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-20230613.patch.gz
|
||||
|
||||
Patch101: qtbase-5.15.10-fix-missing-qtsan-include.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
|
||||
|
||||
|
||||
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
|
||||
Patch0024: Fix-lupdate-command-error-on-loongarch64.patch
|
||||
Patch0025: CVE-2023-32762.patch
|
||||
Patch0026: CVE-2023-32763.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
|
||||
@ -128,8 +135,10 @@ Patch0026: CVE-2023-32763.patch
|
||||
# filter plugin provides
|
||||
%global __provides_exclude_from ^%{_qt5_plugindir}/.*\\.so$
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: cups-devel
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: double-conversion-devel
|
||||
BuildRequires: findutils
|
||||
BuildRequires: libjpeg-devel
|
||||
BuildRequires: libmng-devel
|
||||
@ -142,17 +151,14 @@ BuildRequires: clang >= 3.7.0
|
||||
%else
|
||||
BuildRequires: gcc-c++
|
||||
%endif
|
||||
# http://bugzilla.redhat.com/1196359
|
||||
|
||||
%global dbus -dbus-linked
|
||||
BuildRequires: pkgconfig(dbus-1)
|
||||
|
||||
BuildRequires: pkgconfig(libdrm)
|
||||
BuildRequires: pkgconfig(fontconfig)
|
||||
BuildRequires: pkgconfig(gl)
|
||||
BuildRequires: pkgconfig(glib-2.0)
|
||||
BuildRequires: pkgconfig(gtk+-3.0)
|
||||
BuildRequires: pkgconfig(libproxy-1.0)
|
||||
BuildRequires: pkgconfig(libsctp)
|
||||
# xcb-sm
|
||||
BuildRequires: pkgconfig(ice) pkgconfig(sm)
|
||||
BuildRequires: pkgconfig(libpng)
|
||||
@ -160,6 +166,7 @@ BuildRequires: pkgconfig(libudev)
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: pkgconfig(libpulse) pkgconfig(libpulse-mainloop-glib)
|
||||
BuildRequires: pkgconfig(libinput)
|
||||
BuildRequires: pkgconfig(libsystemd)
|
||||
BuildRequires: pkgconfig(xcb-xkb) >= 1.10
|
||||
BuildRequires: pkgconfig(xcb-util)
|
||||
BuildRequires: pkgconfig(xkbcommon) >= 0.4.1
|
||||
@ -190,6 +197,7 @@ BuildRequires: libicu-devel
|
||||
|
||||
BuildRequires: pkgconfig(xcb) pkgconfig(xcb-glx) pkgconfig(xcb-icccm) pkgconfig(xcb-image) pkgconfig(xcb-keysyms) pkgconfig(xcb-renderutil)
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
BuildRequires: pkgconfig(libzstd)
|
||||
BuildRequires: perl-generators
|
||||
# see patch68
|
||||
BuildRequires: python3
|
||||
@ -236,6 +244,12 @@ Summary: Common files for Qt5
|
||||
# offer upgrade path for qtquick1 somewhere... may as well be here -- rex
|
||||
Obsoletes: qt5-qtquick1 < 5.9.0
|
||||
Obsoletes: qt5-qtquick1-devel < 5.9.0
|
||||
%if "%{?ibase}" == "-no-sql-ibase"
|
||||
Obsoletes: qt5-qtbase-ibase < %{version}-%{release}
|
||||
%endif
|
||||
%if "%{?tds}" == "-no-sql-tds"
|
||||
Obsoletes: qt5-qtbase-tds < %{version}-%{release}
|
||||
%endif
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
%description common
|
||||
@ -348,38 +362,35 @@ Qt5 libraries used for drawing widgets and OpenGL items.
|
||||
%prep
|
||||
%setup -q -n %{qt_module}-everywhere-src-%{version}
|
||||
|
||||
## dowstream patches
|
||||
%patch -P0001 -p1 -b .private_api_warning
|
||||
|
||||
## upstream fixes
|
||||
|
||||
# omit '-b .tell-the-truth-about-private-api' so it doesn't end up in installed files -- rdieter
|
||||
%patch0001 -p1
|
||||
|
||||
%patch0002 -p1 -b .QT_VERSION_CHECK
|
||||
%patch -P0002 -p1 -b .QT_VERSION_CHECK
|
||||
# FIXME/TODO : rebase or drop -- rdieter
|
||||
#patch51 -p1 -b .hidpi_scale_at_192
|
||||
%patch0004 -p1 -b .moc_macros
|
||||
%patch0005 -p1 -b .qt5gui_cmake_isystem_includes
|
||||
%patch0006 -p1 -b .qmake_LFLAGS
|
||||
%patch0007 -p1 -b .no_relocatable
|
||||
%patch0008 -p1 -b .qt5-qtbase-cxxflag
|
||||
%patch0009 -p1 -b .firebird
|
||||
%patch0010 -p1 -b .mysql
|
||||
%patch0011 -p1
|
||||
%patch0012 -p1 -b .use-wayland-on-gnome.patch
|
||||
%patch0013 -p1 -b .gcc11
|
||||
#patch -P51 -p1 -b .hidpi_scale_at_192
|
||||
%patch -P0004 -p1 -b .moc_macros
|
||||
%patch -P0005 -p1 -b .qt5gui_cmake_isystem_includes
|
||||
%patch -P0006 -p1 -b .qmake_LFLAGS
|
||||
%patch -P0007 -p1 -b .no_relocatable
|
||||
%patch -P0008 -p1 -b .qt5-qtbase-cxxflag
|
||||
%patch -P0011 -p1 -b .libglvnd
|
||||
%patch -P0009 -p1 -b .firebird
|
||||
%patch -P0010 -p1 -b .mysql
|
||||
%patch -P0012 -p1 -b .use-wayland-on-gnome.patch
|
||||
%patch -P0013 -p1 -b .gcc11
|
||||
|
||||
## upstream patches
|
||||
%patch0014 -p1 -b .QTBUG-90395
|
||||
%patch0015 -p1 -b .QTBUG-89977
|
||||
%patch0017 -p1 -b .QTBUG-91909
|
||||
%patch0018 -p1
|
||||
%patch0019 -p1
|
||||
%patch0020 -p1
|
||||
%patch0021 -p1
|
||||
%patch0022 -p1
|
||||
%patch0023 -p1
|
||||
%patch0024 -p1
|
||||
%patch0025 -p1
|
||||
%patch0026 -p1
|
||||
### upstream patches
|
||||
%patch -P100 -p1
|
||||
%patch -P101 -p1
|
||||
%patch -P102 -p1
|
||||
%patch -P103 -p1
|
||||
%patch -P104 -p1
|
||||
|
||||
%patch -P0021 -p1
|
||||
%patch -P0022 -p1
|
||||
%patch -P0024 -p1
|
||||
# move some bundled libs to ensure they're not accidentally used
|
||||
pushd src/3rdparty
|
||||
mkdir UNUSED
|
||||
@ -451,16 +462,18 @@ export MAKEFLAGS="%{?_smp_mflags}"
|
||||
-release \
|
||||
-shared \
|
||||
-accessibility \
|
||||
%{?dbus}%{!?dbus:-dbus-runtime} \
|
||||
%{?egl:-egl} \
|
||||
-dbus-linked \
|
||||
%{?egl:-egl -eglfs} \
|
||||
-fontconfig \
|
||||
-glib \
|
||||
-gtk \
|
||||
%{?ibase} \
|
||||
-icu \
|
||||
%{?journald} \
|
||||
-journald \
|
||||
-optimized-qmake \
|
||||
%{?openssl} \
|
||||
-openssl-linked \
|
||||
-libproxy \
|
||||
-sctp \
|
||||
%{!?examples:-nomake examples} \
|
||||
%{!?tests:-nomake tests} \
|
||||
-no-pch \
|
||||
@ -484,6 +497,20 @@ export MAKEFLAGS="%{?_smp_mflags}"
|
||||
QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS:-$RPM_OPT_FLAGS}" \
|
||||
QMAKE_LFLAGS_RELEASE="${LDFLAGS:-$RPM_LD_FLAGS}"
|
||||
|
||||
# Validate config results
|
||||
%if "%{?ibase}" != "-no-sql-ibase"
|
||||
for config_test in egl-x11 ibase ; do
|
||||
%else
|
||||
for config_test in egl-x11 ; do
|
||||
%endif
|
||||
config_result="$(grep ^cache.${config_test}.result config.cache | cut -d= -f2 | tr -d ' ')"
|
||||
if [ "${config_result}" != "true" ]; then
|
||||
echo "${config_test} detection failed"
|
||||
config_failed=1
|
||||
fi
|
||||
done
|
||||
if [ ${config_failed} -eq 1 ]; then exit 1; fi
|
||||
|
||||
# ensure qmake build using optflags (which can happen if not munging qmake.conf defaults)
|
||||
make clean -C qmake
|
||||
%make_build -C qmake all binary \
|
||||
@ -522,7 +549,7 @@ translationdir=%{_qt5_translationdir}
|
||||
|
||||
Name: Qt5
|
||||
Description: Qt5 Configuration
|
||||
Version: 5.15.2
|
||||
Version: 5.15.10
|
||||
EOF
|
||||
|
||||
# rpm macros
|
||||
@ -591,6 +618,10 @@ install -p -m755 -D %{SOURCE3} %{buildroot}%{_sysconfdir}/X11/xinit/xinitrc.d/10
|
||||
mkdir -p %{buildroot}%{_qt5_headerdir}/QtXcb
|
||||
install -m 644 src/plugins/platforms/xcb/*.h %{buildroot}%{_qt5_headerdir}/QtXcb/
|
||||
|
||||
# drop Qt5Bootstrap from -static (#2017661)
|
||||
rm -f %{buildroot}%{_qt5_libdir}/libQt5Bootstrap.*a
|
||||
rm -f %{buildroot}%{_qt5_libdir}/libQt5Bootstrap.prl
|
||||
|
||||
|
||||
%check
|
||||
# verify Qt5.pc
|
||||
@ -855,16 +886,12 @@ fi
|
||||
%{_qt5_libdir}/qt5/bin/tracegen
|
||||
## private-devel globs
|
||||
# keep mkspecs/modules stuff in -devel for now, https://bugzilla.redhat.com/show_bug.cgi?id=1705280
|
||||
%{_qt5_archdatadir}/mkspecs/modules/qt_lib_*_private.pri
|
||||
%exclude %{_qt5_headerdir}/*/%{version}/
|
||||
|
||||
%files private-devel
|
||||
%{_qt5_headerdir}/*/%{version}/
|
||||
#{_qt5_archdatadir}/mkspecs/modules/qt_lib_*_private.pri
|
||||
|
||||
%files static
|
||||
%{_qt5_libdir}/libQt5Bootstrap.*a
|
||||
%{_qt5_libdir}/libQt5Bootstrap.prl
|
||||
%{_qt5_headerdir}/QtOpenGLExtensions/
|
||||
%{_qt5_libdir}/libQt5OpenGLExtensions.*a
|
||||
%{_qt5_libdir}/libQt5OpenGLExtensions.prl
|
||||
@ -988,15 +1015,15 @@ fi
|
||||
%{_qt5_plugindir}/platforms/libqminimalegl.so
|
||||
%dir %{_qt5_plugindir}/egldeviceintegrations/
|
||||
%{_qt5_plugindir}/egldeviceintegrations/libqeglfs-kms-integration.so
|
||||
#%%{_qt5_plugindir}/egldeviceintegrations/libqeglfs-x11-integration.so
|
||||
#%%{_qt5_plugindir}/xcbglintegrations/libqxcb-egl-integration.so
|
||||
%{_qt5_plugindir}/egldeviceintegrations/libqeglfs-x11-integration.so
|
||||
%{_qt5_plugindir}/xcbglintegrations/libqxcb-egl-integration.so
|
||||
%{_qt5_plugindir}/egldeviceintegrations/libqeglfs-kms-egldevice-integration.so
|
||||
%{_qt5_plugindir}/egldeviceintegrations/libqeglfs-emu-integration.so
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QMinimalEglIntegrationPlugin.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QEglFSIntegrationPlugin.cmake
|
||||
#%%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QEglFSX11IntegrationPlugin.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QEglFSX11IntegrationPlugin.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QEglFSKmsGbmIntegrationPlugin.cmake
|
||||
#%%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QXcbEglIntegrationPlugin.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QXcbEglIntegrationPlugin.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QEglFSKmsEglDeviceIntegrationPlugin.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QEglFSEmulatorIntegrationPlugin.cmake
|
||||
%endif
|
||||
@ -1021,6 +1048,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Aug 08 2023 douyan <douyan@kylinos.cn> - 5.15.10-1
|
||||
- 5.15.10
|
||||
|
||||
* Wed Jun 28 2023 yaoxin <yao_xin001@hoperun.com> - 5.15.2-8
|
||||
- Fix CVE-2023-32762 and CVE-2023-32763
|
||||
|
||||
|
||||
34
qtbase-5.15.10-fix-missing-qtsan-include.patch
Normal file
34
qtbase-5.15.10-fix-missing-qtsan-include.patch
Normal file
File diff suppressed because one or more lines are too long
56
qtbase-QTBUG-103393.patch
Normal file
56
qtbase-QTBUG-103393.patch
Normal file
@ -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 @@
|
||||
<arg name="w" direction="in" type="i"/>
|
||||
<arg name="h" direction="in" type="i"/>
|
||||
</method>
|
||||
+ <method name='SetCursorLocationRelative'>
|
||||
+ <arg name="x" direction="in" type="i"/>
|
||||
+ <arg name="y" direction="in" type="i"/>
|
||||
+ <arg name="w" direction="in" type="i"/>
|
||||
+ <arg name="h" direction="in" type="i"/>
|
||||
+ </method>
|
||||
<method name="FocusIn"/>
|
||||
<method name="FocusOut"/>
|
||||
<method name="Reset"/>
|
||||
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)
|
||||
12
qtbase-QTBUG-111994.patch
Normal file
12
qtbase-QTBUG-111994.patch
Normal file
@ -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);
|
||||
108
qtbase-QTBUG-112136.patch
Normal file
108
qtbase-QTBUG-112136.patch
Normal file
@ -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<const TT_OS2 *>(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;
|
||||
@ -1,11 +0,0 @@
|
||||
diff -up qtbase-everywhere-src-5.15.2/src/corelib/text/qbytearray.h.foo qtbase-everywhere-src-5.15.2/src/corelib/text/qbytearray.h
|
||||
--- qtbase-everywhere-src-5.15.2/src/corelib/text/qbytearray.h.foo 2020-10-27 03:02:11.000000000 -0500
|
||||
+++ qtbase-everywhere-src-5.15.2/src/corelib/text/qbytearray.h 2021-02-06 17:05:04.879201352 -0600
|
||||
@@ -51,6 +49,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <iterator>
|
||||
+#include <limits>
|
||||
|
||||
#ifdef truncate
|
||||
#error qbytearray.h must be included before any header file that defines truncate
|
||||
@ -1,23 +0,0 @@
|
||||
diff -up qtbase-everywhere-src-5.15.2/src/corelib/global/qendian.h.QTBUG-90395 qtbase-everywhere-src-5.15.2/src/corelib/global/qendian.h
|
||||
--- qtbase-everywhere-src-5.15.2/src/corelib/global/qendian.h.QTBUG-90395 2020-10-27 03:02:11.000000000 -0500
|
||||
+++ qtbase-everywhere-src-5.15.2/src/corelib/global/qendian.h 2021-02-06 16:36:27.072105717 -0600
|
||||
@@ -44,6 +44,8 @@
|
||||
#include <QtCore/qfloat16.h>
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
+#include <limits>
|
||||
+
|
||||
// include stdlib.h and hope that it defines __GLIBC__ for glibc-based systems
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
diff -up qtbase-everywhere-src-5.15.2/src/corelib/global/qfloat16.h.QTBUG-90395 qtbase-everywhere-src-5.15.2/src/corelib/global/qfloat16.h
|
||||
--- qtbase-everywhere-src-5.15.2/src/corelib/global/qfloat16.h.QTBUG-90395 2021-02-06 16:36:27.074105730 -0600
|
||||
+++ qtbase-everywhere-src-5.15.2/src/corelib/global/qfloat16.h 2021-02-06 16:37:19.212440114 -0600
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtCore/qmetatype.h>
|
||||
+#include <limits>
|
||||
#include <string.h>
|
||||
|
||||
#if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__AVX2__) && !defined(__F16C__)
|
||||
@ -1,31 +0,0 @@
|
||||
From 659f7a06e91c04b239e3f4c0bcfccbe3581af1c3 Mon Sep 17 00:00:00 2001
|
||||
From: Sona Kurazyan <sona.kurazyan@qt.io>
|
||||
Date: Wed, 17 Mar 2021 16:04:00 +0100
|
||||
Subject: [PATCH] Remove the unnecessary template parameter from the class specialization
|
||||
|
||||
This seems to cause errors when compiling with gcc-11. Although this is
|
||||
most likely a compiler bug, specifiying the template parameter type in
|
||||
this case isn't necessary.
|
||||
|
||||
Fixes: QTBUG-91909
|
||||
Fixes: QTBUG-90568
|
||||
Pick-to: 6.0 6.1 5.15
|
||||
Change-Id: Ib231257ccb2e16cc533f23ca5840d31e26a66d53
|
||||
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
||||
---
|
||||
|
||||
diff --git a/src/concurrent/qtconcurrentthreadengine.h b/src/concurrent/qtconcurrentthreadengine.h
|
||||
index cbd8ad04..4cd5b85 100644
|
||||
--- a/src/concurrent/qtconcurrentthreadengine.h
|
||||
+++ b/src/concurrent/qtconcurrentthreadengine.h
|
||||
@@ -256,8 +256,8 @@
|
||||
class ThreadEngineStarter<void> : public ThreadEngineStarterBase<void>
|
||||
{
|
||||
public:
|
||||
- ThreadEngineStarter<void>(ThreadEngine<void> *_threadEngine)
|
||||
- :ThreadEngineStarterBase<void>(_threadEngine) {}
|
||||
+ ThreadEngineStarter(ThreadEngine<void> *_threadEngine)
|
||||
+ : ThreadEngineStarterBase<void>(_threadEngine) {}
|
||||
|
||||
void startBlocking()
|
||||
{
|
||||
Binary file not shown.
@ -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
|
||||
|
||||
#############################################################################
|
||||
##
|
||||
15
qtbase-everywhere-src-5.15.2-libglvnd.patch
Normal file
15
qtbase-everywhere-src-5.15.2-libglvnd.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff -up qtbase-everywhere-src-5.15.2/src/gui/configure.json.libglvnd qtbase-everywhere-src-5.15.2/src/gui/configure.json
|
||||
--- qtbase-everywhere-src-5.15.2/src/gui/configure.json.libglvnd 2020-10-27 03:02:11.000000000 -0500
|
||||
+++ qtbase-everywhere-src-5.15.2/src/gui/configure.json 2021-09-10 10:05:53.610312223 -0500
|
||||
@@ -847,9 +847,9 @@
|
||||
],
|
||||
"include": [ "EGL/egl.h", "X11/Xlib.h" ],
|
||||
"main": [
|
||||
- "Display *dpy = EGL_DEFAULT_DISPLAY;",
|
||||
+ "Display *dpy = reinterpret_cast<Display *>(EGL_DEFAULT_DISPLAY);",
|
||||
"EGLNativeDisplayType egldpy = XOpenDisplay(\"\");",
|
||||
- "dpy = egldpy;",
|
||||
+ "dpy = reinterpret_cast<Display *>(egldpy);",
|
||||
"EGLNativeWindowType w = XCreateWindow(dpy, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);",
|
||||
"XDestroyWindow(dpy, w);",
|
||||
"XCloseDisplay(dpy);"
|
||||
12
qtbase-everywhere-src-5.15.6-private_api_warning.patch
Normal file
12
qtbase-everywhere-src-5.15.6-private_api_warning.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up qtbase-everywhere-src-5.15.6/src/corelib/kernel/qobject_p.h.private_api_warning qtbase-everywhere-src-5.15.6/src/corelib/kernel/qobject_p.h
|
||||
--- qtbase-everywhere-src-5.15.6/src/corelib/kernel/qobject_p.h.private_api_warning 2022-10-11 09:08:33.712070523 -0500
|
||||
+++ qtbase-everywhere-src-5.15.6/src/corelib/kernel/qobject_p.h 2022-10-11 09:10:58.647038619 -0500
|
||||
@@ -435,7 +435,7 @@ inline void QObjectPrivate::checkForInco
|
||||
Q_UNUSED(version);
|
||||
#else
|
||||
if (Q_UNLIKELY(version != QObjectPrivateVersion)) {
|
||||
- qFatal("Cannot mix incompatible Qt library (%d.%d.%d) with this library (%d.%d.%d)",
|
||||
+ qWarning("Cannot mix incompatible Qt library (%d.%d.%d) with this library (%d.%d.%d)",
|
||||
(version >> 16) & 0xff, (version >> 8) & 0xff, version & 0xff,
|
||||
(QObjectPrivateVersion >> 16) & 0xff, (QObjectPrivateVersion >> 8) & 0xff, QObjectPrivateVersion & 0xff);
|
||||
}
|
||||
12
qtbase-hidpi_scale_at_192.patch
Normal file
12
qtbase-hidpi_scale_at_192.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up qtbase-everywhere-src-5.12.1/src/plugins/platforms/xcb/qxcbscreen.cpp.hidpi_scale_at_192 qtbase-everywhere-src-5.12.1/src/plugins/platforms/xcb/qxcbscreen.cpp
|
||||
--- qtbase-everywhere-src-5.12.1/src/plugins/platforms/xcb/qxcbscreen.cpp.hidpi_scale_at_192 2019-02-03 13:21:27.866906481 -0600
|
||||
+++ qtbase-everywhere-src-5.12.1/src/plugins/platforms/xcb/qxcbscreen.cpp 2019-02-03 13:23:47.554767565 -0600
|
||||
@@ -744,7 +744,7 @@ void QXcbScreen::updateGeometry(const QR
|
||||
// Use 128 as a reference DPI on small screens. This favors "small UI" over "large UI".
|
||||
qreal referenceDpi = physicalSize().width() <= 320 ? 128 : 96;
|
||||
|
||||
- m_pixelDensity = qMax(1, qRound(dpi/referenceDpi));
|
||||
+ m_pixelDensity = qMax(1, (int) (dpi/referenceDpi)); //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);
|
||||
33
qtbase-multilib_optflags.patch
Normal file
33
qtbase-multilib_optflags.patch
Normal file
@ -0,0 +1,33 @@
|
||||
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)
|
||||
@ -1,16 +0,0 @@
|
||||
diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
|
||||
index e6a0d97..cf93041 100644
|
||||
--- a/mkspecs/features/qt_module.prf
|
||||
+++ b/mkspecs/features/qt_module.prf
|
||||
@@ -216,9 +216,9 @@ android: CONFIG += qt_android_deps no_linker_version_script
|
||||
QMAKE_LFLAGS += $${QMAKE_LFLAGS_VERSION_SCRIPT}$$verscript
|
||||
|
||||
internal_module {
|
||||
- verscript_content = "Qt_$${QT_MAJOR_VERSION}_PRIVATE_API { *; };"
|
||||
+ verscript_content = "Qt_$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}_PRIVATE_API { *; };"
|
||||
} else {
|
||||
- verscript_content = "Qt_$${QT_MAJOR_VERSION}_PRIVATE_API {" \
|
||||
+ verscript_content = "Qt_$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}_PRIVATE_API {" \
|
||||
" qt_private_api_tag*;"
|
||||
|
||||
private_api_headers = $$SYNCQT.PRIVATE_HEADER_FILES $$SYNCQT.QPA_HEADER_FILES
|
||||
Loading…
x
Reference in New Issue
Block a user