[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/, dev-qt/qtcore/
commit: ba6d4805d1bede357a464619528aabe7debd6a98 Author: Andreas Sturmlechner gentoo org> AuthorDate: Sun Feb 19 13:23:02 2023 + Commit: Andreas Sturmlechner gentoo org> CommitDate: Sun Feb 19 13:23:02 2023 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba6d4805 dev-qt/qtcore: drop 5.15.8-r1 Signed-off-by: Andreas Sturmlechner gentoo.org> dev-qt/qtcore/Manifest | 1 - .../files/qtcore-5.15.8-fix-crash-w-debug.patch| 41 --- dev-qt/qtcore/qtcore-5.15.8-r1.ebuild | 122 - 3 files changed, 164 deletions(-) diff --git a/dev-qt/qtcore/Manifest b/dev-qt/qtcore/Manifest index 1ba76bb0dd29..db6cd834f163 100644 --- a/dev-qt/qtcore/Manifest +++ b/dev-qt/qtcore/Manifest @@ -1,4 +1,3 @@ DIST qtbase-5.15-gentoo-patchset-3.tar.xz 3856 BLAKE2B 0752426f9bc2dfa1ab2bc246b29f5d00305df05175a7801d7d5eddacfa46fcb605d9a317547edc01d3ef339f6effc2fcee7549cb7aecced37f0098166c70dbe2 SHA512 2515bea53232e76ca3e40bdaf1dd52fdf452052a2f40002ee91360d1fcceea3c5c2f5a8d2a3bfc0f9c2bacd61460a632c5b351accd73fd37b64985593219148e -DIST qtbase-5.15.8-gentoo-kde-3.tar.xz 782344 BLAKE2B 115814a4d90ac286540cf6e50bd2b57baa8e0e327fc73c3ab06fe43ecd95e1e3739faecee5db112d95d17e4fb84494ad5557e70251f2c60142166715294bf366 SHA512 d50b0f02476ded9f053093ec15c5204a0ec664794dcc324996685f09400a2cbc76dc3fd0ebfc247ebd42fbe203b7d4c904e975fc985bf7928e43c6cd65f04f34 DIST qtbase-5.15.8-gentoo-kde-5.tar.xz 793372 BLAKE2B f486a0275fdf4da28a88ba40b7e6f227267fa05e8f466f734f720e792de1796501d5f1fb4427a84ca2d709bfa07abd695ad59210f7fd11227b1bf465484736b8 SHA512 f51d7ee2d121acda1141b9816197afc57ac0176a12acc08a93c2a793694afb734f8f1ad280a5bf95170cf912e32edb4a6612befeb4198fec78a7e50bbb6a61cd DIST qtbase-everywhere-opensource-src-5.15.8.tar.xz 50259432 BLAKE2B cb1b790a384a5cad9a95fdc448e275d48a68c6ee2addf08b40f9963cc5762fd7ab15852dea8392dc76da39f1565c1e23ddb5875c280f0177e802082f4b4f7f2b SHA512 29e8877bafdbc908072209f1b27a5040b022e2b71f17f4ab4cecd570adeae21597f9af7f1d38758760f3cb30376eeb15c5f066bf02c6e9a9e3a4d07f967046ce diff --git a/dev-qt/qtcore/files/qtcore-5.15.8-fix-crash-w-debug.patch b/dev-qt/qtcore/files/qtcore-5.15.8-fix-crash-w-debug.patch deleted file mode 100644 index 74f5ed5c4886.. --- a/dev-qt/qtcore/files/qtcore-5.15.8-fix-crash-w-debug.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 0c0b34badb8a56f5c0d7d43c3847508774c8e553 Mon Sep 17 00:00:00 2001 -From: Harald Sitter -Date: Mon, 2 Jan 2023 12:38:02 +0100 -Subject: [PATCH] correctly set up ref counting in - QThreadPool::tryStart(std::function) - -this function was inconsistent with the QThreadPool::tryStart(QRunnable) -overload, where ref counting does get set up correctly. the lack of ref -counting setup would later cause trouble because we assert the ref -counting state all over QThreadPool. to prevent failed assertions we -correctly set up ref counting now. - -this change is not applicable to Qt6 because the ref counting has -already been removed there: -https://github.com/qt/qtbase/commit/ecfda98d1f91c6a7da0d89826558d856cd88e670 - -BUG: 449688 - src/corelib/thread/qthreadpool.cpp | 4 - 1 file changed, 4 insertions(+) - -diff --git a/src/corelib/thread/qthreadpool.cpp b/src/corelib/thread/qthreadpool.cpp -index 40cc646519..8aa06a4c8f 100644 a/src/corelib/thread/qthreadpool.cpp -+++ b/src/corelib/thread/qthreadpool.cpp -@@ -602,8 +602,12 @@ bool QThreadPool::tryStart(std::function functionToRun) - return false; - - QRunnable *runnable = QRunnable::create(std::move(functionToRun)); -+Q_ASSERT(runnable->ref == 0); -+++runnable->ref; - if (d->tryStart(runnable)) - return true; -+--runnable->ref; -+Q_ASSERT(runnable->ref == 0); - delete runnable; - return false; - } --- -GitLab - diff --git a/dev-qt/qtcore/qtcore-5.15.8-r1.ebuild b/dev-qt/qtcore/qtcore-5.15.8-r1.ebuild deleted file mode 100644 index 75b9d56cafc0.. --- a/dev-qt/qtcore/qtcore-5.15.8-r1.ebuild +++ /dev/null @@ -1,122 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -if [[ ${PV} != ** ]]; then - QT5_KDEPATCHSET_REV=3 - KEYWORDS="amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv ~sparc x86" -fi - -QT5_MODULE="qtbase" -inherit linux-info flag-o-matic qt5-build - -DESCRIPTION="Cross-platform application development framework" -SLOT=5/${QT5_PV} - -IUSE="icu old-kernel systemd" - -DEPEND=" - dev-libs/double-conversion:= - dev-libs/glib:2 - dev-libs/libpcre2[pcre16,unicode] - sys-libs/zlib:= - icu? ( dev-libs/icu:= ) - !icu? ( virtual/libiconv ) - systemd? ( sys-apps/systemd:= ) -" -RDEPEND="${DEPEND}" - -QT5_TARGET_SUBDIRS=( - src/tools/bootstrap - src/tools/moc - src/tools/rcc - src/corelib - src/tools/qlalr - doc -) - -QT5_GENTOO_PRIVATE_CONFIG=( - !:network -
[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/
commit: 957b23ec2630a603c6c00905f21529b9c4bc4653 Author: Andreas Sturmlechner gentoo org> AuthorDate: Sun Feb 5 22:37:17 2023 + Commit: Andreas Sturmlechner gentoo org> CommitDate: Sun Feb 5 22:37:17 2023 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=957b23ec dev-qt/qtcore: Re-add accidentally removed patch Closes: https://bugs.gentoo.org/893322 Signed-off-by: Andreas Sturmlechner gentoo.org> .../files/qtcore-5.15.8-fix-crash-w-debug.patch| 41 ++ 1 file changed, 41 insertions(+) diff --git a/dev-qt/qtcore/files/qtcore-5.15.8-fix-crash-w-debug.patch b/dev-qt/qtcore/files/qtcore-5.15.8-fix-crash-w-debug.patch new file mode 100644 index ..74f5ed5c4886 --- /dev/null +++ b/dev-qt/qtcore/files/qtcore-5.15.8-fix-crash-w-debug.patch @@ -0,0 +1,41 @@ +From 0c0b34badb8a56f5c0d7d43c3847508774c8e553 Mon Sep 17 00:00:00 2001 +From: Harald Sitter +Date: Mon, 2 Jan 2023 12:38:02 +0100 +Subject: [PATCH] correctly set up ref counting in + QThreadPool::tryStart(std::function) + +this function was inconsistent with the QThreadPool::tryStart(QRunnable) +overload, where ref counting does get set up correctly. the lack of ref +counting setup would later cause trouble because we assert the ref +counting state all over QThreadPool. to prevent failed assertions we +correctly set up ref counting now. + +this change is not applicable to Qt6 because the ref counting has +already been removed there: +https://github.com/qt/qtbase/commit/ecfda98d1f91c6a7da0d89826558d856cd88e670 + +BUG: 449688 +--- + src/corelib/thread/qthreadpool.cpp | 4 + 1 file changed, 4 insertions(+) + +diff --git a/src/corelib/thread/qthreadpool.cpp b/src/corelib/thread/qthreadpool.cpp +index 40cc646519..8aa06a4c8f 100644 +--- a/src/corelib/thread/qthreadpool.cpp b/src/corelib/thread/qthreadpool.cpp +@@ -602,8 +602,12 @@ bool QThreadPool::tryStart(std::function functionToRun) + return false; + + QRunnable *runnable = QRunnable::create(std::move(functionToRun)); ++Q_ASSERT(runnable->ref == 0); ++++runnable->ref; + if (d->tryStart(runnable)) + return true; ++--runnable->ref; ++Q_ASSERT(runnable->ref == 0); + delete runnable; + return false; + } +-- +GitLab +
[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/, dev-qt/qtcore/
commit: 55d36e6c00a983651970661cd37205defd8536ce Author: Andreas Sturmlechner gentoo org> AuthorDate: Sun Feb 5 11:36:00 2023 + Commit: Andreas Sturmlechner gentoo org> CommitDate: Sun Feb 5 13:54:18 2023 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55d36e6c dev-qt/qtcore: drop 5.15.8-r2 Signed-off-by: Andreas Sturmlechner gentoo.org> .../files/qtcore-5.15.8-fix-crash-w-debug.patch| 41 --- dev-qt/qtcore/qtcore-5.15.8-r2.ebuild | 125 - 2 files changed, 166 deletions(-) diff --git a/dev-qt/qtcore/files/qtcore-5.15.8-fix-crash-w-debug.patch b/dev-qt/qtcore/files/qtcore-5.15.8-fix-crash-w-debug.patch deleted file mode 100644 index 74f5ed5c4886.. --- a/dev-qt/qtcore/files/qtcore-5.15.8-fix-crash-w-debug.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 0c0b34badb8a56f5c0d7d43c3847508774c8e553 Mon Sep 17 00:00:00 2001 -From: Harald Sitter -Date: Mon, 2 Jan 2023 12:38:02 +0100 -Subject: [PATCH] correctly set up ref counting in - QThreadPool::tryStart(std::function) - -this function was inconsistent with the QThreadPool::tryStart(QRunnable) -overload, where ref counting does get set up correctly. the lack of ref -counting setup would later cause trouble because we assert the ref -counting state all over QThreadPool. to prevent failed assertions we -correctly set up ref counting now. - -this change is not applicable to Qt6 because the ref counting has -already been removed there: -https://github.com/qt/qtbase/commit/ecfda98d1f91c6a7da0d89826558d856cd88e670 - -BUG: 449688 - src/corelib/thread/qthreadpool.cpp | 4 - 1 file changed, 4 insertions(+) - -diff --git a/src/corelib/thread/qthreadpool.cpp b/src/corelib/thread/qthreadpool.cpp -index 40cc646519..8aa06a4c8f 100644 a/src/corelib/thread/qthreadpool.cpp -+++ b/src/corelib/thread/qthreadpool.cpp -@@ -602,8 +602,12 @@ bool QThreadPool::tryStart(std::function functionToRun) - return false; - - QRunnable *runnable = QRunnable::create(std::move(functionToRun)); -+Q_ASSERT(runnable->ref == 0); -+++runnable->ref; - if (d->tryStart(runnable)) - return true; -+--runnable->ref; -+Q_ASSERT(runnable->ref == 0); - delete runnable; - return false; - } --- -GitLab - diff --git a/dev-qt/qtcore/qtcore-5.15.8-r2.ebuild b/dev-qt/qtcore/qtcore-5.15.8-r2.ebuild deleted file mode 100644 index 5817a2b70616.. --- a/dev-qt/qtcore/qtcore-5.15.8-r2.ebuild +++ /dev/null @@ -1,125 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -if [[ ${PV} != ** ]]; then - QT5_KDEPATCHSET_REV=3 - KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" -fi - -QT5_MODULE="qtbase" -inherit linux-info flag-o-matic toolchain-funcs qt5-build - -DESCRIPTION="Cross-platform application development framework" -SLOT=5/${QT5_PV} - -IUSE="icu old-kernel systemd" - -DEPEND=" - dev-libs/double-conversion:= - dev-libs/glib:2 - dev-libs/libpcre2[pcre16,unicode] - sys-libs/zlib:= - icu? ( dev-libs/icu:= ) - !icu? ( virtual/libiconv ) - systemd? ( sys-apps/systemd:= ) -" -RDEPEND="${DEPEND}" - -QT5_TARGET_SUBDIRS=( - src/tools/bootstrap - src/tools/moc - src/tools/rcc - src/corelib - src/tools/qlalr - doc -) - -QT5_GENTOO_PRIVATE_CONFIG=( - !:network - !:sql - !:testlib - !:xml -) - -PATCHES=( "${FILESDIR}/${P}-fix-crash-w-debug.patch" ) # bug 889160, pending upstream - -pkg_pretend() { - use kernel_linux || return - get_running_version - if kernel_is -lt 4 11 && ! use old-kernel; then - ewarn "The running kernel is older than 4.11. USE=old-kernel is needed for" - ewarn "dev-qt/qtcore to function on this kernel properly. Bugs #669994, #672856" - fi -} - -src_prepare() { - # don't add -O3 to CXXFLAGS, bug 549140 - sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/corelib/corelib.pro || die - - # fix missing qt_version_tag symbol w/ LTO, bug 674382 - sed -i -e 's/^gcc:ltcg/gcc/' src/corelib/global/global.pri || die - - # Broken with FORTIFY_SOURCE=3 - # Our toolchain sets F_S=2 by default w/ >= -O2, so we need - # to unset F_S first, then explicitly set 2, to negate any default - # and anything set by the user if they're choosing 3 (or if they've - # modified GCC to set 3). - # - # Refs: - # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105078 - # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105709 - # https://bugreports.qt.io/browse/QTBUG-103782 - # bug #847145 - if is-flagq '-O[23]' || is-flagq '-Ofast' ; then - # We can't unconditionally do this b/c we fortify needs - # some level of optimisation. - filter-flags -D_FORTIFY_SOURCE=3 -
[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/
commit: a28e37a50372eb61fc0e9f1d3a65f3a7914a969c Author: Andreas Sturmlechner gentoo org> AuthorDate: Sat Dec 10 12:15:08 2022 + Commit: Andreas Sturmlechner gentoo org> CommitDate: Sat Dec 10 12:23:51 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a28e37a5 dev-qt/qtcore: Drop obsolete patches Signed-off-by: Andreas Sturmlechner gentoo.org> .../qtcore/files/qtcore-5.15.5-QTBUG-105286.patch | 165 - .../qtcore-5.15.5-hack_never_use_execinfo.patch| 27 dev-qt/qtcore/files/qtcore-5.15.5-slibtool.patch | 29 3 files changed, 221 deletions(-) diff --git a/dev-qt/qtcore/files/qtcore-5.15.5-QTBUG-105286.patch b/dev-qt/qtcore/files/qtcore-5.15.5-QTBUG-105286.patch deleted file mode 100644 index 985dd283dbd4.. --- a/dev-qt/qtcore/files/qtcore-5.15.5-QTBUG-105286.patch +++ /dev/null @@ -1,165 +0,0 @@ -From 7f9253defd2e90f900d963c6d248a2a0bdaca1a8 Mon Sep 17 00:00:00 2001 -From: Volker Hilsheimer -Date: Tue, 16 Aug 2022 15:32:58 +0200 -Subject: [PATCH] Don't access QObjectPrivate::declarativeData unguarded -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The QObjectPrivate::declarativeData member is stored in a union with -currentChildBeingDeleted. The QObject destructor always sets the -currentChildBeingDeleted member of the union. It also sets the -isDeletingChildren bool, which is the only way to find out which union -member we can safely access. - -While the QObject destructor is deleting children and isDeletingChildren -is set, we must not access the declarativeData member of the union. - -Add a test case that initializes the function pointers for the -declarative handlers and constructs a situation where an object -emits a signal while it is destroying children. - -Fixes: QTBUG-105286 -Pick-to: 6.4 6.3 6.3.2 6.2 5.15 -Change-Id: Iea5ba2f7843b6926a8d157be166e6044d98d6c02 -Reviewed-by: Qt CI Bot -Reviewed-by: Mårten Nordheim -(cherry picked from commit 3be99799a675a631c67e05897383af9abbc377b3) - src/corelib/kernel/qobject.cpp| 4 +- - src/corelib/kernel/qobject_p.h| 2 +- - .../corelib/kernel/qobject/tst_qobject.cpp| 77 +++ - 3 files changed, 80 insertions(+), 3 deletions(-) - -diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp -index 0124f88abd..1f3843669b 100644 a/src/corelib/kernel/qobject.cpp -+++ b/src/corelib/kernel/qobject.cpp -@@ -992,7 +992,7 @@ QObject::~QObject() - emit destroyed(this); - } - --if (d->declarativeData) { -+if (!d->isDeletingChildren && d->declarativeData) { - if (static_cast(d->declarativeData)->ownedByQml1) { - if (QAbstractDeclarativeData::destroyed_qml1) - QAbstractDeclarativeData::destroyed_qml1(d->declarativeData, this); -@@ -2583,7 +2583,7 @@ int QObject::receivers(const char *signal) const - if (!d->isSignalConnected(signal_index)) - return receivers; - --if (d->declarativeData && QAbstractDeclarativeData::receivers) { -+if (!d->isDeletingChildren && d->declarativeData && QAbstractDeclarativeData::receivers) { - receivers += QAbstractDeclarativeData::receivers(d->declarativeData, this, - signal_index); - } -diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h -index 66c19d174e..46dcb93521 100644 a/src/corelib/kernel/qobject_p.h -+++ b/src/corelib/kernel/qobject_p.h -@@ -428,7 +428,7 @@ inline void QObjectPrivate::checkForIncompatibleLibraryVersion(int version) cons - - inline bool QObjectPrivate::isDeclarativeSignalConnected(uint signal_index) const - { --return declarativeData && QAbstractDeclarativeData::isSignalConnected -+return !isDeletingChildren && declarativeData && QAbstractDeclarativeData::isSignalConnected - && QAbstractDeclarativeData::isSignalConnected(declarativeData, q_func(), signal_index); - } - -diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp -index 9bd66c0835..ed4a0bae5d 100644 a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp -+++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp -@@ -158,6 +158,7 @@ private slots: - void nullReceiver(); - void functorReferencesConnection(); - void disconnectDisconnects(); -+void declarativeData(); - }; - - struct QObjectCreatedOnShutdown -@@ -7679,5 +7680,81 @@ void tst_QObject::disconnectDisconnects() - Q_STATIC_ASSERT(QtPrivate::HasQ_OBJECT_Macro::Value); - Q_STATIC_ASSERT(!QtPrivate::HasQ_OBJECT_Macro::Value); - -+#ifdef QT_BUILD_INTERNAL -+/* -+Since QObjectPrivate stores the declarativeData pointer in a union with the pointer -+to the currently destroyed child, calls to the QtDeclarative handlers need to be -+correctly guarded. QTBUG-105286
[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/, dev-qt/qtcore/
commit: cb10b0356e62b2521c0d4592a35b5dfb6e5cd2ca Author: Sam James gentoo org> AuthorDate: Sun Jun 26 08:22:31 2022 + Commit: Sam James gentoo org> CommitDate: Sun Jun 26 08:25:13 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb10b035 dev-qt/qtcore: backport FORTIFY_SOURCE=3 patch GCC 12 is now in ~arch and we're likely to get more people trying out F_S=3 as a result. This patch is now in Qt5PatchCollection and given the previous workaround ended up being insufficient (it's not enough to force F_S=2 in qtcore, as reverse deps end up being broken if _they_ are built with F_S=3, even though the cause is in qtcore), let's backport the fix now. Bug: https://bugs.gentoo.org/847145 Closes: https://bugs.gentoo.org/852974 Signed-off-by: Sam James gentoo.org> .../files/qtcore-5.15.5-fortify-source-3.patch | 61 dev-qt/qtcore/qtcore-5.15.5-r1.ebuild | 102 + 2 files changed, 163 insertions(+) diff --git a/dev-qt/qtcore/files/qtcore-5.15.5-fortify-source-3.patch b/dev-qt/qtcore/files/qtcore-5.15.5-fortify-source-3.patch new file mode 100644 index ..1be46b496cf9 --- /dev/null +++ b/dev-qt/qtcore/files/qtcore-5.15.5-fortify-source-3.patch @@ -0,0 +1,61 @@ +https://invent.kde.org/qt/qt/qtbase/-/commit/6d3d164bec17876f5b24ae9102767ef1236aa37b + +From 6d3d164bec17876f5b24ae9102767ef1236aa37b Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Mon, 20 Jun 2022 20:35:12 +0100 +Subject: [PATCH] QArrayData: fix UB via reinterpret_cast (crash with + FORTIFY_SOURCE=3) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +FORTIFY_SOURCE=3 is a new level of FORTIFY_SOURCE available with GCC 12+. + +With Qt 5.15, it ends up triggering UB in the pointer arithmetic +in QArrayData which breaks various FOSS applications using qtcore. + +Qt upstream fixed this independently for 6.x (in at least +eab6eb64d2fab21c4791738323ca7d670a907de1) but did so at the same time as +various internal changes and hence is not appropriate for cherry-picking to 5.15.x. + +I reported the issue to Qt (QTBUG-103782) and they've created a fix for 5.15 which +is not yet public but based on the description in the bug, should be functionally +the same as this. They have not backported the intrusive internal changes +from 6.x. + +Originally grabbed from https://build.opensuse.org/package/view_file/KDE:Qt:5.15/libqt5-qtbase/mitigate-FORTIFY_SOURCE-3.patch. + +Bug: https://bugs.gentoo.org/847145 +Bug: https://bugs.gentoo.org/852974 +Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104964 +Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105709 +Task-number: QTBUG-103782 +Thanks-to: Martin Liška +--- a/src/corelib/tools/qarraydata.h b/src/corelib/tools/qarraydata.h +@@ -42,6 +42,7 @@ + + #include + #include ++#include + + QT_BEGIN_NAMESPACE + +@@ -58,14 +59,14 @@ struct Q_CORE_EXPORT QArrayData + { + Q_ASSERT(size == 0 + || offset < 0 || size_t(offset) >= sizeof(QArrayData)); +-return reinterpret_cast(this) + offset; ++return reinterpret_cast (reinterpret_cast(this) + offset); + } + + const void *data() const + { + Q_ASSERT(size == 0 + || offset < 0 || size_t(offset) >= sizeof(QArrayData)); +-return reinterpret_cast(this) + offset; ++return reinterpret_cast (reinterpret_cast(this) + offset); + } + + // This refers to array data mutability, not "header data" represented by +GitLab diff --git a/dev-qt/qtcore/qtcore-5.15.5-r1.ebuild b/dev-qt/qtcore/qtcore-5.15.5-r1.ebuild new file mode 100644 index ..c2235698ecbf --- /dev/null +++ b/dev-qt/qtcore/qtcore-5.15.5-r1.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +QT5_KDEPATCHSET_REV=1 +QT5_MODULE="qtbase" +inherit linux-info qt5-build + +DESCRIPTION="Cross-platform application development framework" +SLOT=5/${QT5_PV} + +if [[ ${QT5_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" +fi + +IUSE="icu old-kernel systemd" + +DEPEND=" + dev-libs/double-conversion:= + dev-libs/glib:2 + dev-libs/libpcre2[pcre16,unicode] + sys-libs/zlib:= + icu? ( dev-libs/icu:= ) + !icu? ( virtual/libiconv ) + systemd? ( sys-apps/systemd:= ) +" +RDEPEND="${DEPEND}" + +QT5_TARGET_SUBDIRS=( + src/tools/bootstrap + src/tools/moc + src/tools/rcc + src/corelib + src/tools/qlalr + doc +) + +QT5_GENTOO_PRIVATE_CONFIG=( + !:network + !:sql + !:testlib + !:xml +) + +PATCHES=( + "${FILESDIR}"/${P}-fortify-source-3.patch +) + +pkg_pretend() { + use kernel_linux || return + get_running_version + if kernel_is -lt 4 11 && ! use old-kernel; then + ewarn "The running
[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/
commit: 376ebf984ca9cf36f04b9812ce42f549f2d34a89 Author: Michael Mair-Keimberger levelnine at> AuthorDate: Mon Apr 18 07:00:11 2022 + Commit: Sam James gentoo org> CommitDate: Mon Apr 18 07:15:43 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=376ebf98 dev-qt/qtcore: remove unused patches Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Michael Mair-Keimberger levelnine.at> Signed-off-by: Sam James gentoo.org> ...qtcore-5.14.1-cmake-macro-backward-compat.patch | 50 dev-qt/qtcore/files/qtcore-5.15.1-timezone-1.patch | 271 - dev-qt/qtcore/files/qtcore-5.15.1-timezone-2.patch | 47 3 files changed, 368 deletions(-) diff --git a/dev-qt/qtcore/files/qtcore-5.14.1-cmake-macro-backward-compat.patch b/dev-qt/qtcore/files/qtcore-5.14.1-cmake-macro-backward-compat.patch deleted file mode 100644 index 30b5abc39759.. --- a/dev-qt/qtcore/files/qtcore-5.14.1-cmake-macro-backward-compat.patch +++ /dev/null @@ -1,50 +0,0 @@ -From: Andreas Sturmlechner -Date: Sun, 9 Feb 2020 11:45:00 +0100 -Subject: [PATCH] qtcore: Fix cmake macro compat. for upgrade from https://code.qt.io/cgit/qt/qtbase.git/commit/?h=5.14=63d9cd17 - -_populate_$${CMAKE_MODULE_NAME}_plugin_properties in 5.14.0 gained an additional argument -IsDebugAndRelease without providing backward compatibility. This macro is used (at least) for -QtGui and QtDesigner plugins added by qtimageformats, qtsvg, qtvirtualkeyboard and qtwayland. -During upgrade from =Qt-5.14, as a consequence of slot upgrade rebuilds, some -reverse dependencies are slated for rebuild before these Qt consumers have been rebuilt and their -cmake files regenerated, leading to cmake errors like: - -https://bugs.gentoo.org/703306 -https://bugs.gentoo.org/705198 - -From mkspecs/features/create_cmake.prf: - -# CMAKE_DEBUG_AND_RELEASE is used to tell the _populate_$${CMAKE_MODULE_NAME}_target_properties -# functions whether a Configuration specific generator expression needs to be added to the values -# of INTERFACE_LINK_LIBRARIES and INTERFACE_LINK_OPTIONS. For debug_and_release builds, we do need -# configuration specific values. For singular builds (only release or only debug), we want the -# values to be applied regardless of the configuration. -# This would allow on Linux and macOS (and with a recent enough version of CMake on Windows) to -# build a Debug configuration of an application, even if Qt was built in a Release configuration. - -qt5-build.eclass is configuring either as 'release' or as 'debug', so we make IsDebugAndRelease -optional and default to FALSE. - a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2020-01-23 13:37:32.0 +0100 -+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2020-02-09 15:15:21.156219814 +0100 -@@ -538,8 +538,14 @@ - - file(GLOB pluginTargets \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*Plugin.cmake\") - --macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION -- IsDebugAndRelease) -+macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION) -+set(IsDebugAndRelease FALSE) -+set (list_var ${ARGN}) -+list(LENGTH list_var num_extra_arg) -+if (${num_extra_arg} GREATER 0) -+list(GET list_var 0 IsDebugAndRelease) -+endif() -+ - set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) - - !!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE) diff --git a/dev-qt/qtcore/files/qtcore-5.15.1-timezone-1.patch b/dev-qt/qtcore/files/qtcore-5.15.1-timezone-1.patch deleted file mode 100644 index 1c8f1e89e7d5.. --- a/dev-qt/qtcore/files/qtcore-5.15.1-timezone-1.patch +++ /dev/null @@ -1,271 +0,0 @@ -From c337f6fae51b987ce7dbed1fd9bea41e6073efbb Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= -Date: Sat, 10 Oct 2020 19:26:13 +0200 -Subject: [PATCH 1/2] Revert "Cache system zone ID when fetched from the - file-system" - -This reverts commit c70ce3d042025c858faffe661f85d2482a2a0d8c. - src/corelib/time/qtimezoneprivate_tz.cpp | 205 +++ - 1 file changed, 64 insertions(+), 141 deletions(-) - -diff --git a/src/corelib/time/qtimezoneprivate_tz.cpp b/src/corelib/time/qtimezoneprivate_tz.cpp -index c5c70b7364..01f9a6cce0 100644 a/src/corelib/time/qtimezoneprivate_tz.cpp -+++ b/src/corelib/time/qtimezoneprivate_tz.cpp -@@ -1,6 +1,5 @@ - / - ** --** Copyright (C) 2020 The Qt Company Ltd. - ** Copyright (C) 2019 Crimson AS - ** Copyright (C) 2013 John Layt - ** Contact: https://www.qt.io/licensing/ -@@ -43,19 +42,18 @@ - #include "qtimezoneprivate_p.h" - #include "private/qlocale_tools_p.h" - --#include --#include - #include --#include - #include -+#include -+#include -+#include
[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/, dev-qt/qtcore/
commit: 3884552b6dd1bdeea1ca82bd23b6736c519ebe90 Author: Han Gao gmail com> AuthorDate: Sun Mar 27 13:05:18 2022 + Commit: Andreas Sturmlechner gentoo org> CommitDate: Wed Mar 30 18:56:21 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3884552b dev-qt/qtcore: use link option -pthread instead of -lpthread Bug: https://bugs.gentoo.org/803470 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Han Gao gmail.com> Closes: https://github.com/gentoo/gentoo/pull/24711 Signed-off-by: Andreas Sturmlechner gentoo.org> dev-qt/qtcore/files/qtcore-5.15.3-pthread.patch | 41 + dev-qt/qtcore/qtcore-5.15.3.ebuild | 4 +++ 2 files changed, 45 insertions(+) diff --git a/dev-qt/qtcore/files/qtcore-5.15.3-pthread.patch b/dev-qt/qtcore/files/qtcore-5.15.3-pthread.patch new file mode 100644 index ..c83c59ac3113 --- /dev/null +++ b/dev-qt/qtcore/files/qtcore-5.15.3-pthread.patch @@ -0,0 +1,41 @@ +# Use link option -pthread instead of -lpthread + +# https://github.com/riscv-collab/riscv-gcc/issues/12 use Option 4 +# https://stackoverflow.com/questions/23250863/difference-between-pthread-and-lpthread-while-compiling +# In riscv, "-pthread" equivalent to add link option "--push-state --as-needed -latomic --pop-state" + +diff --git a/mkspecs/common/linux.conf b/mkspecs/common/linux.conf +index 544cc227..add969be 100644 +--- a/mkspecs/common/linux.conf b/mkspecs/common/linux.conf +@@ -33,7 +33,7 @@ QMAKE_LIBS_EGL = -lEGL + QMAKE_LIBS_OPENGL = -lGL + QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 + QMAKE_LIBS_OPENVG = -lOpenVG +-QMAKE_LIBS_THREAD = -lpthread ++QMAKE_LIBS_THREAD = -pthread + QMAKE_LIBS_VULKAN = + + QMAKE_INCDIR_WAYLAND= +diff --git a/src/corelib/configure.json b/src/corelib/configure.json +index 9b5d19d4..da028fb2 100644 +--- a/src/corelib/configure.json b/src/corelib/configure.json +@@ -355,7 +355,7 @@ + "std::future f = std::async([]() { return 42; });", + "(void)f.get();" + ], +-"qmake": "unix:LIBS += -lpthread" ++"qmake": "unix:LIBS += -pthread" + } + }, + "cxx11_random": { +@@ -466,7 +466,7 @@ + "shm_open(\"test\", O_RDWR | O_CREAT | O_EXCL, 0666);", + "shm_unlink(\"test\");" + ], +-"qmake": "linux: LIBS += -lpthread -lrt" ++"qmake": "linux: LIBS += -pthread -lrt" + } + }, + "linkat": { diff --git a/dev-qt/qtcore/qtcore-5.15.3.ebuild b/dev-qt/qtcore/qtcore-5.15.3.ebuild index 156e4f73b725..8e924cdfabd0 100644 --- a/dev-qt/qtcore/qtcore-5.15.3.ebuild +++ b/dev-qt/qtcore/qtcore-5.15.3.ebuild @@ -43,6 +43,10 @@ QT5_GENTOO_PRIVATE_CONFIG=( !:xml ) +PATCHES=( + "${FILESDIR}"/${PN}-5.15.3-pthread.patch # bug 803470 +) + pkg_pretend() { use kernel_linux || return get_running_version
[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/, dev-qt/qtcore/
commit: d0008990d9c734c1e5bfbb52a33babf382efc2ab Author: Andreas Sturmlechner gentoo org> AuthorDate: Wed Aug 25 12:54:55 2021 + Commit: Andreas Sturmlechner gentoo org> CommitDate: Wed Aug 25 14:35:48 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0008990 dev-qt/qtcore: Revert "QString::lastIndexOf: fix off-by-one ..." "... for zero length matches" See also: https://bugreports.qt.io/browse/QTBUG-94215 https://invent.kde.org/qt/qt/qtbase/-/merge_requests/46 Package-Manager: Portage-3.0.22, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner gentoo.org> .../files/qtcore-5.15.2-revert-3a273ac4.patch | 56 ++ dev-qt/qtcore/qtcore-5.15.2-r10.ebuild | 3 ++ 2 files changed, 59 insertions(+) diff --git a/dev-qt/qtcore/files/qtcore-5.15.2-revert-3a273ac4.patch b/dev-qt/qtcore/files/qtcore-5.15.2-revert-3a273ac4.patch new file mode 100644 index 000..a29e1b5256d --- /dev/null +++ b/dev-qt/qtcore/files/qtcore-5.15.2-revert-3a273ac4.patch @@ -0,0 +1,56 @@ +From d9a85af5f24d0608c79b2d87b01213833bee01e5 Mon Sep 17 00:00:00 2001 +From: David Faure +Date: Thu, 19 Aug 2021 15:07:13 +0200 +Subject: [PATCH] Revert "QString::lastIndexOf: fix off-by-one for zero length + matches" + +This reverts commit 3a273ac47f20e82a1f2f63411b210025ca0f4495. + +See QTBUG-94215 + +6cee204d56205e250b0675c9c6d4dd8a2367f3c4 for qtbase/dev changes the +behaviour even further, I'm pretty sure we don't want that in Qt 5.15.x, +see discussion in https://codereview.qt-project.org/c/qt/qtbase/+/365179. + +Change-Id: I663d74e0d44ebf46291fe0e8a7dc609be82eedc6 +--- + src/corelib/text/qstring.cpp| 4 ++-- + tests/auto/corelib/text/qstring/tst_qstring.cpp | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp +index 02a9fe3a30..e6e7cbaad4 100644 +--- a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp +@@ -4558,13 +4558,13 @@ int QString::lastIndexOf(const QRegularExpression , int from, QRegularExpress + return -1; + } + +-int endpos = (from < 0) ? (size() + from + 1) : (from); ++int endpos = (from < 0) ? (size() + from + 1) : (from + 1); + QRegularExpressionMatchIterator iterator = re.globalMatch(*this); + int lastIndex = -1; + while (iterator.hasNext()) { + QRegularExpressionMatch match = iterator.next(); + int start = match.capturedStart(); +-if (start <= endpos) { ++if (start < endpos) { + lastIndex = start; + if (rmatch) + *rmatch = std::move(match); +diff --git a/tests/auto/corelib/text/qstring/tst_qstring.cpp b/tests/auto/corelib/text/qstring/tst_qstring.cpp +index 8f53824050..4c4a8f0416 100644 +--- a/tests/auto/corelib/text/qstring/tst_qstring.cpp b/tests/auto/corelib/text/qstring/tst_qstring.cpp +@@ -1674,7 +1674,7 @@ void tst_QString::lastIndexOf() + QCOMPARE(haystack.lastIndexOf(needle.toLatin1(), from, cs), expected); + QCOMPARE(haystack.lastIndexOf(needle.toLatin1().data(), from, cs), expected); + +-if (from >= -1 && from < haystack.size() && needle.size() > 0) { ++if (from >= -1 && from < haystack.size()) { + // unfortunately, QString and QRegExp don't have the same out of bound semantics + // I think QString is wrong -- See file log for contact information. + { +-- +GitLab + diff --git a/dev-qt/qtcore/qtcore-5.15.2-r10.ebuild b/dev-qt/qtcore/qtcore-5.15.2-r10.ebuild index 5d5fc72d4cc..d8791013a67 100644 --- a/dev-qt/qtcore/qtcore-5.15.2-r10.ebuild +++ b/dev-qt/qtcore/qtcore-5.15.2-r10.ebuild @@ -48,6 +48,9 @@ QT5_GENTOO_PRIVATE_CONFIG=( PATCHES=( "${FILESDIR}"/${PN}-5.14.1-cmake-macro-backward-compat.patch # bug 703306 "${FILESDIR}"/${PN}-5.15.1-timezone-{1,2}.patch # bug 737914 + # Revert to 5.15.2 (upstream Qt release) behavior, QTBUG-94215 + # See also: https://invent.kde.org/qt/qt/qtbase/-/merge_requests/46 + "${FILESDIR}"/${P}-revert-3a273ac4.patch ) pkg_pretend() {
[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/, dev-qt/qtcore/
commit: 92d54be896563102786238893a9c645b8bdb43ef Author: Andreas Sturmlechner gentoo org> AuthorDate: Sat Feb 13 11:37:36 2021 + Commit: Andreas Sturmlechner gentoo org> CommitDate: Sat Feb 13 11:37:59 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92d54be8 dev-qt/qtcore: Fix headers for revdeps building with GCC-11 Closes: https://bugs.gentoo.org/768342 Closes: https://bugs.gentoo.org/768354 Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: Andreas Sturmlechner gentoo.org> dev-qt/qtcore/files/qtcore-5.15.2-gcc11.patch | 38 +++ dev-qt/qtcore/qtcore-5.15.2-r2.ebuild | 1 + 2 files changed, 39 insertions(+) diff --git a/dev-qt/qtcore/files/qtcore-5.15.2-gcc11.patch b/dev-qt/qtcore/files/qtcore-5.15.2-gcc11.patch new file mode 100644 index 000..9d391311c34 --- /dev/null +++ b/dev-qt/qtcore/files/qtcore-5.15.2-gcc11.patch @@ -0,0 +1,38 @@ +Description: include to fix some GCC 11 build issues +Origin: upstream, commits: + https://code.qt.io/cgit/qt/qtbase.git/commit/?id=813a928c7c3cf986 + https://code.qt.io/cgit/qt/qtbase.git/commit/?id=9c56d4da2ff631a8 +Last-Update: 2021-01-26 + +--- a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h +@@ -44,6 +44,8 @@ + #include + #include + ++#include ++ + // include stdlib.h and hope that it defines __GLIBC__ for glibc-based systems + #include + #include +--- a/src/corelib/global/qfloat16.h b/src/corelib/global/qfloat16.h +@@ -43,6 +43,7 @@ + + #include + #include ++#include + #include + + #if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__AVX2__) && !defined(__F16C__) +--- a/src/corelib/text/qbytearraymatcher.h b/src/corelib/text/qbytearraymatcher.h +@@ -42,6 +42,8 @@ + + #include + ++#include ++ + QT_BEGIN_NAMESPACE + + diff --git a/dev-qt/qtcore/qtcore-5.15.2-r2.ebuild b/dev-qt/qtcore/qtcore-5.15.2-r2.ebuild index e3a3aa50ca1..ed1722052c4 100644 --- a/dev-qt/qtcore/qtcore-5.15.2-r2.ebuild +++ b/dev-qt/qtcore/qtcore-5.15.2-r2.ebuild @@ -52,6 +52,7 @@ PATCHES=( "${FILESDIR}"/${PN}-5.15.1-timezone-{1,2}.patch # bug 737914 "${FILESDIR}"/${P}-fix-UB-in-QDateTime.patch # QTBUG-88656 "${FILESDIR}"/${P}-fix-alloc-mem-of-QByteArray.patch # QTBUG-87010 + "${FILESDIR}"/${P}-gcc11.patch # bug 768342, 768354 "${WORKDIR}"/qtbase-${PV}-gcc11.patch # bug 752012 )
[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/, dev-qt/qtcore/
commit: 78bf8d284d0bed6aa02af0e52aa9b27946c90ccb Author: Andreas Sturmlechner gentoo org> AuthorDate: Fri Jan 1 16:56:03 2021 + Commit: Andreas Sturmlechner gentoo org> CommitDate: Sat Jan 2 01:22:28 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78bf8d28 dev-qt/qtcore: Bounds-check time-zone offsets when parsing See also: https://bugreports.qt.io/browse/QTBUG-88656 Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Andreas Sturmlechner gentoo.org> .../files/qtcore-5.15.2-fix-UB-in-QDateTime.patch | 88 + dev-qt/qtcore/qtcore-5.15.2-r1.ebuild | 105 + 2 files changed, 193 insertions(+) diff --git a/dev-qt/qtcore/files/qtcore-5.15.2-fix-UB-in-QDateTime.patch b/dev-qt/qtcore/files/qtcore-5.15.2-fix-UB-in-QDateTime.patch new file mode 100644 index 000..b131b7af365 --- /dev/null +++ b/dev-qt/qtcore/files/qtcore-5.15.2-fix-UB-in-QDateTime.patch @@ -0,0 +1,88 @@ +From d2c0fc2b5f1c07c1e0acb1c0127578066b6f9b8e Mon Sep 17 00:00:00 2001 +From: Edward Welbourne +Date: Tue, 24 Nov 2020 12:45:11 +0100 +Subject: [PATCH] Bounds-check time-zone offsets when parsing + +Parsing of time-zone offsets should check the offset string conforms +to the expected format and has valid values in its fields. The +QDateTime parser, fromOffsetString(), neglected the bounds check on +hours; the QTzTimeZonePrivate parser, parsePosixTime(), neglected all +upper bounds checks, only checking against negative valus. + +Drive-by - refined phrasing of a comment. + +Fixes: QTBUG-88656 +Change-Id: If04cdbe65064108eaa87c42310527783ad21b4c0 +Reviewed-by: Thiago Macieira +(cherry picked from commit 380d97e1bd15e753907c378a070bdf7f1c1cf06e) +Reviewed-by: Edward Welbourne +--- + src/corelib/time/qdatetime.cpp | 2 +- + src/corelib/time/qtimezoneprivate_tz.cpp | 27 --- + 2 files changed, 17 insertions(+), 12 deletions(-) + +diff --git a/src/corelib/time/qdatetime.cpp b/src/corelib/time/qdatetime.cpp +index e824787880c..a2816e87f4a 100644 +--- a/src/corelib/time/qdatetime.cpp b/src/corelib/time/qdatetime.cpp +@@ -240,7 +240,7 @@ static int fromOffsetString(QStringView offsetString, bool *valid) noexcept + const QStringView hhRef = time.left(qMin(hhLen, time.size())); + bool ok = false; + const int hour = C.toInt(hhRef, ); +-if (!ok) ++if (!ok || hour > 23) // More generous than QTimeZone::MaxUtcOffsetSecs + return 0; + + const QStringView mmRef = time.mid(qMin(mmIndex, time.size())); +diff --git a/src/corelib/time/qtimezoneprivate_tz.cpp b/src/corelib/time/qtimezoneprivate_tz.cpp +index b816b4ecff2..adc590878d7 100644 +--- a/src/corelib/time/qtimezoneprivate_tz.cpp b/src/corelib/time/qtimezoneprivate_tz.cpp +@@ -394,29 +394,34 @@ static int parsePosixTime(const char *begin, const char *end) + // Format "hh[:mm[:ss]]" + int hour, min = 0, sec = 0; + +-// Note that the calls to qstrtoll do *not* check the end pointer, which +-// means they proceed until they find a non-digit. We check that we're +-// still in range at the end, but we may have read from past end. It's the +-// caller's responsibility to ensure that begin is part of a +-// null-terminated string. ++// Note that the calls to qstrtoll do *not* check against the end pointer, ++// which means they proceed until they find a non-digit. We check that we're ++// still in range at the end, but we may have read past end. It's the ++// caller's responsibility to ensure that begin is part of a null-terminated ++// string. + ++const int maxHour = QTimeZone::MaxUtcOffsetSecs / 3600; + bool ok = false; +-hour = qstrtoll(begin, , 10, ); +-if (!ok || hour < 0) ++const char *cut = begin; ++hour = qstrtoll(begin, , 10, ); ++if (!ok || hour < 0 || hour > maxHour || cut > begin + 2) + return INT_MIN; ++begin = cut; + if (begin < end && *begin == ':') { + // minutes + ++begin; +-min = qstrtoll(begin, , 10, ); +-if (!ok || min < 0) ++min = qstrtoll(begin, , 10, ); ++if (!ok || min < 0 || min > 59 || cut > begin + 2) + return INT_MIN; + ++begin = cut; + if (begin < end && *begin == ':') { + // seconds + ++begin; +-sec = qstrtoll(begin, , 10, ); +-if (!ok || sec < 0) ++sec = qstrtoll(begin, , 10, ); ++if (!ok || sec < 0 || sec > 59 || cut > begin + 2) + return INT_MIN; ++begin = cut; + } + } + +-- +2.16.3 diff --git a/dev-qt/qtcore/qtcore-5.15.2-r1.ebuild b/dev-qt/qtcore/qtcore-5.15.2-r1.ebuild new file mode 100644 index 000..b00b449ee60 --- /dev/null +++ b/dev-qt/qtcore/qtcore-5.15.2-r1.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2
[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/
commit: 9c8bc45ef269f19e43aed9c361e7acb7504c3017 Author: Andreas Sturmlechner gentoo org> AuthorDate: Tue Apr 7 18:22:15 2020 + Commit: Andreas Sturmlechner gentoo org> CommitDate: Thu Apr 9 21:43:34 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c8bc45e dev-qt/qtcore: QLibrary: fix deadlock caused by fix to QTBUG-39642 See also: https://bugreports.qt.io/browse/QTBUG-83207 Package-Manager: Portage-2.3.96, Repoman-2.3.22 Signed-off-by: Andreas Sturmlechner gentoo.org> .../files/qtcore-5.14.2-QLibrary-deadlock.patch| 106 + 1 file changed, 106 insertions(+) diff --git a/dev-qt/qtcore/files/qtcore-5.14.2-QLibrary-deadlock.patch b/dev-qt/qtcore/files/qtcore-5.14.2-QLibrary-deadlock.patch new file mode 100644 index 000..6a9c9921b7d --- /dev/null +++ b/dev-qt/qtcore/files/qtcore-5.14.2-QLibrary-deadlock.patch @@ -0,0 +1,106 @@ +From 276fa8383a7535765be7182883ef4aade17ce013 Mon Sep 17 00:00:00 2001 +From: Thiago Macieira +Date: Thu, 2 Apr 2020 12:08:41 -0300 +Subject: [PATCH] QLibrary: fix deadlock caused by fix to QTBUG-39642 + +Commit ae6f73e8566fa76470937aca737141183929a5ec inserted a mutex around +the entire load_sys(). We had reasoed that deadlocks would only occur if +the object creation in instance() recursed into its own instance(), +which was already a bug. But we had forgotten that dlopen()/ +LoadLibrary() executes initialization code from the module being loaded, +which could cause a recursion back into the same QPluginLoader or +QLibrary object. This recursion is benign because the module *is* loaded +and dlopen()/LoadLibrary() returns the same handle. + +[ChangeLog][QtCore][QLibrary and QPluginLoader] Fixed a deadlock that +would happen if the plugin or library being loaded has load-time +initialization code (C++ global variables) that recursed back into the +same QLibrary or QPluginLoader object. + +PS: QLibraryPrivate::loadPlugin() updates pluginState outside a mutex +lock, so pluginState should be made an atomic variable. Once that is +done, we'll only need locking the mutex to update errorString (no +locking before loading). + +Fixes: QTBUG-83207 +Task-number: QTBUG-39642 +Change-Id: Ibdc95e9af7bd456a94ecfffd160209304e5ab2eb +Reviewed-by: Volker Hilsheimer +Reviewed-by: David Faure +--- + src/corelib/plugin/qlibrary.cpp | 2 -- + src/corelib/plugin/qlibrary_unix.cpp | 4 + src/corelib/plugin/qlibrary_win.cpp | 3 +++ + 3 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp +index ddb053c26fa..be9d92b2048 100644 +--- a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp +@@ -576,9 +576,7 @@ bool QLibraryPrivate::load() + + Q_TRACE(QLibraryPrivate_load_entry, fileName); + +-mutex.lock(); + bool ret = load_sys(); +-mutex.unlock(); + if (qt_debug_component()) { + if (ret) { + qDebug() << "loaded library" << fileName; +diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp +index 017aa97b66a..a5c72f81d96 100644 +--- a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp +@@ -123,6 +123,7 @@ QStringList QLibraryPrivate::prefixes_sys() + + bool QLibraryPrivate::load_sys() + { ++QMutexLocker locker(); + QString attempt; + QFileSystemEntry fsEntry(fileName); + +@@ -213,6 +214,7 @@ bool QLibraryPrivate::load_sys() + } + #endif + ++locker.unlock(); + bool retry = true; + Handle hnd = nullptr; + for (int prefix = 0; retry && !hnd && prefix < prefixes.size(); prefix++) { +@@ -273,6 +275,8 @@ bool QLibraryPrivate::load_sys() + } + } + #endif ++ ++locker.relock(); + if (!hnd) { + errorString = QLibrary::tr("Cannot load library %1: %2").arg(fileName, qdlerror()); + } +diff --git a/src/corelib/plugin/qlibrary_win.cpp b/src/corelib/plugin/qlibrary_win.cpp +index 000bf762763..ef58724be8e 100644 +--- a/src/corelib/plugin/qlibrary_win.cpp b/src/corelib/plugin/qlibrary_win.cpp +@@ -78,6 +78,7 @@ bool QLibraryPrivate::load_sys() + // fileName + // + // NB If it's a plugin we do not ever try the ".dll" extension ++QMutexLocker locker(); + QStringList attempts; + + if (pluginState != IsAPlugin) +@@ -95,6 +96,7 @@ bool QLibraryPrivate::load_sys() + attempts.prepend(QDir::rootPath() + fileName); + #endif + ++locker.unlock(); + Handle hnd = nullptr; + for (const QString : qAsConst(attempts)) { + #ifndef Q_OS_WINRT +@@ -115,6 +117,7 @@ bool QLibraryPrivate::load_sys() + #ifndef Q_OS_WINRT + SetErrorMode(oldmode); + #endif ++locker.relock(); + if (!hnd) { + errorString = QLibrary::tr("Cannot load library %1: %2").arg( + QDir::toNativeSeparators(fileName), qt_error_string());
[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/, dev-qt/qtcore/
commit: fe1eb44a73d1a8e99aae1eeb2b7504b326df2cd1 Author: Andreas Sturmlechner gentoo org> AuthorDate: Sun Feb 9 10:59:22 2020 + Commit: Andreas Sturmlechner gentoo org> CommitDate: Sun Feb 9 18:51:02 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe1eb44a dev-qt/qtcore: Fix cmake macro compat. for upgrade from https://bugs.gentoo.org/703306 Closes: https://bugs.gentoo.org/705198 Package-Manager: Portage-2.3.87, Repoman-2.3.20 Signed-off-by: Andreas Sturmlechner gentoo.org> ...qtcore-5.14.1-cmake-macro-backward-compat.patch | 50 + dev-qt/qtcore/qtcore-5.14.1-r1.ebuild | 85 ++ 2 files changed, 135 insertions(+) diff --git a/dev-qt/qtcore/files/qtcore-5.14.1-cmake-macro-backward-compat.patch b/dev-qt/qtcore/files/qtcore-5.14.1-cmake-macro-backward-compat.patch new file mode 100644 index 000..30b5abc3975 --- /dev/null +++ b/dev-qt/qtcore/files/qtcore-5.14.1-cmake-macro-backward-compat.patch @@ -0,0 +1,50 @@ +From: Andreas Sturmlechner +Date: Sun, 9 Feb 2020 11:45:00 +0100 +Subject: [PATCH] qtcore: Fix cmake macro compat. for upgrade from https://code.qt.io/cgit/qt/qtbase.git/commit/?h=5.14=63d9cd17 + +_populate_$${CMAKE_MODULE_NAME}_plugin_properties in 5.14.0 gained an additional argument +IsDebugAndRelease without providing backward compatibility. This macro is used (at least) for +QtGui and QtDesigner plugins added by qtimageformats, qtsvg, qtvirtualkeyboard and qtwayland. +During upgrade from =Qt-5.14, as a consequence of slot upgrade rebuilds, some +reverse dependencies are slated for rebuild before these Qt consumers have been rebuilt and their +cmake files regenerated, leading to cmake errors like: + +https://bugs.gentoo.org/703306 +https://bugs.gentoo.org/705198 + +From mkspecs/features/create_cmake.prf: + +# CMAKE_DEBUG_AND_RELEASE is used to tell the _populate_$${CMAKE_MODULE_NAME}_target_properties +# functions whether a Configuration specific generator expression needs to be added to the values +# of INTERFACE_LINK_LIBRARIES and INTERFACE_LINK_OPTIONS. For debug_and_release builds, we do need +# configuration specific values. For singular builds (only release or only debug), we want the +# values to be applied regardless of the configuration. +# This would allow on Linux and macOS (and with a recent enough version of CMake on Windows) to +# build a Debug configuration of an application, even if Qt was built in a Release configuration. + +qt5-build.eclass is configuring either as 'release' or as 'debug', so we make IsDebugAndRelease +optional and default to FALSE. + +--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2020-01-23 13:37:32.0 +0100 b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2020-02-09 15:15:21.156219814 +0100 +@@ -538,8 +538,14 @@ + + file(GLOB pluginTargets \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*Plugin.cmake\") + +-macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION +- IsDebugAndRelease) ++macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION) ++set(IsDebugAndRelease FALSE) ++set (list_var ${ARGN}) ++list(LENGTH list_var num_extra_arg) ++if (${num_extra_arg} GREATER 0) ++list(GET list_var 0 IsDebugAndRelease) ++endif() ++ + set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) + + !!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE) diff --git a/dev-qt/qtcore/qtcore-5.14.1-r1.ebuild b/dev-qt/qtcore/qtcore-5.14.1-r1.ebuild new file mode 100644 index 000..d96ec59bb31 --- /dev/null +++ b/dev-qt/qtcore/qtcore-5.14.1-r1.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +QT5_MODULE="qtbase" +inherit qt5-build + +DESCRIPTION="Cross-platform application development framework" + +if [[ ${QT5_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86" +fi + +IUSE="icu systemd" + +DEPEND=" + dev-libs/double-conversion:= + dev-libs/glib:2 + dev-libs/libpcre2[pcre16,unicode] + sys-libs/zlib:= + icu? ( dev-libs/icu:= ) + !icu? ( virtual/libiconv ) + systemd? ( sys-apps/systemd:= ) +" +RDEPEND="${DEPEND} + !> "${D}"/${QT5_HEADERDIR}/QtCore/qconfig.h <<- _EOF_ || die + + #if defined(QT_NO_${flag}) && defined(QT_${flag}) + # undef QT_NO_${flag} + #elif !defined(QT_NO_${flag}) && !defined(QT_${flag}) + # define QT_NO_${flag} + #endif + _EOF_ + done +}
[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/, dev-qt/qtcore/
commit: f0f2e0e6f77f988b30bcaeef18e2d4e28708f7b1 Author: Andreas Sturmlechner gentoo org> AuthorDate: Sat Jan 25 23:29:54 2020 + Commit: Andreas Sturmlechner gentoo org> CommitDate: Sat Jan 25 23:56:18 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f0f2e0e6 dev-qt/qtcore: Fix CVE-2019-18281 Bug: https://bugs.gentoo.org/699226 Package-Manager: Portage-2.3.85, Repoman-2.3.20 Signed-off-by: Andreas Sturmlechner gentoo.org> .../files/qtcore-5.12.3-CVE-2019-18281.patch | 98 ++ dev-qt/qtcore/qtcore-5.12.3-r1.ebuild | 86 +++ 2 files changed, 184 insertions(+) diff --git a/dev-qt/qtcore/files/qtcore-5.12.3-CVE-2019-18281.patch b/dev-qt/qtcore/files/qtcore-5.12.3-CVE-2019-18281.patch new file mode 100644 index 000..055794b5196 --- /dev/null +++ b/dev-qt/qtcore/files/qtcore-5.12.3-CVE-2019-18281.patch @@ -0,0 +1,98 @@ +From 1232205e32464d90e871f39eb1e14fcf9b78a163 Mon Sep 17 00:00:00 2001 +From: Rainer Keller +Date: Tue, 27 Aug 2019 14:44:48 +0200 +Subject: [PATCH] Fix crash when text contains too many directional chars + +In case a text to be layouted contains more than 128 directional characters +it causes the application to crash + +The function initScriptAnalysisAndIsolatePairs() collects information of +RTL/LTR chaaracters into vector "isolatePairs". The size of the vector is +capped to 128. Later the function generateDirectionalRuns() iterates +the text again and tries to access items from the previously capped vector +above the upper bound. + +Task-number: QTBUG-77819 +Change-Id: Ibb7bf12c12b1db22f43ff46236518da3fdeed26a +Reviewed-by: Simon Hausmann +--- + src/gui/text/qtextengine.cpp| 15 +++ + tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp | 17 + + 2 files changed, 24 insertions(+), 8 deletions(-) + +diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp +index 2da13289bfd..a7834587b1e 100644 +--- a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp +@@ -399,6 +399,7 @@ struct QBidiAlgorithm { + analysis[i].bidiDirection = (level & 1) ? QChar::DirR : QChar::DirL; + runHasContent = true; + lastRunWithContent = -1; ++++isolatePairPosition; + } + int runBeforeIsolate = runs.size(); + ushort newLevel = isRtl ? ((stack.top().level + 1) | 1) : ((stack.top().level + 2) & ~1); +@@ -440,21 +441,19 @@ struct QBidiAlgorithm { + doEmbed(true, true, false); + break; + case QChar::DirLRI: +-Q_ASSERT(isolatePairs.at(isolatePairPosition).start == i); + doEmbed(false, false, true); +-++isolatePairPosition; + break; + case QChar::DirRLI: +-Q_ASSERT(isolatePairs.at(isolatePairPosition).start == i); + doEmbed(true, false, true); +-++isolatePairPosition; + break; + case QChar::DirFSI: { +-const auto = isolatePairs.at(isolatePairPosition); +-Q_ASSERT(pair.start == i); +-bool isRtl = QStringView(text + pair.start + 1, pair.end - pair.start - 1).isRightToLeft(); ++bool isRtl = false; ++if (isolatePairPosition < isolatePairs.size()) { ++const auto = isolatePairs.at(isolatePairPosition); ++Q_ASSERT(pair.start == i); ++isRtl = QStringView(text + pair.start + 1, pair.end - pair.start - 1).isRightToLeft(); ++} + doEmbed(isRtl, false, true); +-++isolatePairPosition; + break; + } + +diff --git a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp +index 9c477589f93..f0a32c2ed40 100644 +--- a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp +@@ -138,6 +138,7 @@ private slots: + void noModificationOfInputString(); + void superscriptCrash_qtbug53911(); + void showLineAndParagraphSeparatorsCrash(); ++void tooManyDirectionalCharctersCrash_qtbug77819(); + + private: + QFont testFont; +@@ -2309,5 +2310,21 @@ void tst_QTextLayout::nbspWithFormat() + QCOMPARE(layout.lineAt(1).textLength(), s2.length() + 1 + s3.length()); + } + ++void tst_QTextLayout::tooManyDirectionalCharctersCrash_qtbug77819() ++{ ++QString data; ++data += QString::fromUtf8("\xe2\x81\xa8"); // U+2068 FSI character ++data += QString::fromUtf8("\xe2\x81\xa7"); // U+2067 RLI character ++ ++// duplicating the text ++for (int i = 0; i < 10; i++) ++data += data; ++ ++// Nothing to test. It must not crash in beginLayout(). ++QTextLayout tl(data); ++
[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/, dev-qt/qtcore/
commit: 6151f696be8a9c1f35f708a30fc884d30fe5605b Author: Andreas Sturmlechner gentoo org> AuthorDate: Fri Oct 19 20:07:24 2018 + Commit: Andreas Sturmlechner gentoo org> CommitDate: Fri Oct 19 20:23:29 2018 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6151f696 dev-qt/qtcore: Fix build with x86 Thanks-to: Sylvia ya.ru> Closes: https://bugs.gentoo.org/669010 Signed-off-by: Andreas Sturmlechner gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11 .../files/qtcore-5.11.2-export-qt_open64.patch | 31 + dev-qt/qtcore/qtcore-5.11.2-r1.ebuild | 79 ++ 2 files changed, 110 insertions(+) diff --git a/dev-qt/qtcore/files/qtcore-5.11.2-export-qt_open64.patch b/dev-qt/qtcore/files/qtcore-5.11.2-export-qt_open64.patch new file mode 100644 index 000..a0a6bff9f66 --- /dev/null +++ b/dev-qt/qtcore/files/qtcore-5.11.2-export-qt_open64.patch @@ -0,0 +1,31 @@ +From 4fc4f7b0ce0e6ee186a7d7fe9b5dd20e94efe432 Mon Sep 17 00:00:00 2001 +From: Thiago Macieira +Date: Fri, 21 Sep 2018 09:04:24 -0700 +Subject: [PATCH] Export qt_open64 from QtCore + +Other libs use qcore_unix_p.h. + +qopenglprogrambinarycache.cpp:function QOpenGLProgramBinaryCache::load(QByteArray const&, unsigned int): error: undefined reference to 'qt_open64(char const*, int, unsigned int)' + +Change-Id: I44e7d800c68141bdaae0fffd155675d15eded2e4 +Reviewed-by: Simon Hausmann +Reviewed-by: Eric Lemanissier +--- + src/corelib/kernel/qcore_unix_p.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/corelib/kernel/qcore_unix_p.h b/src/corelib/kernel/qcore_unix_p.h +index cb98bef3476..5a2a29a3273 100644 +--- a/src/corelib/kernel/qcore_unix_p.h b/src/corelib/kernel/qcore_unix_p.h +@@ -178,7 +178,7 @@ inline void qt_ignore_sigpipe() + + #if defined(Q_PROCESSOR_X86_32) && defined(__GLIBC__) + # if !__GLIBC_PREREQ(2, 22) +-int qt_open64(const char *pathname, int flags, mode_t); ++Q_CORE_EXPORT int qt_open64(const char *pathname, int flags, mode_t); + #undef QT_OPEN + #define QT_OPEN qt_open64 + # endif +-- +2.16.3 diff --git a/dev-qt/qtcore/qtcore-5.11.2-r1.ebuild b/dev-qt/qtcore/qtcore-5.11.2-r1.ebuild new file mode 100644 index 000..e40ed0f6f4a --- /dev/null +++ b/dev-qt/qtcore/qtcore-5.11.2-r1.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +QT5_MODULE="qtbase" +inherit qt5-build + +DESCRIPTION="Cross-platform application development framework" + +if [[ ${QT5_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd" +fi + +IUSE="icu systemd" + +DEPEND=" + dev-libs/double-conversion:= + dev-libs/glib:2 + dev-libs/libpcre2[pcre16,unicode] + sys-libs/zlib + icu? ( dev-libs/icu:= ) + !icu? ( virtual/libiconv ) + systemd? ( sys-apps/systemd:= ) +" +RDEPEND="${DEPEND} + !> "${D%/}"/${QT5_HEADERDIR}/QtCore/qconfig.h <<- _EOF_ || die + + #if defined(QT_NO_${flag}) && defined(QT_${flag}) + # undef QT_NO_${flag} + #elif !defined(QT_NO_${flag}) && !defined(QT_${flag}) + # define QT_NO_${flag} + #endif + _EOF_ + done +}
[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/
commit: ab4d3f0a64e8cd936fabe2eaa98ccef92a967da6 Author: Michael Mair-Keimberger gmail com> AuthorDate: Sat May 12 15:25:49 2018 + Commit: Andreas Sturmlechner gentoo org> CommitDate: Sun May 13 06:56:32 2018 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab4d3f0a dev-qt/qtcore: remove unused patch Closes: https://github.com/gentoo/gentoo/pull/8368 dev-qt/qtcore/files/qtcore-5.6.2-plugins.patch | 81 -- 1 file changed, 81 deletions(-) diff --git a/dev-qt/qtcore/files/qtcore-5.6.2-plugins.patch b/dev-qt/qtcore/files/qtcore-5.6.2-plugins.patch deleted file mode 100644 index d969869c085..000 --- a/dev-qt/qtcore/files/qtcore-5.6.2-plugins.patch +++ /dev/null @@ -1,81 +0,0 @@ -From ca4d93d85ee446c5e30ec8e7814651e45cbf1218 Mon Sep 17 00:00:00 2001 -From: Thiago Macieira-Date: Thu, 12 Nov 2015 10:14:51 -0800 -Subject: Stop unloading plugins in QPluginLoader and QFactoryLoader - -QPluginLoader hasn't unloaded in its destructor since Qt 5.0, but we -missed the equivalent code in QFactoryLoader (which bypasses -QPluginLoader). Besides, QPluginLoader::unload() was still doing -unloading, which it won't anymore. - -Not unloading plugins is Qt's policy, as decided during the 5.0 -development process and reaffirmed now in 5.6. This is due to static -data in plugins leaking out and remaining in use past the unloading of -the plugin, causing crashes. - -This does not affect QLibrary and QLibrary::unload(). Those are meant -for non-Qt loadable modules, so unloading them may be safe. - -Task-number: QTBUG-49061 -Discussed-on: http://lists.qt-project.org/pipermail/development/2015-November/023681.html -Change-Id: I461e9fc7199748faa1871416070f138df8db -(cherry picked from commit 494376f980e96339b6f1eff7c41336ca4d853065) -Discussed-again-on: http://lists.qt-project.org/pipermail/development/2016-October/027476.html -Reviewed-by: Lars Knoll - src/corelib/plugin/qfactoryloader.cpp | 6 -- - src/corelib/plugin/qpluginloader.cpp | 5 +++-- - 2 files changed, 7 insertions(+), 4 deletions(-) - -diff --git a/src/corelib/plugin/qfactoryloader.cpp b/src/corelib/plugin/qfactoryloader.cpp -index dcf1b1a..b6558f5 100644 a/src/corelib/plugin/qfactoryloader.cpp -+++ b/src/corelib/plugin/qfactoryloader.cpp -@@ -208,10 +208,12 @@ void QFactoryLoader::update() - ++keyUsageCount; - } - } --if (keyUsageCount || keys.isEmpty()) -+if (keyUsageCount || keys.isEmpty()) { -+library->setLoadHints(QLibrary::PreventUnloadHint); // once loaded, don't unload - d->libraryList += library; --else -+} else { - library->release(); -+} - } - } - #else -diff --git a/src/corelib/plugin/qpluginloader.cpp b/src/corelib/plugin/qpluginloader.cpp -index 37f2368..0ea8280 100644 a/src/corelib/plugin/qpluginloader.cpp -+++ b/src/corelib/plugin/qpluginloader.cpp -@@ -148,6 +148,7 @@ QPluginLoader::QPluginLoader(const QString , QObject *parent) - : QObject(parent), d(0), did_load(false) - { - setFileName(fileName); -+setLoadHints(QLibrary::PreventUnloadHint); - } - - /*! -@@ -342,7 +343,7 @@ static QString locatePlugin(const QString& fileName) - void QPluginLoader::setFileName(const QString ) - { - #if defined(QT_SHARED) --QLibrary::LoadHints lh; -+QLibrary::LoadHints lh = QLibrary::PreventUnloadHint; - if (d) { - lh = d->loadHints(); - d->release(); -@@ -391,7 +392,7 @@ Q_GLOBAL_STATIC(StaticPluginList, staticPluginList) - \brief Give the load() function some hints on how it should behave. - - You can give hints on how the symbols in the plugin are --resolved. By default, none of the hints are set. -+resolved. By default since Qt 5.7, QLibrary::PreventUnloadHint is set. - - See the documentation of QLibrary::loadHints for a complete - description of how this property works. --- -cgit v1.0-4-g1e03 -
[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/
commit: b9f5a9e8d3b5f03d93db6b5e8d5575f485371368 Author: Michael Mair-Keimberger gmail com> AuthorDate: Thu Dec 28 07:30:45 2017 + Commit: Michael Palimaka gentoo org> CommitDate: Thu Dec 28 10:03:44 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9f5a9e8 dev-qt/qtcore: remove unused patch Closes: https://github.com/gentoo/gentoo/pull/6665 dev-qt/qtcore/files/qtcore-4.8.6-moc-boost-1.60.patch | 16 1 file changed, 16 deletions(-) diff --git a/dev-qt/qtcore/files/qtcore-4.8.6-moc-boost-1.60.patch b/dev-qt/qtcore/files/qtcore-4.8.6-moc-boost-1.60.patch deleted file mode 100644 index 91a5526ad83..000 --- a/dev-qt/qtcore/files/qtcore-4.8.6-moc-boost-1.60.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -up qt-everywhere-opensource-src-4.8.7/src/tools/moc/main.cpp.QTBUG-22829 qt-everywhere-opensource-src-4.8.7/src/tools/moc/main.cpp qt-everywhere-opensource-src-4.8.7/src/tools/moc/main.cpp.QTBUG-22829 2015-05-07 09:14:44.0 -0500 -+++ qt-everywhere-opensource-src-4.8.7/src/tools/moc/main.cpp 2016-03-16 13:20:43.145899869 -0500 -@@ -188,8 +188,11 @@ int runMoc(int _argc, char **_argv) - pp.macros["Q_MOC_RUN"]; - pp.macros["__cplusplus"]; - --// Workaround a bug while parsing the boost/type_traits/has_operator.hpp header. See QTBUG-22829 -+// Workaround a bug while parsing some boost headers. See QTBUG-22829 - pp.macros["BOOST_TT_HAS_OPERATOR_HPP_INCLUDED"]; -+pp.macros["BOOST_LEXICAL_CAST_INCLUDED"]; -+pp.macros["BOOST_NEXT_PRIOR_HPP_INCLUDED"]; -+pp.macros["BOOST_TYPE_TRAITS_HPP"]; - - QByteArray filename; - QByteArray output;
[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/, dev-qt/qtcore/
commit: 3e0bbe689cf555a4b68cea32a5ba5d5f5b898641 Author: Michael Palimaka gentoo org> AuthorDate: Tue Nov 28 10:58:58 2017 + Commit: Michael Palimaka gentoo org> CommitDate: Tue Nov 28 10:59:53 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e0bbe68 dev-qt/qtcore: backport patch from upstream fixing build when AVX2 is enabled but __F16C__ isn't defined Closes: https://bugs.gentoo.org/635388 Package-Manager: Portage-2.3.14, Repoman-2.3.6 dev-qt/qtcore/files/qtcore-5.9.3-avx.patch | 69 ++ dev-qt/qtcore/qtcore-5.9.3.ebuild | 2 + 2 files changed, 71 insertions(+) diff --git a/dev-qt/qtcore/files/qtcore-5.9.3-avx.patch b/dev-qt/qtcore/files/qtcore-5.9.3-avx.patch new file mode 100644 index 000..be18433be20 --- /dev/null +++ b/dev-qt/qtcore/files/qtcore-5.9.3-avx.patch @@ -0,0 +1,69 @@ +From d813c66bfcfac1837814ec4d174d0389172f0d4c Mon Sep 17 00:00:00 2001 +From: Thiago Macieira+Date: Tue, 25 Apr 2017 12:02:09 -0300 +Subject: Fix the build when AVX2 is enabled but __F16C__ isn't defined + +If -mavx2 is used, __AVX2__ is defined, which enables the F16C code +after commit 280e321e52fd4e86545f3f0d4bd4e047786a897e, but that was +wrong since we aren't allowed to use the F16C intrinsics with either +Clang or GCC (we can only do that with GCC 4.9 and Clang 4.8, and only +with an __attribute__ decoration). + +With ICC and MSVC, we are allowed to use the intrinsics, but the +#include was missing. + +[ChangeLog][QtCore] Fixed a compilation issue with qfloat16 if AVX2 +support is enabled in the compiler. Since all processors that support +AVX2 also support F16C, for GCC and Clang it is recommended to either +add -mf16c to your build or to use the corresponding -march= switch. + +Task-number: QTBUG-64529 +Change-Id: I84e363d735b443cb9beefffd14b8ac1fd4baa978 +Reviewed-by: Allan Sandfeld Jensen +--- + src/corelib/global/qfloat16.h | 15 --- + 1 file changed, 12 insertions(+), 3 deletions(-) + +diff --git a/src/corelib/global/qfloat16.h b/src/corelib/global/qfloat16.h +index 89a62a93db..a0aa9496b4 100644 +--- a/src/corelib/global/qfloat16.h b/src/corelib/global/qfloat16.h +@@ -44,7 +44,16 @@ + #include + #include + +-#if defined __F16C__ ++#if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__AVX2__) && !defined(__F16C__) ++// All processors that support AVX2 do support F16C too. That doesn't mean ++// we're allowed to use the intrinsics directly, so we'll do it only for ++// the Intel and Microsoft's compilers. ++# if defined(Q_CC_INTEL) || defined(Q_CC_MSVC) ++#define __F16C__1 ++# endif ++#endif ++ ++#if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__F16C__) + #include + #endif + +@@ -116,7 +125,7 @@ QT_WARNING_DISABLE_CLANG("-Wc99-extensions") + QT_WARNING_DISABLE_GCC("-Wold-style-cast") + inline qfloat16::qfloat16(float f) Q_DECL_NOTHROW + { +-#if defined(QT_COMPILER_SUPPORTS_F16C) && (defined(__F16C__) || defined(__AVX2__)) ++#if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__F16C__) + __m128 packsingle = _mm_set_ss(f); + __m128i packhalf = _mm_cvtps_ph(packsingle, 0); + b16 = _mm_extract_epi16(packhalf, 0); +@@ -134,7 +143,7 @@ QT_WARNING_POP + + inline qfloat16::operator float() const Q_DECL_NOTHROW + { +-#if defined(QT_COMPILER_SUPPORTS_F16C) && (defined(__F16C__) || defined(__AVX2__)) ++#if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__F16C__) + __m128i packhalf = _mm_cvtsi32_si128(b16); + __m128 packsingle = _mm_cvtph_ps(packhalf); + return _mm_cvtss_f32(packsingle); +-- +cgit v1.1-6-g87c4 + diff --git a/dev-qt/qtcore/qtcore-5.9.3.ebuild b/dev-qt/qtcore/qtcore-5.9.3.ebuild index 779bc30c7b9..5442d7c47bf 100644 --- a/dev-qt/qtcore/qtcore-5.9.3.ebuild +++ b/dev-qt/qtcore/qtcore-5.9.3.ebuild @@ -24,6 +24,8 @@ DEPEND=" " RDEPEND="${DEPEND}" +PATCHES=( "${FILESDIR}/${P}-avx.patch" ) + QT5_TARGET_SUBDIRS=( src/tools/bootstrap src/tools/moc
[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/, dev-qt/qtopengl/, dev-qt/designer/, dev-qt/assistant/, ...
commit: fa139691716add1df0233bf3980a0f0dd32ea9d4 Author: Davide Pesavento gentoo org> AuthorDate: Sun Oct 29 18:19:12 2017 + Commit: Andreas Sturmlechner gentoo org> CommitDate: Mon Oct 30 23:31:34 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa139691 dev-qt: remove Qt 4.8.6 Closes: https://github.com/gentoo/gentoo/pull/6073 Package-Manager: Portage-2.3.13, Repoman-2.3.4 dev-qt/assistant/Manifest | 1 - dev-qt/assistant/assistant-4.8.6-r1.ebuild | 56 --- dev-qt/designer/Manifest | 1 - dev-qt/designer/designer-4.8.6-r1.ebuild | 59 --- dev-qt/linguist/Manifest | 1 - dev-qt/linguist/linguist-4.8.6-r1.ebuild | 42 -- dev-qt/pixeltool/Manifest | 1 - dev-qt/pixeltool/pixeltool-4.8.6-r1.ebuild | 35 -- dev-qt/qdbusviewer/Manifest| 1 - dev-qt/qdbusviewer/qdbusviewer-4.8.6-r1.ebuild | 42 -- dev-qt/qt3support/Manifest | 1 - dev-qt/qt3support/qt3support-4.8.6-r1.ebuild | 36 -- dev-qt/qtbearer/Manifest | 1 - dev-qt/qtbearer/qtbearer-4.8.6-r1.ebuild | 46 --- dev-qt/qtcore/Manifest | 1 - .../files/qtcore-4.8.6-QNAM-corruptions-fix.patch | 431 - dev-qt/qtcore/qtcore-4.8.6-r2.ebuild | 86 dev-qt/qtdbus/Manifest | 1 - dev-qt/qtdbus/qtdbus-4.8.6-r1.ebuild | 43 -- dev-qt/qtdeclarative/Manifest | 1 - dev-qt/qtdeclarative/qtdeclarative-4.8.6-r1.ebuild | 54 --- dev-qt/qtdemo/Manifest | 1 - dev-qt/qtdemo/qtdemo-4.8.6-r1.ebuild | 91 - dev-qt/qtgui/Manifest | 1 - dev-qt/qtgui/files/qtgui-4.8.5-CVE-2015-0295.patch | 40 -- ...4.8.5-cleanlooks-floating-point-exception.patch | 38 -- ...gui-4.8.5-dont-crash-on-broken-GIF-images.patch | 43 -- dev-qt/qtgui/files/qtgui-4.8.6-CVE-2015-1858.patch | 63 --- dev-qt/qtgui/files/qtgui-4.8.6-CVE-2015-1860.patch | 31 -- dev-qt/qtgui/qtgui-4.8.6-r4.ebuild | 174 - dev-qt/qthelp/Manifest | 1 - dev-qt/qthelp/qthelp-4.8.6-r3.ebuild | 114 -- dev-qt/qtmultimedia/Manifest | 1 - dev-qt/qtmultimedia/qtmultimedia-4.8.6-r1.ebuild | 47 --- dev-qt/qtopengl/Manifest | 1 - dev-qt/qtopengl/qtopengl-4.8.6-r1.ebuild | 48 --- dev-qt/qtscript/Manifest | 1 - dev-qt/qtscript/qtscript-4.8.6-r2.ebuild | 41 -- dev-qt/qtsql/Manifest | 1 - dev-qt/qtsql/qtsql-4.8.6-r1.ebuild | 62 --- dev-qt/qtsvg/Manifest | 1 - dev-qt/qtsvg/qtsvg-4.8.6-r1.ebuild | 45 --- dev-qt/qttest/Manifest | 1 - dev-qt/qttest/qttest-4.8.6-r1.ebuild | 35 -- dev-qt/qttranslations/Manifest | 1 - .../qttranslations/qttranslations-4.8.6-r1.ebuild | 43 -- dev-qt/qtwebkit/Manifest | 1 - dev-qt/qtwebkit/qtwebkit-4.8.6-r1.ebuild | 72 dev-qt/qtxmlpatterns/Manifest | 1 - dev-qt/qtxmlpatterns/qtxmlpatterns-4.8.6-r1.ebuild | 36 -- 50 files changed, 1975 deletions(-) diff --git a/dev-qt/assistant/Manifest b/dev-qt/assistant/Manifest index 0611be6f664..bd9b15d8696 100644 --- a/dev-qt/assistant/Manifest +++ b/dev-qt/assistant/Manifest @@ -1,4 +1,3 @@ -DIST qt-everywhere-opensource-src-4.8.6.tar.gz 241623667 SHA256 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c SHA512 c2d07c3cf9d687cb9b93e337c89df3f0055bd02bc8aa5ecd55d3ffb238b31a4308aeabc3c51a4f94ac76a1b00796f047513d02e427ed93ae8dd99f836fff7692 WHIRLPOOL 473566814a77237dbdd37a47980c1085f6cf39599c4d6b0120959fe80dadf65c4eaafd5f528dd86cea8815562faa204bedfe3b766c2ca4f2d2c99efc21dbca84 DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 SHA256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 WHIRLPOOL ad8f01172f5bdb3a3a69fe7b03862c4c411bc8d95211053ad66ed1d60a3c0577d073d1075a1e0a80b25d9b2721addda55a2967e6ccf5e194cec8d08770ac5fc2 DIST qttools-opensource-src-5.6.2.tar.xz 9794512 SHA256 db2bb4318786257a47172c377d9c456d5d5ec760d5d69240a4693dc87989e1b7 SHA512 3b2a0d098e09353978ff1e54cfcc293b8c7b4ada323c3c98e6ce8d62cea4574d285fc169f9758ec019206184db0df39ac99971be0bcb335672b7f4f86c787327 WHIRLPOOL 7e4ab96eb762d4ea13fc19f5816f3b7633601746d6f4c83b7eefa7b9cecc65db0837bc85f9b69c6a69f13b0fac243d3491b6990a85d72ee24bee4d05a262e1fd DIST qttools-opensource-src-5.7.1.tar.xz 10011108
[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/, dev-qt/qtcore/
commit: 43c10326958cf85bccdb6270b5963cba45052412 Author: Zhao Yongming gmail com> AuthorDate: Tue Apr 11 07:16:08 2017 + Commit: Davide Pesavento gentoo org> CommitDate: Sun May 14 00:13:39 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43c10326 dev-qt/qtcore: fix building against libressl Patch from libressl overlay. Closes: https://github.com/gentoo/gentoo/pull/4409 Gentoo-Bug: 584796 Package-Manager: Portage-2.3.5, Repoman-2.3.2 dev-qt/qtcore/files/qtcore-4.8.7-libressl.patch | 52 + dev-qt/qtcore/qtcore-4.8.7-r2.ebuild| 1 + 2 files changed, 53 insertions(+) diff --git a/dev-qt/qtcore/files/qtcore-4.8.7-libressl.patch b/dev-qt/qtcore/files/qtcore-4.8.7-libressl.patch new file mode 100644 index 000..b838c7a687b --- /dev/null +++ b/dev-qt/qtcore/files/qtcore-4.8.7-libressl.patch @@ -0,0 +1,52 @@ +--- src/network/ssl/qsslsocket_openssl_symbols.cpp.orig2015-11-25 01:38:42.103898399 -0500 src/network/ssl/qsslsocket_openssl_symbols.cpp 2015-11-25 01:40:50.146247648 -0500 +@@ -224,13 +224,17 @@ + #ifndef OPENSSL_NO_SSL2 + DEFINEFUNC(const SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return) + #endif ++#ifndef OPENSSL_NO_SSL3 + DEFINEFUNC(const SSL_METHOD *, SSLv3_client_method, DUMMYARG, DUMMYARG, return 0, return) ++#endif + DEFINEFUNC(const SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return 0, return) + DEFINEFUNC(const SSL_METHOD *, TLSv1_client_method, DUMMYARG, DUMMYARG, return 0, return) + #ifndef OPENSSL_NO_SSL2 + DEFINEFUNC(const SSL_METHOD *, SSLv2_server_method, DUMMYARG, DUMMYARG, return 0, return) + #endif ++#ifndef OPENSSL_NO_SSL3 + DEFINEFUNC(const SSL_METHOD *, SSLv3_server_method, DUMMYARG, DUMMYARG, return 0, return) ++#endif + DEFINEFUNC(const SSL_METHOD *, SSLv23_server_method, DUMMYARG, DUMMYARG, return 0, return) + DEFINEFUNC(const SSL_METHOD *, TLSv1_server_method, DUMMYARG, DUMMYARG, return 0, return) + #else +@@ -818,13 +822,17 @@ + #ifndef OPENSSL_NO_SSL2 + RESOLVEFUNC(SSLv2_client_method) + #endif ++#ifndef OPENSSL_NO_SSL3 + RESOLVEFUNC(SSLv3_client_method) ++#endif + RESOLVEFUNC(SSLv23_client_method) + RESOLVEFUNC(TLSv1_client_method) + #ifndef OPENSSL_NO_SSL2 + RESOLVEFUNC(SSLv2_server_method) + #endif ++#ifndef OPENSSL_NO_SSL3 + RESOLVEFUNC(SSLv3_server_method) ++#endif + RESOLVEFUNC(SSLv23_server_method) + RESOLVEFUNC(TLSv1_server_method) + RESOLVEFUNC(X509_NAME_entry_count) +--- src/network/ssl/qsslsocket_openssl.cpp.orig2015-11-25 01:44:55.235087906 -0500 src/network/ssl/qsslsocket_openssl.cpp 2015-11-25 01:45:45.194443818 -0500 +@@ -263,7 +263,11 @@ + #endif + break; + case QSsl::SslV3: ++#ifndef OPENSSL_NO_SSL3 + ctx = q_SSL_CTX_new(client ? q_SSLv3_client_method() : q_SSLv3_server_method()); ++#else ++ctx = 0; // SSL 3 not supported by the system, but chosen deliberately -> error ++#endif + break; + case QSsl::SecureProtocols: // SslV2 will be disabled below + case QSsl::TlsV1SslV3: // SslV2 will be disabled below diff --git a/dev-qt/qtcore/qtcore-4.8.7-r2.ebuild b/dev-qt/qtcore/qtcore-4.8.7-r2.ebuild index dd67e084f00..d7f2cb00d27 100644 --- a/dev-qt/qtcore/qtcore-4.8.7-r2.ebuild +++ b/dev-qt/qtcore/qtcore-4.8.7-r2.ebuild @@ -37,6 +37,7 @@ PATCHES=( "${FILESDIR}/${PN}-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch" # bug 514968 "${FILESDIR}/${PN}-4.8.5-qeventdispatcher-recursive.patch" # bug 514968 "${FILESDIR}/${PN}-4.8.6-moc-boost-1.60.patch" # bug 556104 + "${FILESDIR}/${PN}-4.8.7-libressl.patch" # bug 584796 ) QT4_TARGET_DIRECTORIES="
[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/, dev-qt/qtcore/
commit: 87e6967f8b82468e077a8f2004732e2db1cbf751 Author: Andreas Sturmlechner gentoo org> AuthorDate: Sun Apr 23 13:54:19 2017 + Commit: Andreas Sturmlechner gentoo org> CommitDate: Sun Apr 23 19:07:31 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87e6967f dev-qt/qtcore: Try to fix random plasmashell crashes Backports from Qt-5.8.0. See also: https://bugs.kde.org/show_bug.cgi?id=342763 Package-Manager: Portage-2.3.3, Repoman-2.3.1 dev-qt/qtcore/files/qtcore-5.7.1-qipm.patch| 152 +++ dev-qt/qtcore/files/qtcore-5.7.1-qsfpm-1.patch | 252 + dev-qt/qtcore/files/qtcore-5.7.1-qsfpm-2.patch | 195 +++ dev-qt/qtcore/qtcore-5.7.1-r3.ebuild | 48 + 4 files changed, 647 insertions(+) diff --git a/dev-qt/qtcore/files/qtcore-5.7.1-qipm.patch b/dev-qt/qtcore/files/qtcore-5.7.1-qipm.patch new file mode 100644 index 000..abea1458807 --- /dev/null +++ b/dev-qt/qtcore/files/qtcore-5.7.1-qipm.patch @@ -0,0 +1,152 @@ +From baad82d242a4d8c1af6c87faaa7f25584183fd53 Mon Sep 17 00:00:00 2001 +From: Stephen Kelly+Date: Tue, 20 Dec 2016 00:44:12 + +Subject: [PATCH] QIPM: Persist model indexes after emitting layoutChange, not + before + +Callers can persist a QModelIndex which was not persisted before in a +slot connected to the signal, and such a persisted index must be updated +in the course of the layoutChange. + +Store the indexes to persist after emitting the signal. + +Task-number: QTBUG-32981 +Change-Id: Ibee4c0d84817d72603a03fe5b22fdeefeac0695e +Reviewed-by: David Faure +--- + src/corelib/itemmodels/qidentityproxymodel.cpp | 18 ++--- + .../tst_qidentityproxymodel.cpp| 76 ++ + 2 files changed, 85 insertions(+), 9 deletions(-) + +diff --git a/src/corelib/itemmodels/qidentityproxymodel.cpp b/src/corelib/itemmodels/qidentityproxymodel.cpp +index e537793..7c30679 100644 +--- a/src/corelib/itemmodels/qidentityproxymodel.cpp b/src/corelib/itemmodels/qidentityproxymodel.cpp +@@ -496,15 +496,6 @@ void QIdentityProxyModelPrivate::_q_sourceLayoutAboutToBeChanged(const QListpersistentIndexList(); +-for (const QPersistentModelIndex : proxyPersistentIndexes) { +-proxyIndexes << proxyPersistentIndex; +-Q_ASSERT(proxyPersistentIndex.isValid()); +-const QPersistentModelIndex srcPersistentIndex = q->mapToSource(proxyPersistentIndex); +-Q_ASSERT(srcPersistentIndex.isValid()); +-layoutChangePersistentIndexes << srcPersistentIndex; +-} +- + QList parents; + parents.reserve(sourceParents.size()); + for (const QPersistentModelIndex : sourceParents) { +@@ -518,6 +509,15 @@ void QIdentityProxyModelPrivate::_q_sourceLayoutAboutToBeChanged(const QListlayoutAboutToBeChanged(parents, hint); ++ ++const auto proxyPersistentIndexes = q->persistentIndexList(); ++for (const QPersistentModelIndex : proxyPersistentIndexes) { ++proxyIndexes << proxyPersistentIndex; ++Q_ASSERT(proxyPersistentIndex.isValid()); ++const QPersistentModelIndex srcPersistentIndex = q->mapToSource(proxyPersistentIndex); ++Q_ASSERT(srcPersistentIndex.isValid()); ++layoutChangePersistentIndexes << srcPersistentIndex; ++} + } + + void QIdentityProxyModelPrivate::_q_sourceLayoutChanged(const QList , QAbstractItemModel::LayoutChangeHint hint) +diff --git a/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp b/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp +index e946f31..564b854 100644 +--- a/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp b/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp +@@ -68,6 +68,8 @@ private slots: + + void itemData(); + ++void persistIndexOnLayoutChange(); ++ + protected: + void verifyIdentity(QAbstractItemModel *model, const QModelIndex = QModelIndex()); + +@@ -377,5 +379,79 @@ void tst_QIdentityProxyModel::itemData() + QCOMPARE(proxy.itemData(topIndex).value(Qt::DisplayRole).toString(), QStringLiteral("Monday_appended")); + } + ++void dump(QAbstractItemModel* model, QString const& indent = " - ", QModelIndex const& parent = {}) ++{ ++for (auto row = 0; row < model->rowCount(parent); ++row) ++{ ++auto idx = model->index(row, 0, parent); ++qDebug() << (indent + idx.data().toString()); ++dump(model, indent + "- ", idx); ++} ++} ++ ++void tst_QIdentityProxyModel::persistIndexOnLayoutChange() ++{ ++DynamicTreeModel model; ++ ++QList ancestors; ++for (auto i = 0; i < 3; ++i) ++{ ++Q_UNUSED(i); ++ModelInsertCommand insertCommand(); ++insertCommand.setAncestorRowNumbers(ancestors); ++insertCommand.setStartRow(0); ++insertCommand.setEndRow(0); ++insertCommand.doCommand();
[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/, dev-qt/qtcore/
commit: 5ebe88c3c2988c62baaffb71e0249e97fc30ba51 Author: Michael Palimaka gentoo org> AuthorDate: Thu Nov 17 14:35:17 2016 + Commit: Michael Palimaka gentoo org> CommitDate: Thu Nov 17 14:35:55 2016 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ebe88c3 dev-qt/qtcore: backport patch from upstream that resolves various crashes Gentoo-bug: 581068 Package-Manager: portage-2.3.2 dev-qt/qtcore/files/qtcore-5.6.2-plugins.patch | 81 ++ dev-qt/qtcore/qtcore-5.6.2-r1.ebuild | 43 ++ 2 files changed, 124 insertions(+) diff --git a/dev-qt/qtcore/files/qtcore-5.6.2-plugins.patch b/dev-qt/qtcore/files/qtcore-5.6.2-plugins.patch new file mode 100644 index ..d969869 --- /dev/null +++ b/dev-qt/qtcore/files/qtcore-5.6.2-plugins.patch @@ -0,0 +1,81 @@ +From ca4d93d85ee446c5e30ec8e7814651e45cbf1218 Mon Sep 17 00:00:00 2001 +From: Thiago Macieira+Date: Thu, 12 Nov 2015 10:14:51 -0800 +Subject: Stop unloading plugins in QPluginLoader and QFactoryLoader + +QPluginLoader hasn't unloaded in its destructor since Qt 5.0, but we +missed the equivalent code in QFactoryLoader (which bypasses +QPluginLoader). Besides, QPluginLoader::unload() was still doing +unloading, which it won't anymore. + +Not unloading plugins is Qt's policy, as decided during the 5.0 +development process and reaffirmed now in 5.6. This is due to static +data in plugins leaking out and remaining in use past the unloading of +the plugin, causing crashes. + +This does not affect QLibrary and QLibrary::unload(). Those are meant +for non-Qt loadable modules, so unloading them may be safe. + +Task-number: QTBUG-49061 +Discussed-on: http://lists.qt-project.org/pipermail/development/2015-November/023681.html +Change-Id: I461e9fc7199748faa1871416070f138df8db +(cherry picked from commit 494376f980e96339b6f1eff7c41336ca4d853065) +Discussed-again-on: http://lists.qt-project.org/pipermail/development/2016-October/027476.html +Reviewed-by: Lars Knoll +--- + src/corelib/plugin/qfactoryloader.cpp | 6 -- + src/corelib/plugin/qpluginloader.cpp | 5 +++-- + 2 files changed, 7 insertions(+), 4 deletions(-) + +diff --git a/src/corelib/plugin/qfactoryloader.cpp b/src/corelib/plugin/qfactoryloader.cpp +index dcf1b1a..b6558f5 100644 +--- a/src/corelib/plugin/qfactoryloader.cpp b/src/corelib/plugin/qfactoryloader.cpp +@@ -208,10 +208,12 @@ void QFactoryLoader::update() + ++keyUsageCount; + } + } +-if (keyUsageCount || keys.isEmpty()) ++if (keyUsageCount || keys.isEmpty()) { ++library->setLoadHints(QLibrary::PreventUnloadHint); // once loaded, don't unload + d->libraryList += library; +-else ++} else { + library->release(); ++} + } + } + #else +diff --git a/src/corelib/plugin/qpluginloader.cpp b/src/corelib/plugin/qpluginloader.cpp +index 37f2368..0ea8280 100644 +--- a/src/corelib/plugin/qpluginloader.cpp b/src/corelib/plugin/qpluginloader.cpp +@@ -148,6 +148,7 @@ QPluginLoader::QPluginLoader(const QString , QObject *parent) + : QObject(parent), d(0), did_load(false) + { + setFileName(fileName); ++setLoadHints(QLibrary::PreventUnloadHint); + } + + /*! +@@ -342,7 +343,7 @@ static QString locatePlugin(const QString& fileName) + void QPluginLoader::setFileName(const QString ) + { + #if defined(QT_SHARED) +-QLibrary::LoadHints lh; ++QLibrary::LoadHints lh = QLibrary::PreventUnloadHint; + if (d) { + lh = d->loadHints(); + d->release(); +@@ -391,7 +392,7 @@ Q_GLOBAL_STATIC(StaticPluginList, staticPluginList) + \brief Give the load() function some hints on how it should behave. + + You can give hints on how the symbols in the plugin are +-resolved. By default, none of the hints are set. ++resolved. By default since Qt 5.7, QLibrary::PreventUnloadHint is set. + + See the documentation of QLibrary::loadHints for a complete + description of how this property works. +-- +cgit v1.0-4-g1e03 + diff --git a/dev-qt/qtcore/qtcore-5.6.2-r1.ebuild b/dev-qt/qtcore/qtcore-5.6.2-r1.ebuild new file mode 100644 index ..3ae1e1c --- /dev/null +++ b/dev-qt/qtcore/qtcore-5.6.2-r1.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 +QT5_MODULE="qtbase" +inherit qt5-build + +DESCRIPTION="Cross-platform application development framework" + +if [[ ${QT5_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86" +fi + +IUSE="icu systemd" + +DEPEND=" + dev-libs/glib:2 + >=dev-libs/libpcre-8.38[pcre16,unicode] + >=sys-libs/zlib-1.2.5 + virtual/libiconv + icu? ( dev-libs/icu:= ) + systemd? ( sys-apps/systemd:= ) +" +RDEPEND="${DEPEND}" +
[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/
commit: 747f6c364e25b498e02884780925d852502c6337 Author: Davide Pesavento gentoo org> AuthorDate: Sat Apr 16 17:18:04 2016 + Commit: Davide Pesavento gentoo org> CommitDate: Sat Apr 16 17:18:04 2016 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=747f6c36 dev-qt/qtcore: delete unused patch Package-Manager: portage-2.2.28 .../qtcore/files/qtcore-4.8.5-moc-boost-lexical-cast.patch | 12 1 file changed, 12 deletions(-) diff --git a/dev-qt/qtcore/files/qtcore-4.8.5-moc-boost-lexical-cast.patch b/dev-qt/qtcore/files/qtcore-4.8.5-moc-boost-lexical-cast.patch deleted file mode 100644 index b464c92..000 --- a/dev-qt/qtcore/files/qtcore-4.8.5-moc-boost-lexical-cast.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: qt-everywhere-opensource-src-4.8./src/tools/moc/main.cpp -=== qt-everywhere-opensource-src-4.8..orig/src/tools/moc/main.cpp -+++ qt-everywhere-opensource-src-4.8./src/tools/moc/main.cpp -@@ -190,6 +190,7 @@ int runMoc(int _argc, char **_argv) - - // Workaround a bug while parsing the boost/type_traits/has_operator.hpp header. See QTBUG-22829 - pp.macros["BOOST_TT_HAS_OPERATOR_HPP_INCLUDED"]; -+pp.macros["BOOST_LEXICAL_CAST_INCLUDED"]; - - QByteArray filename; - QByteArray output;
[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/, dev-qt/qtcore/
commit: b13815a11545ddf9d5ef1db942ad7aea1d8c58c3 Author: Davide Pesavento gentoo org> AuthorDate: Tue Oct 20 01:35:27 2015 + Commit: Davide Pesavento gentoo org> CommitDate: Tue Oct 20 01:35:27 2015 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b13815a1 dev-qt/qtcore: fix build on ia64 Gentoo-Bug: 559802 Package-Manager: portage-2.2.23 .../qtcore/files/qtcore-5.5.1-qatomic_ia64.h.patch | 45 ++ dev-qt/qtcore/qtcore-5.5.1.ebuild | 4 ++ 2 files changed, 49 insertions(+) diff --git a/dev-qt/qtcore/files/qtcore-5.5.1-qatomic_ia64.h.patch b/dev-qt/qtcore/files/qtcore-5.5.1-qatomic_ia64.h.patch new file mode 100644 index 000..c45fd91 --- /dev/null +++ b/dev-qt/qtcore/files/qtcore-5.5.1-qatomic_ia64.h.patch @@ -0,0 +1,45 @@ +From deb6b5032c8eed35021b3c697a770645d90b11ed Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C3=89meric=20MASCHINO?=+Date: Wed, 9 Sep 2015 22:56:32 +0200 +Subject: [PATCH] Fixed compilation errors in qatomic_ia64.h + +QBasicAtomicOps::testAndSetRelaxed(T &, T, T) and +QBasicAtomicOps::testAndSetOrdered(T &, T, T) bodies don't match +any prototypes in qatomic_ia64.h: the optional parameter T *currentValue +is missing. + +Task-number: QTBUG-48197 +Change-Id: I0112c429b161b4a0ddb6e8a0400a436282ffb1c7 +Reviewed-by: Thiago Macieira +--- + src/corelib/arch/qatomic_ia64.h | 8 + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/corelib/arch/qatomic_ia64.h b/src/corelib/arch/qatomic_ia64.h +index c880e85..2ba6d12 100644 +--- a/src/corelib/arch/qatomic_ia64.h b/src/corelib/arch/qatomic_ia64.h +@@ -1035,16 +1035,16 @@ bool QBasicAtomicOps::deref(T &_q_value) Q_DECL_NOTHROW + } + + template template inline +-bool QBasicAtomicOps::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW ++bool QBasicAtomicOps::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue, T *currentValue) Q_DECL_NOTHROW + { +-return testAndSetAcquire(_q_value, expectedValue, newValue); ++return testAndSetAcquire(_q_value, expectedValue, newValue, currentValue); + } + + template template inline +-bool QBasicAtomicOps::testAndSetOrdered(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW ++bool QBasicAtomicOps::testAndSetOrdered(T &_q_value, T expectedValue, T newValue, T *currentValue) Q_DECL_NOTHROW + { + orderedMemoryFence(_q_value); +-return testAndSetAcquire(_q_value, expectedValue, newValue); ++return testAndSetAcquire(_q_value, expectedValue, newValue, currentValue); + } + + template template inline +-- +2.6.2 + diff --git a/dev-qt/qtcore/qtcore-5.5.1.ebuild b/dev-qt/qtcore/qtcore-5.5.1.ebuild index 6ba815b..9f42484 100644 --- a/dev-qt/qtcore/qtcore-5.5.1.ebuild +++ b/dev-qt/qtcore/qtcore-5.5.1.ebuild @@ -24,6 +24,10 @@ DEPEND=" " RDEPEND="${DEPEND}" +PATCHES=( + "${FILESDIR}/${P}-qatomic_ia64.h.patch" # bug 559802 +) + QT5_TARGET_SUBDIRS=( src/tools/bootstrap src/tools/moc