From 77a74860439818d13743388c8a75f2f8f1372f3b Mon Sep 17 00:00:00 2001 From: rsadowski Date: Mon, 25 May 2026 16:19:30 +0000 Subject: [PATCH] Backport faf0e944008a8ce3182e11a2ee192b1589c5661a libnotificationmanager: Return something of the correct type for most roles from kde-distro-packagers@kde.org: "we found a regression in Qt 6.11.1 that breaks the job tracker of notifications, them not closing properly, among other things, which is a quite high profile issue. I would therefore suggest if you ship Qt 6.11.1 that you backport this change for plasma-workspace [1] since Plasma 6.6.6 is still a couple of weeks away. To our knowledge, Qt 6.11.0 and earlier are not affected. We do not have a Qt fix yet afaik." -- Kai Uwe See also https://bugs.kde.org/show_bug.cgi?id=520120 --- x11/kde-plasma/plasma-workspace/Makefile | 1 + ...patch-libnotificationmanager_jobsmodel_cpp | 43 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 x11/kde-plasma/plasma-workspace/patches/patch-libnotificationmanager_jobsmodel_cpp diff --git a/x11/kde-plasma/plasma-workspace/Makefile b/x11/kde-plasma/plasma-workspace/Makefile index 487b7a14bfd..885da53c148 100644 --- a/x11/kde-plasma/plasma-workspace/Makefile +++ b/x11/kde-plasma/plasma-workspace/Makefile @@ -1,5 +1,6 @@ COMMENT = various components needed to run a Plasma-based environment DISTNAME = plasma-workspace-${VERSION} +REVISION = 0 SHARED_LIBS += kfontinst 1.0 # 0.0 SHARED_LIBS += kfontinstui 2.0 # 0.0 diff --git a/x11/kde-plasma/plasma-workspace/patches/patch-libnotificationmanager_jobsmodel_cpp b/x11/kde-plasma/plasma-workspace/patches/patch-libnotificationmanager_jobsmodel_cpp new file mode 100644 index 00000000000..7b6ab0b0ce7 --- /dev/null +++ b/x11/kde-plasma/plasma-workspace/patches/patch-libnotificationmanager_jobsmodel_cpp @@ -0,0 +1,43 @@ +https://invent.kde.org/plasma/plasma-workspace/-/commit/faf0e944008a8ce3182e11a2ee192b1589c5661a + +Index: libnotificationmanager/jobsmodel.cpp +--- libnotificationmanager/jobsmodel.cpp.orig ++++ libnotificationmanager/jobsmodel.cpp +@@ -145,8 +145,37 @@ QVariant JobsModel::data(const QModelIndex &index, int + // There's hardly a reason why it should show up as "unread". + case Notifications::ReadRole: + return true; ++ ++ // Qt doesn't like the model not returning anything, for example ++ // casting it to "undefined" as a string (when put in a required property string) ++ // blowing up in client code left and right. ++ case Notifications::NotifyRcNameRole: ++ case Notifications::OriginNameRole: ++ case Notifications::DefaultActionLabelRole: ++ case Notifications::ConfigureActionLabelRole: ++ case Notifications::ReplyActionLabelRole: ++ case Notifications::ReplyPlaceholderTextRole: ++ case Notifications::ReplySubmitButtonTextRole: ++ case Notifications::ReplySubmitButtonIconNameRole: ++ case Notifications::CategoryRole: ++ return QString(); ++ ++ case Notifications::ActionNamesRole: + case Notifications::ActionLabelsRole: + return QStringList(); ++ ++ case Notifications::HasDefaultActionRole: ++ case Notifications::ResidentRole: ++ case Notifications::TransientRole: ++ case Notifications::UserActionFeedbackRole: ++ case Notifications::HasReplyActionRole: ++ return false; ++ ++ case Notifications::UrlsRole: ++ return QVariant::fromValue(QList()); ++ ++ case Notifications::UrgencyRole: ++ return Notifications::NormalUrgency; + } + + return {};