summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2023-01-30 22:27:33 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2023-01-30 22:34:47 +0100
commit8110f4e742ce83572f258fc81481ae2c3cef4a97 (patch)
tree826504326cf4d764eaf87aecd024ae5dcacb5c20 /kde-frameworks
parentdev-ml/dune-site: add 3.6.2 (diff)
downloadgentoo-8110f4e742ce83572f258fc81481ae2c3cef4a97.tar.gz
gentoo-8110f4e742ce83572f258fc81481ae2c3cef4a97.tar.bz2
gentoo-8110f4e742ce83572f258fc81481ae2c3cef4a97.zip
kde-frameworks/knewstuff: Fix crash in QQuickQuestionListener
Backport upstream commit c8e5b36e190f8b71ac14e3afd403debdbe3cf9a8 KDE-bug: https://bugs.kde.org/show_bug.cgi?id=464624 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-frameworks')
-rw-r--r--kde-frameworks/knewstuff/files/knewstuff-5.102.0-fix-crash-in-QQuickQuestionListener.patch55
-rw-r--r--kde-frameworks/knewstuff/knewstuff-5.102.0-r1.ebuild52
2 files changed, 107 insertions, 0 deletions
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
new file mode 100644
index 000000000000..00bafeb28b93
--- /dev/null
+++ b/kde-frameworks/knewstuff/files/knewstuff-5.102.0-fix-crash-in-QQuickQuestionListener.patch
@@ -0,0 +1,55 @@
+From c8e5b36e190f8b71ac14e3afd403debdbe3cf9a8 Mon Sep 17 00:00:00 2001
+From: David Edmundson <kde@davidedmundson.co.uk>
+Date: Sun, 29 Jan 2023 13:33:09 +0000
+Subject: [PATCH] Fix crash in QQuickQuestionListener
+
+The code path is:
+ - we create a Question object
+ - we show a prompt
+ - we start a nested event loop to get this into a syncronous API
+ - we return the result to the question object
+
+The lifespan of the question object is not controlled by the listener,
+during the nested event loop anything could have happened including
+deletion.
+
+BUG: 464624
+
+
+(cherry picked from commit e9e0e3faa986757ba096dbe599468f395b3461d3)
+---
+ src/qtquick/quickquestionlistener.cpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/qtquick/quickquestionlistener.cpp b/src/qtquick/quickquestionlistener.cpp
+index 81123b33..f760ef39 100644
+--- a/src/qtquick/quickquestionlistener.cpp
++++ b/src/qtquick/quickquestionlistener.cpp
+@@ -10,6 +10,7 @@
+ #include "core/question.h"
+
+ #include <QCoreApplication>
++#include <QPointer>
+
+ using namespace KNewStuffQuick;
+
+@@ -35,7 +36,7 @@ public:
+ Private()
+ {
+ }
+- KNSCore::Question *question = nullptr;
++ QPointer<KNSCore::Question> question;
+ };
+
+ QuickQuestionListener *QuickQuestionListener::instance()
+@@ -117,6 +118,6 @@ void KNewStuffQuick::QuickQuestionListener::passResponse(bool responseIsContinue
+ break;
+ }
+ }
+- d->question = nullptr;
++ d->question.clear();
+ }
+ }
+--
+GitLab
+
diff --git a/kde-frameworks/knewstuff/knewstuff-5.102.0-r1.ebuild b/kde-frameworks/knewstuff/knewstuff-5.102.0-r1.ebuild
new file mode 100644
index 000000000000..2eb1ae629599
--- /dev/null
+++ b/kde-frameworks/knewstuff/knewstuff-5.102.0-r1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_DESIGNERPLUGIN="true"
+ECM_TEST="false"
+PVCUT=$(ver_cut 1-2)
+QTMIN=5.15.5
+inherit ecm frameworks.kde.org
+
+DESCRIPTION="Framework for downloading and sharing additional application data"
+
+LICENSE="LGPL-2+"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="opds"
+
+DEPEND="
+ >=dev-qt/qtdeclarative-${QTMIN}:5
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=dev-qt/qtnetwork-${QTMIN}:5
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ >=dev-qt/qtxml-${QTMIN}:5
+ =kde-frameworks/attica-${PVCUT}*:5
+ =kde-frameworks/karchive-${PVCUT}*:5
+ =kde-frameworks/kcompletion-${PVCUT}*:5
+ =kde-frameworks/kconfig-${PVCUT}*:5
+ =kde-frameworks/kcoreaddons-${PVCUT}*:5
+ =kde-frameworks/ki18n-${PVCUT}*:5
+ =kde-frameworks/kiconthemes-${PVCUT}*:5
+ =kde-frameworks/kio-${PVCUT}*:5
+ =kde-frameworks/kitemviews-${PVCUT}*:5
+ =kde-frameworks/kpackage-${PVCUT}*:5
+ =kde-frameworks/kservice-${PVCUT}*:5
+ =kde-frameworks/ktextwidgets-${PVCUT}*:5
+ =kde-frameworks/kwidgetsaddons-${PVCUT}*:5
+ =kde-frameworks/kxmlgui-${PVCUT}*:5
+ opds? ( =kde-frameworks/syndication-${PVCUT}*:5 )
+"
+RDEPEND="${DEPEND}
+ >=kde-frameworks/kirigami-${PVCUT}:5
+"
+
+PATCHES=( "${FILESDIR}/${P}-fix-crash-in-QQuickQuestionListener.patch" ) # KDE-bug 464624
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake_use_find_package opds KF5Syndication)
+ )
+
+ ecm_src_configure
+}