Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtcore/files/
Date: Sun, 13 May 2018 06:56:54
Message-Id: 1526194592.ab4d3f0a64e8cd936fabe2eaa98ccef92a967da6.asturm@gentoo
1 commit: ab4d3f0a64e8cd936fabe2eaa98ccef92a967da6
2 Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Sat May 12 15:25:49 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sun May 13 06:56:32 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab4d3f0a
7
8 dev-qt/qtcore: remove unused patch
9
10 Closes: https://github.com/gentoo/gentoo/pull/8368
11
12 dev-qt/qtcore/files/qtcore-5.6.2-plugins.patch | 81 --------------------------
13 1 file changed, 81 deletions(-)
14
15 diff --git a/dev-qt/qtcore/files/qtcore-5.6.2-plugins.patch b/dev-qt/qtcore/files/qtcore-5.6.2-plugins.patch
16 deleted file mode 100644
17 index d969869c085..00000000000
18 --- a/dev-qt/qtcore/files/qtcore-5.6.2-plugins.patch
19 +++ /dev/null
20 @@ -1,81 +0,0 @@
21 -From ca4d93d85ee446c5e30ec8e7814651e45cbf1218 Mon Sep 17 00:00:00 2001
22 -From: Thiago Macieira <thiago.macieira@×××××.com>
23 -Date: Thu, 12 Nov 2015 10:14:51 -0800
24 -Subject: Stop unloading plugins in QPluginLoader and QFactoryLoader
25 -
26 -QPluginLoader hasn't unloaded in its destructor since Qt 5.0, but we
27 -missed the equivalent code in QFactoryLoader (which bypasses
28 -QPluginLoader). Besides, QPluginLoader::unload() was still doing
29 -unloading, which it won't anymore.
30 -
31 -Not unloading plugins is Qt's policy, as decided during the 5.0
32 -development process and reaffirmed now in 5.6. This is due to static
33 -data in plugins leaking out and remaining in use past the unloading of
34 -the plugin, causing crashes.
35 -
36 -This does not affect QLibrary and QLibrary::unload(). Those are meant
37 -for non-Qt loadable modules, so unloading them may be safe.
38 -
39 -Task-number: QTBUG-49061
40 -Discussed-on: http://lists.qt-project.org/pipermail/development/2015-November/023681.html
41 -Change-Id: I461e9fc7199748faa187ffff1416070f138df8db
42 -(cherry picked from commit 494376f980e96339b6f1eff7c41336ca4d853065)
43 -Discussed-again-on: http://lists.qt-project.org/pipermail/development/2016-October/027476.html
44 -Reviewed-by: Lars Knoll <lars.knoll@××.io>
45 ----
46 - src/corelib/plugin/qfactoryloader.cpp | 6 ++++--
47 - src/corelib/plugin/qpluginloader.cpp | 5 +++--
48 - 2 files changed, 7 insertions(+), 4 deletions(-)
49 -
50 -diff --git a/src/corelib/plugin/qfactoryloader.cpp b/src/corelib/plugin/qfactoryloader.cpp
51 -index dcf1b1a..b6558f5 100644
52 ---- a/src/corelib/plugin/qfactoryloader.cpp
53 -+++ b/src/corelib/plugin/qfactoryloader.cpp
54 -@@ -208,10 +208,12 @@ void QFactoryLoader::update()
55 - ++keyUsageCount;
56 - }
57 - }
58 -- if (keyUsageCount || keys.isEmpty())
59 -+ if (keyUsageCount || keys.isEmpty()) {
60 -+ library->setLoadHints(QLibrary::PreventUnloadHint); // once loaded, don't unload
61 - d->libraryList += library;
62 -- else
63 -+ } else {
64 - library->release();
65 -+ }
66 - }
67 - }
68 - #else
69 -diff --git a/src/corelib/plugin/qpluginloader.cpp b/src/corelib/plugin/qpluginloader.cpp
70 -index 37f2368..0ea8280 100644
71 ---- a/src/corelib/plugin/qpluginloader.cpp
72 -+++ b/src/corelib/plugin/qpluginloader.cpp
73 -@@ -148,6 +148,7 @@ QPluginLoader::QPluginLoader(const QString &fileName, QObject *parent)
74 - : QObject(parent), d(0), did_load(false)
75 - {
76 - setFileName(fileName);
77 -+ setLoadHints(QLibrary::PreventUnloadHint);
78 - }
79 -
80 - /*!
81 -@@ -342,7 +343,7 @@ static QString locatePlugin(const QString& fileName)
82 - void QPluginLoader::setFileName(const QString &fileName)
83 - {
84 - #if defined(QT_SHARED)
85 -- QLibrary::LoadHints lh;
86 -+ QLibrary::LoadHints lh = QLibrary::PreventUnloadHint;
87 - if (d) {
88 - lh = d->loadHints();
89 - d->release();
90 -@@ -391,7 +392,7 @@ Q_GLOBAL_STATIC(StaticPluginList, staticPluginList)
91 - \brief Give the load() function some hints on how it should behave.
92 -
93 - You can give hints on how the symbols in the plugin are
94 -- resolved. By default, none of the hints are set.
95 -+ resolved. By default since Qt 5.7, QLibrary::PreventUnloadHint is set.
96 -
97 - See the documentation of QLibrary::loadHints for a complete
98 - description of how this property works.
99 ---
100 -cgit v1.0-4-g1e03
101 -