Accepting request 1228181 from KDE:Qt6
Qt 6.8.1 (forwarded request 1227981 from krop) OBS-URL: https://build.opensuse.org/request/show/1228181 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/qt6-base?expand=0&rev=64
This commit is contained in:
commit
a1234b4b70
@ -1,83 +0,0 @@
|
||||
From 9785bc77eb4967c4a791eef1745c0c4f2b0db95a Mon Sep 17 00:00:00 2001
|
||||
From: Mitch Curtis <mitch.curtis@qt.io>
|
||||
Date: Tue, 24 Sep 2024 10:40:37 +0800
|
||||
Subject: [PATCH] QAbstractItemModelPrivate: add resetting member
|
||||
|
||||
This allows QQmlDelegateModel to know if a QAbstractItemModel subclass
|
||||
is in the process of a reset, which it can't know if beginResetModel
|
||||
was called in the model's constructor.
|
||||
|
||||
As an added bonus, it also allows us to warn the user if they call
|
||||
endResetModel with a previous call to beginResetModel.
|
||||
|
||||
Task-number: QTBUG-125053
|
||||
Task-number: QTBUG-127340
|
||||
Pick-to: 6.5
|
||||
Change-Id: I7d1fb983e9bf868c48472624ad945ae158115943
|
||||
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
||||
(cherry picked from commit 9d8663c18e88cb0b5a65f86cfd7726f3d31e04d6)
|
||||
(cherry picked from commit 2ea3abed0125d81ca4f3bacb9650db7314657332)
|
||||
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
||||
---
|
||||
src/corelib/itemmodels/qabstractitemmodel.cpp | 13 +++++++++++++
|
||||
src/corelib/itemmodels/qabstractitemmodel_p.h | 4 ++++
|
||||
2 files changed, 17 insertions(+)
|
||||
|
||||
diff --git a/src/corelib/itemmodels/qabstractitemmodel.cpp b/src/corelib/itemmodels/qabstractitemmodel.cpp
|
||||
index 5b9b215..3d4d566 100644
|
||||
--- a/src/corelib/itemmodels/qabstractitemmodel.cpp
|
||||
+++ b/src/corelib/itemmodels/qabstractitemmodel.cpp
|
||||
@@ -3400,6 +3400,13 @@ void QAbstractItemModel::endMoveColumns()
|
||||
*/
|
||||
void QAbstractItemModel::beginResetModel()
|
||||
{
|
||||
+ Q_D(QAbstractItemModel);
|
||||
+ if (d->resetting) {
|
||||
+ qWarning() << "beginResetModel called on" << this << "without calling endResetModel first";
|
||||
+ // Warn, but don't return early in case user code relies on the incorrect behavior.
|
||||
+ }
|
||||
+
|
||||
+ d->resetting = true;
|
||||
emit modelAboutToBeReset(QPrivateSignal());
|
||||
}
|
||||
|
||||
@@ -3417,8 +3424,14 @@ void QAbstractItemModel::beginResetModel()
|
||||
void QAbstractItemModel::endResetModel()
|
||||
{
|
||||
Q_D(QAbstractItemModel);
|
||||
+ if (!d->resetting) {
|
||||
+ qWarning() << "endResetModel called on" << this << "without calling beginResetModel first";
|
||||
+ // Warn, but don't return early in case user code relies on the incorrect behavior.
|
||||
+ }
|
||||
+
|
||||
d->invalidatePersistentIndexes();
|
||||
resetInternalData();
|
||||
+ d->resetting = false;
|
||||
emit modelReset(QPrivateSignal());
|
||||
}
|
||||
|
||||
diff --git a/src/corelib/itemmodels/qabstractitemmodel_p.h b/src/corelib/itemmodels/qabstractitemmodel_p.h
|
||||
index e34dc32..c2113fd 100644
|
||||
--- a/src/corelib/itemmodels/qabstractitemmodel_p.h
|
||||
+++ b/src/corelib/itemmodels/qabstractitemmodel_p.h
|
||||
@@ -45,6 +45,8 @@ public:
|
||||
QAbstractItemModelPrivate();
|
||||
~QAbstractItemModelPrivate();
|
||||
|
||||
+ static const QAbstractItemModelPrivate *get(const QAbstractItemModel *model) { return model->d_func(); }
|
||||
+
|
||||
void removePersistentIndexData(QPersistentModelIndexData *data);
|
||||
void movePersistentIndexes(const QList<QPersistentModelIndexData *> &indexes, int change, const QModelIndex &parent,
|
||||
Qt::Orientation orientation);
|
||||
@@ -115,6 +117,8 @@ public:
|
||||
void insertMultiAtEnd(const QModelIndex& key, QPersistentModelIndexData *data);
|
||||
} persistent;
|
||||
|
||||
+ bool resetting = false;
|
||||
+
|
||||
static const QHash<int,QByteArray> &defaultRoleNames();
|
||||
static bool isVariantLessThan(const QVariant &left, const QVariant &right,
|
||||
Qt::CaseSensitivity cs = Qt::CaseSensitive, bool isLocaleAware = false);
|
||||
--
|
||||
2.46.1
|
||||
|
@ -1,73 +0,0 @@
|
||||
From 55a8050d1e762befeeb5ba557f458b0092cbb44b Mon Sep 17 00:00:00 2001
|
||||
From: Ahmad Samir <a.samirh78@gmail.com>
|
||||
Date: Wed, 16 Oct 2024 19:26:25 +0300
|
||||
Subject: [PATCH] QDirIterator: don't crash with next() after hasNext()
|
||||
returned false
|
||||
|
||||
The typical use-case is calling hasNext() first before using next, but
|
||||
the API docs say that calling next() even when hasNext() is false,
|
||||
should just return an empty string.
|
||||
|
||||
[ChangeLog][QtCore][QDirIterator] Fixed a crash that happened if you
|
||||
called next() after hasNext() had already returned false. Ideally you
|
||||
should never call next() without first calling hasNext() as that could
|
||||
lead to unexpected results (for example, infinite loops).
|
||||
|
||||
Fixes: QTBUG-130142
|
||||
Change-Id: If0a8b1fe7dbd13b45793409a7a241e53c7257f24
|
||||
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
||||
(cherry picked from commit c7691842f743f568a073582c8f0cacd6ee188f98)
|
||||
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
||||
---
|
||||
src/corelib/io/qdiriterator.cpp | 5 +++++
|
||||
.../auto/corelib/io/qdiriterator/tst_qdiriterator.cpp | 11 +++++++++++
|
||||
2 files changed, 16 insertions(+)
|
||||
|
||||
diff --git a/src/corelib/io/qdiriterator.cpp b/src/corelib/io/qdiriterator.cpp
|
||||
index faea8088cb..7d7fe15684 100644
|
||||
--- a/src/corelib/io/qdiriterator.cpp
|
||||
+++ b/src/corelib/io/qdiriterator.cpp
|
||||
@@ -103,6 +103,11 @@ public:
|
||||
|
||||
void advance()
|
||||
{
|
||||
+ // Match the behavior of advance() from before porting to QDirListing,
|
||||
+ // that is, even if hasNext() returns false, calling next() returns an
|
||||
+ // empty string without crashing. QTBUG-130142
|
||||
+ if (it == lister.end())
|
||||
+ return;
|
||||
currentFileInfo = nextFileInfo;
|
||||
if (++it != lister.end()) {
|
||||
nextFileInfo = it->fileInfo();
|
||||
diff --git a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
|
||||
index a0a8917c27..b739f0eb11 100644
|
||||
--- a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
|
||||
+++ b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
|
||||
@@ -86,6 +86,8 @@ private slots:
|
||||
void hiddenDirs_hiddenFiles();
|
||||
#endif
|
||||
|
||||
+ void hasNextFalseNoCrash();
|
||||
+
|
||||
private:
|
||||
QSharedPointer<QTemporaryDir> m_dataDir;
|
||||
};
|
||||
@@ -642,6 +644,15 @@ void tst_QDirIterator::hiddenDirs_hiddenFiles()
|
||||
}
|
||||
#endif // Q_OS_WIN
|
||||
|
||||
+void tst_QDirIterator::hasNextFalseNoCrash()
|
||||
+{
|
||||
+ QDirIterator iter(u"empty"_s, QDir::NoDotAndDotDot);
|
||||
+ // QTBUG-130142
|
||||
+ // No crash if you call next() after hasNext() returned false
|
||||
+ QVERIFY(!iter.hasNext());
|
||||
+ QVERIFY(iter.next().isEmpty());
|
||||
+}
|
||||
+
|
||||
QTEST_MAIN(tst_QDirIterator)
|
||||
|
||||
#include "tst_qdiriterator.moc"
|
||||
--
|
||||
2.47.0
|
||||
|
@ -1,114 +0,0 @@
|
||||
From 3e8037af63821123eb392f42d717d10f741fb384 Mon Sep 17 00:00:00 2001
|
||||
From: Thiago Macieira <thiago.macieira@intel.com>
|
||||
Date: Sat, 19 Oct 2024 21:28:48 -0700
|
||||
Subject: [PATCH] QUuid: restore sorting order of Qt < 6.8
|
||||
|
||||
This brings back and adapted version of the sorting code that was
|
||||
removed by commit 15f753ca5a60b5273d243f528978e25c28a9b56d. The issue,
|
||||
as shown in the test, is that we store data1, data2, and data3 as
|
||||
native-endian integers, so the bitcasts in the new code cause them to
|
||||
become mangled in little-endian platforms.
|
||||
|
||||
Since this is a weird behavior and we'll be changing the sorting order
|
||||
in Qt 7 anyway, I've left a warning for us to think about it at the
|
||||
time.
|
||||
|
||||
[ChangeLog][QtCore][QUuid] Fixed a regression that caused QUuid sorting
|
||||
order to change for some UUIDs, compared to Qt 6.7 and earlier versions.
|
||||
|
||||
Fixes: QTBUG-130155
|
||||
Pick-to: 6.8
|
||||
Change-Id: I5eeb7b36bfc5ed7218e1fffd6a773c582ad0f6f4
|
||||
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
|
||||
---
|
||||
src/corelib/plugin/quuid.cpp | 3 +++
|
||||
src/corelib/plugin/quuid.h | 12 +++++++++---
|
||||
tests/auto/corelib/plugin/quuid/tst_quuid.cpp | 9 +++++++++
|
||||
3 files changed, 21 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/corelib/plugin/quuid.cpp b/src/corelib/plugin/quuid.cpp
|
||||
index af7c07d..5cbae60 100644
|
||||
--- a/src/corelib/plugin/quuid.cpp
|
||||
+++ b/src/corelib/plugin/quuid.cpp
|
||||
@@ -33,6 +33,9 @@ void _q_toHex(char *&dst, Integral value)
|
||||
}
|
||||
}
|
||||
|
||||
+#if QT_VERSION_MAJOR == 7
|
||||
+# warning Consider storing the UUID as simple bytes, not as {uint, ushort, short, array}
|
||||
+#endif
|
||||
template <class Integral>
|
||||
bool _q_fromHex(const char *&src, Integral &value)
|
||||
{
|
||||
diff --git a/src/corelib/plugin/quuid.h b/src/corelib/plugin/quuid.h
|
||||
index 435b7bb..0597445 100644
|
||||
--- a/src/corelib/plugin/quuid.h
|
||||
+++ b/src/corelib/plugin/quuid.h
|
||||
@@ -132,7 +132,14 @@ private:
|
||||
static constexpr Qt::strong_ordering
|
||||
compareThreeWay_helper(const QUuid &lhs, const QUuid &rhs) noexcept
|
||||
{
|
||||
-#if defined(__cpp_lib_bit_cast) && defined(QT_SUPPORTS_INT128)
|
||||
+#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) && !defined(QT_BOOTSTRAPPED)
|
||||
+ if (const auto c = Qt::compareThreeWay(lhs.data1, rhs.data1); !is_eq(c))
|
||||
+ return c;
|
||||
+ if (const auto c = Qt::compareThreeWay(lhs.data2, rhs.data2); !is_eq(c))
|
||||
+ return c;
|
||||
+ if (const auto c = Qt::compareThreeWay(lhs.data3, rhs.data3); !is_eq(c))
|
||||
+ return c;
|
||||
+#elif defined(__cpp_lib_bit_cast) && defined(QT_SUPPORTS_INT128)
|
||||
quint128 lu = qFromBigEndian(std::bit_cast<quint128>(lhs));
|
||||
quint128 ru = qFromBigEndian(std::bit_cast<quint128>(rhs));
|
||||
return Qt::compareThreeWay(lu, ru);
|
||||
@@ -144,13 +151,12 @@ private:
|
||||
};
|
||||
if (const auto c = Qt::compareThreeWay(make_int(lhs), make_int(rhs)); !is_eq(c))
|
||||
return c;
|
||||
-
|
||||
+#endif
|
||||
for (unsigned i = 0; i < sizeof(lhs.data4); ++i) {
|
||||
if (const auto c = Qt::compareThreeWay(lhs.data4[i], rhs.data4[i]); !is_eq(c))
|
||||
return c;
|
||||
}
|
||||
return Qt::strong_ordering::equal;
|
||||
-#endif
|
||||
}
|
||||
friend constexpr Qt::strong_ordering compareThreeWay(const QUuid &lhs, const QUuid &rhs) noexcept
|
||||
{
|
||||
diff --git a/tests/auto/corelib/plugin/quuid/tst_quuid.cpp b/tests/auto/corelib/plugin/quuid/tst_quuid.cpp
|
||||
index 8b75817..f1b96e6 100644
|
||||
--- a/tests/auto/corelib/plugin/quuid/tst_quuid.cpp
|
||||
+++ b/tests/auto/corelib/plugin/quuid/tst_quuid.cpp
|
||||
@@ -465,6 +465,7 @@ void tst_QUuid::ordering_data()
|
||||
#define AFTER_NCS(x) ROW(minNCS, x, less)
|
||||
AFTER_NCS(ncs000_0000_0010);
|
||||
AFTER_NCS(ncs000_0000_0100);
|
||||
+ ROW(ncs000_0000_0010, ncs000_0000_0100, less);
|
||||
AFTER_NCS(ncs000_0000_1000);
|
||||
AFTER_NCS(ncs000_0001_0000);
|
||||
AFTER_NCS(ncs000_0010_0000);
|
||||
@@ -492,6 +493,13 @@ void tst_QUuid::ordering_data()
|
||||
AFTER_R(ones);
|
||||
#undef AFTER_R
|
||||
#undef ROW
|
||||
+
|
||||
+ // due to the way we store data1,2,3 in memory, the ordering will flip
|
||||
+ QTest::newRow("qt7-integer-portions")
|
||||
+ << QUuid{0x01000002, 0x0000, 0x0000, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
+ << QUuid{0x02000001, 0x0000, 0x0000, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
+ << (QSysInfo::ByteOrder == QSysInfo::BigEndian || QT_VERSION_MAJOR < 7 ?
|
||||
+ Qt::strong_ordering::less : Qt::strong_ordering::greater);
|
||||
}
|
||||
|
||||
void tst_QUuid::ordering()
|
||||
@@ -500,6 +508,7 @@ void tst_QUuid::ordering()
|
||||
QFETCH(const QUuid, rhs);
|
||||
QFETCH(const Qt::strong_ordering, expected);
|
||||
|
||||
+ QCOMPARE(qCompareThreeWay(lhs, rhs), expected);
|
||||
QT_TEST_ALL_COMPARISON_OPS(lhs, rhs, expected);
|
||||
}
|
||||
|
||||
--
|
||||
2.47.0
|
||||
|
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 2 13:01:57 UTC 2024 - Christophe Marin <christophe@krop.fr>
|
||||
|
||||
- Update to 6.8.1:
|
||||
* https://www.qt.io/blog/qt-6.8.1-released
|
||||
- Drop patches, merged upstream:
|
||||
* 0001-QAbstractItemModelPrivate-add-resetting-member.patch
|
||||
* 0001-QUuid-restore-sorting-order-of-Qt-6.8.patch
|
||||
* 0001-QDirIterator-don-t-crash-with-next-after-hasNext-ret.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 22 06:59:37 UTC 2024 - Christophe Marin <christophe@krop.fr>
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
#
|
||||
|
||||
|
||||
%define real_version 6.8.0
|
||||
%define real_version 6.8.1
|
||||
%define short_version 6.8
|
||||
%define tar_name qtbase-everywhere-src
|
||||
%define tar_suffix %{nil}
|
||||
@ -33,7 +33,7 @@
|
||||
%bcond_without system_md4c
|
||||
%endif
|
||||
Name: qt6-base%{?pkg_suffix}
|
||||
Version: 6.8.0
|
||||
Version: 6.8.1
|
||||
Release: 0
|
||||
Summary: Qt 6 core components (Core, Gui, Widgets, Network...)
|
||||
# Legal: qtpaths is BSD-3-Clause
|
||||
@ -42,9 +42,6 @@ URL: https://www.qt.io
|
||||
Source0: https://download.qt.io/official_releases/qt/%{short_version}/%{real_version}%{tar_suffix}/submodules/%{tar_name}-%{real_version}%{tar_suffix}.tar.xz
|
||||
Source99: qt6-base-rpmlintrc
|
||||
# Patches 0-100 are upstream patches #
|
||||
Patch0: 0001-QAbstractItemModelPrivate-add-resetting-member.patch
|
||||
Patch1: 0001-QUuid-restore-sorting-order-of-Qt-6.8.patch
|
||||
Patch2: 0001-QDirIterator-don-t-crash-with-next-after-hasNext-ret.patch
|
||||
# Patches 100-200 are openSUSE and/or non-upstream(able) patches #
|
||||
# No need to pollute the library dir with object files, install them in the qt6 subfolder
|
||||
Patch100: 0001-CMake-Install-objects-files-into-ARCHDATADIR.patch
|
||||
@ -743,6 +740,9 @@ installed on your system.
|
||||
cp src/3rdparty/freetype/LICENSE.txt src/gui/painting/FREETYPE_LICENSE.txt
|
||||
sed -i 's#../../3rdparty/freetype/LICENSE.txt#FREETYPE_LICENSE.txt#' src/gui/painting/qt_attribution.json
|
||||
|
||||
# Same thing for blake2
|
||||
sed -i '/\/3rdparty\/blake2/d' src/corelib/CMakeLists.txt
|
||||
|
||||
# We don't want to use these 3rdparty libraries
|
||||
rm -r src/3rdparty/{blake2,double-conversion,freetype,harfbuzz-ng,libjpeg,libpng,pcre2,sqlite,xcb,zlib}
|
||||
%if %{with system_md4c}
|
||||
@ -784,11 +784,15 @@ sed -i '/zstd CONFIG/d' cmake/FindWrapZSTD.cmake
|
||||
-DQT_BUILD_TESTS:BOOL=FALSE \
|
||||
-DQT_CREATE_VERSIONED_HARD_LINK:BOOL=FALSE \
|
||||
-DQT_DISABLE_RPATH:BOOL=FALSE \
|
||||
-DQT_GENERATE_SBOM:BOOL=FALSE \
|
||||
-DQT_SBOM_GENERATE_JSON:BOOL=FALSE \
|
||||
-DQT_SBOM_VERIFY:BOOL=FALSE \
|
||||
%ifnarch ppc64
|
||||
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL=TRUE \
|
||||
%endif
|
||||
-DFEATURE_elf_private_full_version=TRUE \
|
||||
-DFEATURE_enable_new_dtags:BOOL=TRUE \
|
||||
-DFEATURE_forkfd_pidfd:BOOL=FALSE \
|
||||
-DFEATURE_journald:BOOL=TRUE \
|
||||
-DFEATURE_libproxy:BOOL=TRUE \
|
||||
-DFEATURE_reduce_relocations:BOOL=FALSE \
|
||||
@ -797,7 +801,6 @@ sed -i '/zstd CONFIG/d' cmake/FindWrapZSTD.cmake
|
||||
-DFEATURE_system_xcb_xinput:BOOL=TRUE \
|
||||
-DFEATURE_xcb_native_painting:BOOL=TRUE \
|
||||
-DINPUT_openssl:STRING=linked \
|
||||
-DFEATURE_forkfd_pidfd:BOOL=FALSE \
|
||||
%if 0%{?with_gles}
|
||||
-DINPUT_opengl:STRING=es2 \
|
||||
-DFEATURE_opengles3:BOOL=TRUE
|
||||
@ -829,6 +832,7 @@ rm %{buildroot}%{_qt6_mkspecsdir}/modules/qt_lib_openglwidgets_private.pri
|
||||
|
||||
# These files are only useful for the Qt continuous integration
|
||||
rm %{buildroot}%{_qt6_libexecdir}/ensure_pro_file.cmake
|
||||
rm %{buildroot}%{_qt6_libexecdir}/qt-android-runner.py
|
||||
rm %{buildroot}%{_qt6_libexecdir}/qt-testrunner.py
|
||||
rm %{buildroot}%{_qt6_libexecdir}/sanitizer-testrunner.py
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1bad481710aa27f872de6c9f72651f89a6107f0077003d0ebfcc9fd15cba3c75
|
||||
size 49819628
|
BIN
qtbase-everywhere-src-6.8.1.tar.xz
(Stored with Git LFS)
Normal file
BIN
qtbase-everywhere-src-6.8.1.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user