summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2022-07-26 13:59:00 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2022-07-26 14:04:53 +0200
commit7d4e696db0d3eecc1a05cb5d75a9b514b0af6690 (patch)
tree5a2a731546815d7d0bce8ea2579d242e4c853029 /kde-plasma
parentkde-plasma/discover: Fix submitting usefulness (diff)
downloadgentoo-7d4e696db0d3eecc1a05cb5d75a9b514b0af6690.tar.gz
gentoo-7d4e696db0d3eecc1a05cb5d75a9b514b0af6690.tar.bz2
gentoo-7d4e696db0d3eecc1a05cb5d75a9b514b0af6690.zip
kde-plasma/kdeplasma-addons: Fix comic strip widget crash
Upstream commit 352ecf9aa151e842f5304b8f4dc1fa7c7689b32f KDE-bug: https://bugs.kde.org/show_bug.cgi?id=406991 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-plasma')
-rw-r--r--kde-plasma/kdeplasma-addons/files/kdeplasma-addons-5.24.6-disable-actions-when-comic-is-not-ready.patch71
-rw-r--r--kde-plasma/kdeplasma-addons/kdeplasma-addons-5.24.6-r1.ebuild73
2 files changed, 144 insertions, 0 deletions
diff --git a/kde-plasma/kdeplasma-addons/files/kdeplasma-addons-5.24.6-disable-actions-when-comic-is-not-ready.patch b/kde-plasma/kdeplasma-addons/files/kdeplasma-addons-5.24.6-disable-actions-when-comic-is-not-ready.patch
new file mode 100644
index 000000000000..0ce0db252c6a
--- /dev/null
+++ b/kde-plasma/kdeplasma-addons/files/kdeplasma-addons-5.24.6-disable-actions-when-comic-is-not-ready.patch
@@ -0,0 +1,71 @@
+From 352ecf9aa151e842f5304b8f4dc1fa7c7689b32f Mon Sep 17 00:00:00 2001
+From: Nicolas Fella <nicolas.fella@gmx.de>
+Date: Wed, 20 Jul 2022 15:00:02 +0200
+Subject: [PATCH] [applets/comic] Disable most context menu actions when comic
+ is not ready
+
+This can be either because the loading failed or is not done yet
+
+In those cases the actions don't make sense and can lead to crashes
+
+BUG: 406991
+(cherry picked from commit 6a0aec81074135c210a2ed11127ef9cfb138dbca)
+---
+ applets/comic/comic.cpp | 3 +++
+ applets/comic/comicdata.cpp | 1 +
+ applets/comic/comicdata.h | 6 ++++++
+ 3 files changed, 10 insertions(+)
+
+diff --git a/applets/comic/comic.cpp b/applets/comic/comic.cpp
+index 1ad3e83a4..b4f8154fa 100644
+--- a/applets/comic/comic.cpp
++++ b/applets/comic/comic.cpp
+@@ -495,6 +495,9 @@ void ComicApplet::updateContextMenu()
+ {
+ if (mCurrent.id().isEmpty()) {
+ mActiveComicModel->clear();
++ }
++
++ if (mCurrent.id().isEmpty() || !mCurrent.ready()) {
+ mActionNextNewStripTab->setEnabled(false);
+ mActionGoFirst->setEnabled(false);
+ mActionGoLast->setEnabled(false);
+diff --git a/applets/comic/comicdata.cpp b/applets/comic/comicdata.cpp
+index 52cc57e91..60eb475c9 100644
+--- a/applets/comic/comicdata.cpp
++++ b/applets/comic/comicdata.cpp
+@@ -62,6 +62,7 @@ void ComicData::setData(const Plasma::DataEngine::Data &data)
+ mPrev = data[QStringLiteral("Previous identifier suffix")].toString();
+ mNext = data[QStringLiteral("Next identifier suffix")].toString();
+ mAdditionalText = data[QStringLiteral("Additional text")].toString();
++ mReady = true;
+ }
+
+ mWebsiteUrl = data[QStringLiteral("Website Url")].toUrl();
+diff --git a/applets/comic/comicdata.h b/applets/comic/comicdata.h
+index 9c884a291..b5f5ee3a7 100644
+--- a/applets/comic/comicdata.h
++++ b/applets/comic/comicdata.h
+@@ -190,6 +190,11 @@ public:
+ return mMaxStripNum;
+ }
+
++ bool ready() const
++ {
++ return mReady;
++ }
++
+ void save();
+
+ private:
+@@ -226,6 +231,7 @@ private:
+ bool mScaleComic = false;
+ bool mIsLeftToRight = false;
+ bool mIsTopToBottom = false;
++ bool mReady = false;
+
+ KConfigGroup mCfg;
+ };
+--
+GitLab
+
diff --git a/kde-plasma/kdeplasma-addons/kdeplasma-addons-5.24.6-r1.ebuild b/kde-plasma/kdeplasma-addons/kdeplasma-addons-5.24.6-r1.ebuild
new file mode 100644
index 000000000000..0a29de07ad2b
--- /dev/null
+++ b/kde-plasma/kdeplasma-addons/kdeplasma-addons-5.24.6-r1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_HANDBOOK="forceoptional"
+KFMIN=5.92.0
+PVCUT=$(ver_cut 1-3)
+QTMIN=5.15.4
+VIRTUALX_REQUIRED="test"
+inherit ecm plasma.kde.org optfeature
+
+DESCRIPTION="Extra Plasma applets and engines"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="5"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="share webengine"
+
+RESTRICT="test" # bug 727846
+
+DEPEND="
+ >=dev-qt/qtdbus-${QTMIN}:5
+ >=dev-qt/qtdeclarative-${QTMIN}:5
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ >=kde-frameworks/karchive-${KFMIN}:5
+ >=kde-frameworks/kcmutils-${KFMIN}:5
+ >=kde-frameworks/kcompletion-${KFMIN}:5
+ >=kde-frameworks/kconfig-${KFMIN}:5
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:5
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5
+ >=kde-frameworks/kdeclarative-${KFMIN}:5
+ >=kde-frameworks/kholidays-${KFMIN}:5
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ >=kde-frameworks/kio-${KFMIN}:5
+ >=kde-frameworks/knewstuff-${KFMIN}:5
+ >=kde-frameworks/knotifications-${KFMIN}:5
+ >=kde-frameworks/kpackage-${KFMIN}:5
+ >=kde-frameworks/krunner-${KFMIN}:5
+ >=kde-frameworks/kservice-${KFMIN}:5
+ >=kde-frameworks/kunitconversion-${KFMIN}:5
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+ >=kde-frameworks/kwindowsystem-${KFMIN}:5
+ >=kde-frameworks/kxmlgui-${KFMIN}:5
+ >=kde-frameworks/plasma-${KFMIN}:5
+ >=kde-frameworks/sonnet-${KFMIN}:5
+ share? ( >=kde-frameworks/purpose-${KFMIN}:5 )
+ webengine? ( >=dev-qt/qtwebengine-${QTMIN}:5 )
+"
+RDEPEND="${DEPEND}
+ >=dev-qt/qtquickcontrols-${QTMIN}:5
+ >=dev-qt/qtquickcontrols2-${QTMIN}:5
+ >=kde-plasma/plasma-workspace-${PVCUT}:5
+"
+
+PATCHES=( "${FILESDIR}/${P}-disable-actions-when-comic-is-not-ready.patch" ) # KDE-bug 406991
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake_use_find_package share KF5Purpose)
+ $(cmake_use_find_package webengine Qt5WebEngine)
+ )
+
+ ecm_src_configure
+}
+
+pkg_postinst() {
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ optfeature "Disk quota applet" sys-fs/quota
+ fi
+ ecm_pkg_postinst
+}