mirror of
https://github.com/openbsd/ports.git
synced 2026-06-17 23:13:55 +02:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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<QUrl>());
|
||||
+
|
||||
+ case Notifications::UrgencyRole:
|
||||
+ return Notifications::NormalUrgency;
|
||||
}
|
||||
|
||||
return {};
|
||||
Reference in New Issue
Block a user