* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/
@ 2016-04-16 17:18 Davide Pesavento
0 siblings, 0 replies; 7+ messages in thread
From: Davide Pesavento @ 2016-04-16 17:18 UTC (permalink / raw
To: gentoo-commits
commit: 747f6c364e25b498e02884780925d852502c6337
Author: Davide Pesavento <pesa <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 16 17:18:04 2016 +0000
Commit: Davide Pesavento <pesa <AT> gentoo <DOT> org>
CommitDate: Sat Apr 16 17:18:04 2016 +0000
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..0000000
--- 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.9999/src/tools/moc/main.cpp
-===================================================================
---- qt-everywhere-opensource-src-4.8.9999.orig/src/tools/moc/main.cpp
-+++ qt-everywhere-opensource-src-4.8.9999/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;
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/
@ 2017-12-28 10:03 Michael Palimaka
0 siblings, 0 replies; 7+ messages in thread
From: Michael Palimaka @ 2017-12-28 10:03 UTC (permalink / raw
To: gentoo-commits
commit: b9f5a9e8d3b5f03d93db6b5e8d5575f485371368
Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Thu Dec 28 07:30:45 2017 +0000
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Thu Dec 28 10:03:44 2017 +0000
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..00000000000
--- 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.000000000 -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;
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/
@ 2018-05-13 6:56 Andreas Sturmlechner
0 siblings, 0 replies; 7+ messages in thread
From: Andreas Sturmlechner @ 2018-05-13 6:56 UTC (permalink / raw
To: gentoo-commits
commit: ab4d3f0a64e8cd936fabe2eaa98ccef92a967da6
Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Sat May 12 15:25:49 2018 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun May 13 06:56:32 2018 +0000
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..00000000000
--- 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 <thiago.macieira@intel.com>
-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: I461e9fc7199748faa187ffff1416070f138df8db
-(cherry picked from commit 494376f980e96339b6f1eff7c41336ca4d853065)
-Discussed-again-on: http://lists.qt-project.org/pipermail/development/2016-October/027476.html
-Reviewed-by: Lars Knoll <lars.knoll@qt.io>
----
- 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 &fileName, 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 &fileName)
- {
- #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
-
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/
@ 2020-04-09 21:44 Andreas Sturmlechner
0 siblings, 0 replies; 7+ messages in thread
From: Andreas Sturmlechner @ 2020-04-09 21:44 UTC (permalink / raw
To: gentoo-commits
commit: 9c8bc45ef269f19e43aed9c361e7acb7504c3017
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 7 18:22:15 2020 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Apr 9 21:43:34 2020 +0000
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 <asturm <AT> 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 00000000000..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 <thiago.macieira@intel.com>
+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 <volker.hilsheimer@qt.io>
+Reviewed-by: David Faure <david.faure@kdab.com>
+---
+ 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(&mutex);
+ 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(&mutex);
+ 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 &attempt : 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());
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/
@ 2022-04-18 7:15 Sam James
0 siblings, 0 replies; 7+ messages in thread
From: Sam James @ 2022-04-18 7:15 UTC (permalink / raw
To: gentoo-commits
commit: 376ebf984ca9cf36f04b9812ce42f549f2d34a89
Author: Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Mon Apr 18 07:00:11 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Apr 18 07:15:43 2022 +0000
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 <mmk <AT> levelnine.at>
Signed-off-by: Sam James <sam <AT> 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..000000000000
--- a/dev-qt/qtcore/files/qtcore-5.14.1-cmake-macro-backward-compat.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From: Andreas Sturmlechner <asturm@gentoo.org>
-Date: Sun, 9 Feb 2020 11:45:00 +0100
-Subject: [PATCH] qtcore: Fix cmake macro compat. for upgrade from <Qt-5.14
-
-In upstream commit:
-
-https://code.qt.io/cgit/qt/qtbase.git/commit/?h=5.14&id=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 to >=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.000000000 +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..000000000000
--- 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?= <dilfridge@gentoo.org>
-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 <info@crimson.no>
- ** Copyright (C) 2013 John Layt <jlayt@kde.org>
- ** Contact: https://www.qt.io/licensing/
-@@ -43,19 +42,18 @@
- #include "qtimezoneprivate_p.h"
- #include "private/qlocale_tools_p.h"
-
--#include <QtCore/QDataStream>
--#include <QtCore/QDateTime>
- #include <QtCore/QFile>
--#include <QtCore/QHash>
- #include <QtCore/QMutex>
-+#include <QtCore/QHash>
-+#include <QtCore/QDataStream>
-+#include <QtCore/QDateTime>
-
- #include <qdebug.h>
--#include <qplatformdefs.h>
-
- #include <algorithm>
- #include <errno.h>
- #include <limits.h>
--#ifndef Q_OS_INTEGRITY
-+#if !defined(Q_OS_INTEGRITY)
- #include <sys/param.h> // to use MAXSYMLINKS constant
- #endif
- #include <unistd.h> // to use _SC_SYMLOOP_MAX constant
-@@ -1102,146 +1100,28 @@ QTimeZonePrivate::Data QTzTimeZonePrivate::previousTransition(qint64 beforeMSecs
- return last > tranCache().cbegin() ? dataForTzTransition(*--last) : invalidData();
- }
-
--bool QTzTimeZonePrivate::isTimeZoneIdAvailable(const QByteArray &ianaId) const
--{
-- return tzZones->contains(ianaId);
--}
--
--QList<QByteArray> QTzTimeZonePrivate::availableTimeZoneIds() const
--{
-- QList<QByteArray> result = tzZones->keys();
-- std::sort(result.begin(), result.end());
-- return result;
--}
--
--QList<QByteArray> QTzTimeZonePrivate::availableTimeZoneIds(QLocale::Country country) const
-+static long getSymloopMax()
- {
-- // TODO AnyCountry
-- QList<QByteArray> result;
-- for (auto it = tzZones->cbegin(), end = tzZones->cend(); it != end; ++it) {
-- if (it.value().country == country)
-- result << it.key();
-- }
-- std::sort(result.begin(), result.end());
-- return result;
--}
--
--// Getting the system zone's ID:
--
--namespace {
--class ZoneNameReader : public QObject
--{
--public:
-- QByteArray name()
-- {
-- /* Assumptions:
-- a) Systems don't change which of localtime and TZ they use without a
-- reboot.
-- b) When they change, they use atomic renames, hence a new device and
-- inode for the new file.
-- c) If we change which *name* is used for a zone, while referencing
-- the same final zoneinfo file, we don't care about the change of
-- name (e.g. if Europe/Oslo and Europe/Berlin are both symlinks to
-- the same CET file, continuing to use the old name, after
-- /etc/localtime changes which of the two it points to, is
-- harmless).
--
-- The alternative would be to use a file-system watcher, but they are a
-- scarce resource.
-- */
-- const StatIdent local = identify("/etc/localtime");
-- const StatIdent tz = identify("/etc/TZ");
-- if (!m_name.isEmpty() && m_last.isValid() && (m_last == local || m_last == tz))
-- return m_name;
--
-- m_name = etcLocalTime();
-- if (!m_name.isEmpty()) {
-- m_last = local;
-- return m_name;
-- }
--
-- m_name = etcTZ();
-- m_last = m_name.isEmpty() ? StatIdent() : tz;
-- return m_name;
-- }
--
--
--private:
-- QByteArray m_name;
-- struct StatIdent
-- {
-- static constexpr unsigned long bad = ~0ul;
-- unsigned long m_dev, m_ino;
-- StatIdent() : m_dev(bad), m_ino(bad) {}
-- StatIdent(const QT_STATBUF &data) : m_dev(data.st_dev), m_ino(data.st_ino) {}
-- bool isValid() { return m_dev != bad || m_ino != bad; }
-- bool operator==(const StatIdent &other)
-- { return other.m_dev == m_dev && other.m_ino == m_ino; }
-- };
-- StatIdent m_last;
--
-- static StatIdent identify(const char *path)
-- {
-- QT_STATBUF data;
-- return QT_STAT(path, &data) == -1 ? StatIdent() : StatIdent(data);
-- }
--
-- static QByteArray etcLocalTime()
-- {
-- // On most distros /etc/localtime is a symlink to a real file so extract
-- // name from the path
-- const QLatin1String zoneinfo("/zoneinfo/");
-- QString path = QStringLiteral("/etc/localtime");
-- long iteration = getSymloopMax();
-- // Symlink may point to another symlink etc. before being under zoneinfo/
-- // We stop on the first path under /zoneinfo/, even if it is itself a
-- // symlink, like America/Montreal pointing to America/Toronto
-- do {
-- path = QFile::symLinkTarget(path);
-- int index = path.indexOf(zoneinfo);
-- if (index >= 0) // Found zoneinfo file; extract zone name from path:
-- return path.midRef(index + zoneinfo.size()).toUtf8();
-- } while (!path.isEmpty() && --iteration > 0);
--
-- return QByteArray();
-- }
--
-- static QByteArray etcTZ()
-- {
-- // Some systems (e.g. uClibc) have a default value for $TZ in /etc/TZ:
-- const QString path = QStringLiteral("/etc/TZ");
-- QFile zone(path);
-- if (zone.open(QIODevice::ReadOnly))
-- return zone.readAll().trimmed();
--
-- return QByteArray();
-- }
--
-- // Any chain of symlinks longer than this is assumed to be a loop:
-- static long getSymloopMax()
-- {
--#ifdef SYMLOOP_MAX
-- // If defined, at runtime it can only be greater than this, so this is a safe bet:
-- return SYMLOOP_MAX;
-+#if defined(SYMLOOP_MAX)
-+ return SYMLOOP_MAX; // if defined, at runtime it can only be greater than this, so this is a safe bet
- #else
-- errno = 0;
-- long result = sysconf(_SC_SYMLOOP_MAX);
-- if (result >= 0)
-- return result;
-- // result is -1, meaning either error or no limit
-- Q_ASSERT(!errno); // ... but it can't be an error, POSIX mandates _SC_SYMLOOP_MAX
--
-- // therefore we can make up our own limit
--# ifdef MAXSYMLINKS
-- return MAXSYMLINKS;
-+ errno = 0;
-+ long result = sysconf(_SC_SYMLOOP_MAX);
-+ if (result >= 0)
-+ return result;
-+ // result is -1, meaning either error or no limit
-+ Q_ASSERT(!errno); // ... but it can't be an error, POSIX mandates _SC_SYMLOOP_MAX
-+
-+ // therefore we can make up our own limit
-+# if defined(MAXSYMLINKS)
-+ return MAXSYMLINKS;
- # else
-- return 8;
-+ return 8;
- # endif
- #endif
-- }
--};
- }
-
-+// TODO Could cache the value and monitor the required files for any changes
- QByteArray QTzTimeZonePrivate::systemTimeZoneId() const
- {
- // Check TZ env var first, if not populated try find it
-@@ -1256,9 +1136,28 @@ QByteArray QTzTimeZonePrivate::systemTimeZoneId() const
- else if (ianaId.startsWith(':'))
- ianaId = ianaId.mid(1);
-
-+ // On most distros /etc/localtime is a symlink to a real file so extract name from the path
-+ if (ianaId.isEmpty()) {
-+ const QLatin1String zoneinfo("/zoneinfo/");
-+ QString path = QFile::symLinkTarget(QStringLiteral("/etc/localtime"));
-+ int index = -1;
-+ long iteration = getSymloopMax();
-+ // Symlink may point to another symlink etc. before being under zoneinfo/
-+ // We stop on the first path under /zoneinfo/, even if it is itself a
-+ // symlink, like America/Montreal pointing to America/Toronto
-+ while (iteration-- > 0 && !path.isEmpty() && (index = path.indexOf(zoneinfo)) < 0)
-+ path = QFile::symLinkTarget(path);
-+ if (index >= 0) {
-+ // /etc/localtime is a symlink to the current TZ file, so extract from path
-+ ianaId = path.midRef(index + zoneinfo.size()).toUtf8();
-+ }
-+ }
-+
-+ // Some systems (e.g. uClibc) have a default value for $TZ in /etc/TZ:
- if (ianaId.isEmpty()) {
-- thread_local static ZoneNameReader reader;
-- ianaId = reader.name();
-+ QFile zone(QStringLiteral("/etc/TZ"));
-+ if (zone.open(QIODevice::ReadOnly))
-+ ianaId = zone.readAll().trimmed();
- }
-
- // Give up for now and return UTC
-@@ -1268,4 +1167,28 @@ QByteArray QTzTimeZonePrivate::systemTimeZoneId() const
- return ianaId;
- }
-
-+bool QTzTimeZonePrivate::isTimeZoneIdAvailable(const QByteArray &ianaId) const
-+{
-+ return tzZones->contains(ianaId);
-+}
-+
-+QList<QByteArray> QTzTimeZonePrivate::availableTimeZoneIds() const
-+{
-+ QList<QByteArray> result = tzZones->keys();
-+ std::sort(result.begin(), result.end());
-+ return result;
-+}
-+
-+QList<QByteArray> QTzTimeZonePrivate::availableTimeZoneIds(QLocale::Country country) const
-+{
-+ // TODO AnyCountry
-+ QList<QByteArray> result;
-+ for (auto it = tzZones->cbegin(), end = tzZones->cend(); it != end; ++it) {
-+ if (it.value().country == country)
-+ result << it.key();
-+ }
-+ std::sort(result.begin(), result.end());
-+ return result;
-+}
-+
- QT_END_NAMESPACE
---
-2.28.0
-
diff --git a/dev-qt/qtcore/files/qtcore-5.15.1-timezone-2.patch b/dev-qt/qtcore/files/qtcore-5.15.1-timezone-2.patch
deleted file mode 100644
index 611c979a469c..000000000000
--- a/dev-qt/qtcore/files/qtcore-5.15.1-timezone-2.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From ffc9093a199a542791920b30d1835c3248920aa0 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= <dilfridge@gentoo.org>
-Date: Sat, 10 Oct 2020 19:26:35 +0200
-Subject: [PATCH 2/2] Revert "Purge two old time-zone lookup fallbacks"
-
-This reverts commit b0383cbd388336f698ceeac11a4f50cdff931dd9.
----
- src/corelib/time/qtimezoneprivate_tz.cpp | 23 +++++++++++++++++++++++
- 1 file changed, 23 insertions(+)
-
-diff --git a/src/corelib/time/qtimezoneprivate_tz.cpp b/src/corelib/time/qtimezoneprivate_tz.cpp
-index 01f9a6cce0..eea6f5e962 100644
---- a/src/corelib/time/qtimezoneprivate_tz.cpp
-+++ b/src/corelib/time/qtimezoneprivate_tz.cpp
-@@ -1153,6 +1153,29 @@ QByteArray QTzTimeZonePrivate::systemTimeZoneId() const
- }
- }
-
-+ // On Debian Etch up to Jessie, /etc/localtime is a copy of the relevant
-+ // zoneinfo file, whose name is recorded in /etc/timezone:
-+ if (ianaId.isEmpty()) {
-+ QFile tzif(QStringLiteral("/etc/timezone"));
-+ if (tzif.open(QIODevice::ReadOnly))
-+ ianaId = tzif.readAll().trimmed();
-+ }
-+
-+ // On some Red Hat distros /etc/localtime is real file with name held in /etc/sysconfig/clock
-+ // in a line like ZONE="Europe/Oslo" or TIMEZONE="Europe/Oslo"
-+ if (ianaId.isEmpty()) {
-+ QFile tzif(QStringLiteral("/etc/sysconfig/clock"));
-+ if (tzif.open(QIODevice::ReadOnly)) {
-+ while (ianaId.isEmpty() && !tzif.atEnd()) {
-+ const QByteArray line(tzif.readLine().trimmed());
-+ if (line.startsWith("ZONE="))
-+ ianaId = line.mid(6, line.length() - 7);
-+ else if (line.startsWith("TIMEZONE="))
-+ ianaId = line.mid(10, line.length() - 11);
-+ }
-+ }
-+ }
-+
- // Some systems (e.g. uClibc) have a default value for $TZ in /etc/TZ:
- if (ianaId.isEmpty()) {
- QFile zone(QStringLiteral("/etc/TZ"));
---
-2.28.0
-
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/
@ 2022-12-10 12:25 Andreas Sturmlechner
0 siblings, 0 replies; 7+ messages in thread
From: Andreas Sturmlechner @ 2022-12-10 12:25 UTC (permalink / raw
To: gentoo-commits
commit: a28e37a50372eb61fc0e9f1d3a65f3a7914a969c
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 10 12:15:08 2022 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Dec 10 12:23:51 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a28e37a5
dev-qt/qtcore: Drop obsolete patches
Signed-off-by: Andreas Sturmlechner <asturm <AT> 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..000000000000
--- 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 <volker.hilsheimer@qt.io>
-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 <qt_ci_bot@qt-project.org>
-Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
-(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<QAbstractDeclarativeDataImpl*>(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<tst_QObject>::Value);
- Q_STATIC_ASSERT(!QtPrivate::HasQ_OBJECT_Macro<SiblingDeleter>::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
-+*/
-+namespace QtDeclarative {
-+static QAbstractDeclarativeData *theData;
-+
-+static void destroyed(QAbstractDeclarativeData *data, QObject *)
-+{
-+ QCOMPARE(data, theData);
-+}
-+static void signalEmitted(QAbstractDeclarativeData *data, QObject *, int, void **)
-+{
-+ QCOMPARE(data, theData);
-+}
-+// we can't use QCOMPARE in the next two functions, as they don't return void
-+static int receivers(QAbstractDeclarativeData *data, const QObject *, int)
-+{
-+ QTest::qCompare(data, theData, "data", "theData", __FILE__, __LINE__);
-+ return 0;
-+}
-+static bool isSignalConnected(QAbstractDeclarativeData *data, const QObject *, int)
-+{
-+ QTest::qCompare(data, theData, "data", "theData", __FILE__, __LINE__);
-+ return true;
-+}
-+
-+class Object : public QObject
-+{
-+ Q_OBJECT
-+public:
-+ using QObject::QObject;
-+ ~Object()
-+ {
-+ if (Object *p = static_cast<Object *>(parent()))
-+ p->emitSignal();
-+ }
-+
-+ void emitSignal()
-+ {
-+ emit theSignal();
-+ }
-+
-+signals:
-+ void theSignal();
-+};
-+
-+}
-+#endif
-+
-+void tst_QObject::declarativeData()
-+{
-+#ifdef QT_BUILD_INTERNAL
-+ QScopedValueRollback destroyed(QAbstractDeclarativeData::destroyed,
-+ QtDeclarative::destroyed);
-+ QScopedValueRollback signalEmitted(QAbstractDeclarativeData::signalEmitted,
-+ QtDeclarative::signalEmitted);
-+ QScopedValueRollback receivers(QAbstractDeclarativeData::receivers,
-+ QtDeclarative::receivers);
-+ QScopedValueRollback isSignalConnected(QAbstractDeclarativeData::isSignalConnected,
-+ QtDeclarative::isSignalConnected);
-+
-+ QtDeclarative::Object p;
-+ QObjectPrivate *priv = QObjectPrivate::get(&p);
-+ priv->declarativeData = QtDeclarative::theData = new QAbstractDeclarativeData;
-+
-+ connect(&p, &QtDeclarative::Object::theSignal, &p, []{
-+ });
-+
-+ QtDeclarative::Object *child = new QtDeclarative::Object;
-+ child->setParent(&p);
-+#endif
-+}
-+
- QTEST_MAIN(tst_QObject)
- #include "tst_qobject.moc"
---
-GitLab
-
diff --git a/dev-qt/qtcore/files/qtcore-5.15.5-hack_never_use_execinfo.patch b/dev-qt/qtcore/files/qtcore-5.15.5-hack_never_use_execinfo.patch
deleted file mode 100644
index c74de19c6144..000000000000
--- a/dev-qt/qtcore/files/qtcore-5.15.5-hack_never_use_execinfo.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-QtCore only links with -lexecinfo on *bsd and
-incorrectly assumes it's already linked on Linux
-if execinfo.h exists.
-
-This is a fix specificallly for non-glibc systems, was written for musl.
-We'll look to add a build system option for libexecinfo in future.
-
----
- src/corelib/global/qlogging.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
-index 89f49324..1c34a1af 100644
---- a/src/corelib/global/qlogging.cpp
-+++ b/src/corelib/global/qlogging.cpp
-@@ -106,7 +106,7 @@
- # if __UCLIBC_HAS_BACKTRACE__
- # define QLOGGING_HAVE_BACKTRACE
- # endif
--# elif (defined(__GLIBC__) && defined(__GLIBCXX__)) || (__has_include(<cxxabi.h>) && __has_include(<execinfo.h>))
-+# elif (defined(__GLIBC__) && defined(__GLIBCXX__))
- # define QLOGGING_HAVE_BACKTRACE
- # endif
- #endif
---
-2.35.1
-
diff --git a/dev-qt/qtcore/files/qtcore-5.15.5-slibtool.patch b/dev-qt/qtcore/files/qtcore-5.15.5-slibtool.patch
deleted file mode 100644
index a7ae5702cb4d..000000000000
--- a/dev-qt/qtcore/files/qtcore-5.15.5-slibtool.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From beebf54552e85c07496aa748710df76131620834 Mon Sep 17 00:00:00 2001
-From: Andreas Sturmlechner <asturm@gentoo.org>
-Date: Sun, 17 Jul 2022 17:43:27 +0200
-Subject: [PATCH] Remove quoting around $MAKE call
-
-Fixes build with e.g. MAKE='make libtool=...'
-
-Gentoo-bug: https://bugs.gentoo.org/792804
-Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
----
- configure | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure b/configure
-index b6c9b462..096706b0 100755
---- a/configure
-+++ b/configure
-@@ -795,7 +795,7 @@ setBootstrapVariable()
-
- if [ "$OPT_VERBOSE" = yes ]; then
- # Show the output of make
-- (cd "$outpath/qmake"; "$MAKE") || exit 2
-+ (cd "$outpath/qmake"; $MAKE) || exit 2
- else
- # Hide the output of make
- # Use bash to print dots, if we have it, and stdout is a tty.
---
-2.35.1
-
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/
@ 2023-02-05 22:37 Andreas Sturmlechner
0 siblings, 0 replies; 7+ messages in thread
From: Andreas Sturmlechner @ 2023-02-05 22:37 UTC (permalink / raw
To: gentoo-commits
commit: 957b23ec2630a603c6c00905f21529b9c4bc4653
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 5 22:37:17 2023 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Feb 5 22:37:17 2023 +0000
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 <asturm <AT> 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 000000000000..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 <sitter@kde.org>
+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<void()> 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
+
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-02-05 22:37 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-09 21:44 [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/ Andreas Sturmlechner
-- strict thread matches above, loose matches on Subject: below --
2023-02-05 22:37 Andreas Sturmlechner
2022-12-10 12:25 Andreas Sturmlechner
2022-04-18 7:15 Sam James
2018-05-13 6:56 Andreas Sturmlechner
2017-12-28 10:03 Michael Palimaka
2016-04-16 17:18 Davide Pesavento
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox