kde-plasma/drkonqi: backport crash fix

As recommended by upstream [0].

[0] https://mail.kde.org/pipermail/distributions/2026-May/001693.html

Bug: https://bugs.kde.org/517353
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2026-05-27 11:32:27 +01:00
parent 578b6ea0b9
commit 95a1c02a23
2 changed files with 146 additions and 0 deletions

View File

@@ -0,0 +1,78 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
ECM_TEST="true"
PYTHON_COMPAT=( python3_{11..14} )
KFMIN=6.22.0
QTMIN=6.10.1
inherit ecm plasma.kde.org python-single-r1 xdg
DESCRIPTION="Plasma crash handler, gives the user feedback if a program crashed"
LICENSE="GPL-2" # TODO: CHECK
SLOT="6"
KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86"
IUSE=""
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
COMMON_DEPEND="${PYTHON_DEPS}
>=dev-qt/qtbase-${QTMIN}:6[dbus,gui,network,widgets]
>=dev-qt/qtdeclarative-${QTMIN}:6
>=kde-frameworks/kconfig-${KFMIN}:6
>=kde-frameworks/kcoreaddons-${KFMIN}:6
>=kde-frameworks/kcrash-${KFMIN}:6
>=kde-frameworks/ki18n-${KFMIN}:6
>=kde-frameworks/kidletime-${KFMIN}:6
>=kde-frameworks/kio-6.22.1:6
>=kde-frameworks/kjobwidgets-${KFMIN}:6
>=kde-frameworks/knotifications-${KFMIN}:6
>=kde-frameworks/kservice-${KFMIN}:6
>=kde-frameworks/kstatusnotifieritem-${KFMIN}:6
>=kde-frameworks/kwallet-${KFMIN}:6
>=kde-frameworks/kwidgetsaddons-${KFMIN}:6
>=kde-frameworks/kwindowsystem-${KFMIN}:6
>=kde-frameworks/syntax-highlighting-${KFMIN}:6
>=sys-apps/systemd-254:=
>=sys-auth/polkit-qt-0.175.0[qt6(+)]
"
DEPEND="${COMMON_DEPEND}
>=dev-qt/qtbase-${QTMIN}:6[concurrent]
test? ( >=dev-qt/qtbase-${QTMIN}:6[network] )
"
RDEPEND="${COMMON_DEPEND}
|| (
dev-libs/elfutils[utils]
>=dev-debug/gdb-18
)
>=kde-frameworks/kirigami-${KFMIN}:6
>=kde-frameworks/kitemmodels-${KFMIN}:6
$(python_gen_cond_dep '
dev-python/psutil[${PYTHON_USEDEP}]
')
|| (
>=dev-debug/gdb-12
llvm-core/lldb
)
"
PATCHES=(
"${FILESDIR}"/${PN}-6.6.5-crash-fix.patch # KDE-bug: 517353
)
src_configure() {
local mycmakeargs=(
-DWITH_PYTHON_VENDORING=OFF
)
ecm_src_configure
}
src_test() {
# needs network access, bug #698510
local myctestargs=(
-E "(connectiontest)"
)
ecm_src_test
}

View File

@@ -0,0 +1,68 @@
https://mail.kde.org/pipermail/distributions/2026-May/001693.html
https://invent.kde.org/plasma/drkonqi/-/commit/8f02653eb1cd3b980f49b629f8907c96ac44874b
From 8f02653eb1cd3b980f49b629f8907c96ac44874b Mon Sep 17 00:00:00 2001
From: Harald Sitter <sitter@kde.org>
Date: Fri, 22 May 2026 11:18:26 +0200
Subject: [PATCH] workaround crash inside knotification/qt
knotification does html stripping which internally required qtgui.
temporarily promote it to gui type so it doesn't crash.
should be undone once we depend on qt 6.12.
also a more robust html stripping would be appreciated.
BUG: 517353
(cherry picked from commit f1552403d5a1e3bd89fff9fa240abee9a8d51979)
Co-authored-by: Harald Sitter <sitter@kde.org>
---
CMakeLists.txt | 4 ++++
src/coredump/launcher/main.cpp | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bb0e89801..2d3059970 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,6 +6,10 @@ set(PROJECT_VERSION "6.6.5")
set(QT_MIN_VERSION "6.10.0")
set(KF6_MIN_VERSION "6.22.0")
+if(${QT_MIN_VERSION} VERSION_GREATER_EQUAL "6.12.0")
+ message(FATAL_ERROR "Turn drkonqi-coredump-launcher into a qcoreapplication! https://bugs.kde.org/show_bug.cgi?id=517353")
+endif()
+
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
diff --git a/src/coredump/launcher/main.cpp b/src/coredump/launcher/main.cpp
index 14f00f25d..2e3887cab 100644
--- a/src/coredump/launcher/main.cpp
+++ b/src/coredump/launcher/main.cpp
@@ -9,10 +9,10 @@
#include <chrono>
-#include <QCoreApplication>
#include <QDebug>
#include <QDir>
#include <QFile>
+#include <QGuiApplication>
#include <QJsonDocument>
#include <QLibraryInfo>
#include <QProcess>
@@ -245,7 +245,7 @@ static void onNewDump(const Coredump &dump)
int main(int argc, char **argv)
{
- QCoreApplication app(argc, argv);
+ QGuiApplication app(argc, argv);
app.setApplicationName(QStringLiteral("drkonqi-coredump-launcher"));
app.setOrganizationDomain(QStringLiteral("kde.org"));
--
GitLab