1 |
commit: 8110f4e742ce83572f258fc81481ae2c3cef4a97 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jan 30 21:27:33 2023 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 30 21:34:47 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8110f4e7 |
7 |
|
8 |
kde-frameworks/knewstuff: Fix crash in QQuickQuestionListener |
9 |
|
10 |
Backport upstream commit c8e5b36e190f8b71ac14e3afd403debdbe3cf9a8 |
11 |
|
12 |
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=464624 |
13 |
|
14 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
15 |
|
16 |
...102.0-fix-crash-in-QQuickQuestionListener.patch | 55 ++++++++++++++++++++++ |
17 |
.../knewstuff/knewstuff-5.102.0-r1.ebuild | 52 ++++++++++++++++++++ |
18 |
2 files changed, 107 insertions(+) |
19 |
|
20 |
diff --git a/kde-frameworks/knewstuff/files/knewstuff-5.102.0-fix-crash-in-QQuickQuestionListener.patch b/kde-frameworks/knewstuff/files/knewstuff-5.102.0-fix-crash-in-QQuickQuestionListener.patch |
21 |
new file mode 100644 |
22 |
index 000000000000..00bafeb28b93 |
23 |
--- /dev/null |
24 |
+++ b/kde-frameworks/knewstuff/files/knewstuff-5.102.0-fix-crash-in-QQuickQuestionListener.patch |
25 |
@@ -0,0 +1,55 @@ |
26 |
+From c8e5b36e190f8b71ac14e3afd403debdbe3cf9a8 Mon Sep 17 00:00:00 2001 |
27 |
+From: David Edmundson <kde@×××××××××××××××××.uk> |
28 |
+Date: Sun, 29 Jan 2023 13:33:09 +0000 |
29 |
+Subject: [PATCH] Fix crash in QQuickQuestionListener |
30 |
+ |
31 |
+The code path is: |
32 |
+ - we create a Question object |
33 |
+ - we show a prompt |
34 |
+ - we start a nested event loop to get this into a syncronous API |
35 |
+ - we return the result to the question object |
36 |
+ |
37 |
+The lifespan of the question object is not controlled by the listener, |
38 |
+during the nested event loop anything could have happened including |
39 |
+deletion. |
40 |
+ |
41 |
+BUG: 464624 |
42 |
+ |
43 |
+ |
44 |
+(cherry picked from commit e9e0e3faa986757ba096dbe599468f395b3461d3) |
45 |
+--- |
46 |
+ src/qtquick/quickquestionlistener.cpp | 5 +++-- |
47 |
+ 1 file changed, 3 insertions(+), 2 deletions(-) |
48 |
+ |
49 |
+diff --git a/src/qtquick/quickquestionlistener.cpp b/src/qtquick/quickquestionlistener.cpp |
50 |
+index 81123b33..f760ef39 100644 |
51 |
+--- a/src/qtquick/quickquestionlistener.cpp |
52 |
++++ b/src/qtquick/quickquestionlistener.cpp |
53 |
+@@ -10,6 +10,7 @@ |
54 |
+ #include "core/question.h" |
55 |
+ |
56 |
+ #include <QCoreApplication> |
57 |
++#include <QPointer> |
58 |
+ |
59 |
+ using namespace KNewStuffQuick; |
60 |
+ |
61 |
+@@ -35,7 +36,7 @@ public: |
62 |
+ Private() |
63 |
+ { |
64 |
+ } |
65 |
+- KNSCore::Question *question = nullptr; |
66 |
++ QPointer<KNSCore::Question> question; |
67 |
+ }; |
68 |
+ |
69 |
+ QuickQuestionListener *QuickQuestionListener::instance() |
70 |
+@@ -117,6 +118,6 @@ void KNewStuffQuick::QuickQuestionListener::passResponse(bool responseIsContinue |
71 |
+ break; |
72 |
+ } |
73 |
+ } |
74 |
+- d->question = nullptr; |
75 |
++ d->question.clear(); |
76 |
+ } |
77 |
+ } |
78 |
+-- |
79 |
+GitLab |
80 |
+ |
81 |
|
82 |
diff --git a/kde-frameworks/knewstuff/knewstuff-5.102.0-r1.ebuild b/kde-frameworks/knewstuff/knewstuff-5.102.0-r1.ebuild |
83 |
new file mode 100644 |
84 |
index 000000000000..2eb1ae629599 |
85 |
--- /dev/null |
86 |
+++ b/kde-frameworks/knewstuff/knewstuff-5.102.0-r1.ebuild |
87 |
@@ -0,0 +1,52 @@ |
88 |
+# Copyright 1999-2023 Gentoo Authors |
89 |
+# Distributed under the terms of the GNU General Public License v2 |
90 |
+ |
91 |
+EAPI=8 |
92 |
+ |
93 |
+ECM_DESIGNERPLUGIN="true" |
94 |
+ECM_TEST="false" |
95 |
+PVCUT=$(ver_cut 1-2) |
96 |
+QTMIN=5.15.5 |
97 |
+inherit ecm frameworks.kde.org |
98 |
+ |
99 |
+DESCRIPTION="Framework for downloading and sharing additional application data" |
100 |
+ |
101 |
+LICENSE="LGPL-2+" |
102 |
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" |
103 |
+IUSE="opds" |
104 |
+ |
105 |
+DEPEND=" |
106 |
+ >=dev-qt/qtdeclarative-${QTMIN}:5 |
107 |
+ >=dev-qt/qtgui-${QTMIN}:5 |
108 |
+ >=dev-qt/qtnetwork-${QTMIN}:5 |
109 |
+ >=dev-qt/qtwidgets-${QTMIN}:5 |
110 |
+ >=dev-qt/qtxml-${QTMIN}:5 |
111 |
+ =kde-frameworks/attica-${PVCUT}*:5 |
112 |
+ =kde-frameworks/karchive-${PVCUT}*:5 |
113 |
+ =kde-frameworks/kcompletion-${PVCUT}*:5 |
114 |
+ =kde-frameworks/kconfig-${PVCUT}*:5 |
115 |
+ =kde-frameworks/kcoreaddons-${PVCUT}*:5 |
116 |
+ =kde-frameworks/ki18n-${PVCUT}*:5 |
117 |
+ =kde-frameworks/kiconthemes-${PVCUT}*:5 |
118 |
+ =kde-frameworks/kio-${PVCUT}*:5 |
119 |
+ =kde-frameworks/kitemviews-${PVCUT}*:5 |
120 |
+ =kde-frameworks/kpackage-${PVCUT}*:5 |
121 |
+ =kde-frameworks/kservice-${PVCUT}*:5 |
122 |
+ =kde-frameworks/ktextwidgets-${PVCUT}*:5 |
123 |
+ =kde-frameworks/kwidgetsaddons-${PVCUT}*:5 |
124 |
+ =kde-frameworks/kxmlgui-${PVCUT}*:5 |
125 |
+ opds? ( =kde-frameworks/syndication-${PVCUT}*:5 ) |
126 |
+" |
127 |
+RDEPEND="${DEPEND} |
128 |
+ >=kde-frameworks/kirigami-${PVCUT}:5 |
129 |
+" |
130 |
+ |
131 |
+PATCHES=( "${FILESDIR}/${P}-fix-crash-in-QQuickQuestionListener.patch" ) # KDE-bug 464624 |
132 |
+ |
133 |
+src_configure() { |
134 |
+ local mycmakeargs=( |
135 |
+ $(cmake_use_find_package opds KF5Syndication) |
136 |
+ ) |
137 |
+ |
138 |
+ ecm_src_configure |
139 |
+} |