Let settings query for badge blacklist

Needed for Task Manager settings.
Also remove an assert that is often hit because it was wrong
wilder-5.19
Kai Uwe Broulik 7 years ago
parent 86260aba9a
commit 0c54b26dc2
  1. 1
      libnotificationmanager/notificationsmodel.cpp
  2. 5
      libnotificationmanager/settings.cpp
  3. 7
      libnotificationmanager/settings.h

@ -124,7 +124,6 @@ void NotificationsModel::Private::onNotificationReplaced(uint replacedId, const
return;
}
Q_ASSERT(notifications[row].id() == notification.id());
setupNotificationTimeout(notification);
notifications[row] = notification;

@ -505,6 +505,11 @@ QStringList Settings::historyBlacklistedServices() const
return d->behaviorMatchesList(d->servicesGroup(), ShowInHistory, false);
}
QStringList Settings::badgeBlacklistedApplications() const
{
return d->behaviorMatchesList(d->applicationsGroup(), ShowBadges, false);
}
QDateTime Settings::notificationsInhibitedUntil() const
{
return DoNotDisturbSettings::until();

@ -131,6 +131,11 @@ class NOTIFICATIONMANAGER_EXPORT Settings : public QObject
*/
Q_PROPERTY(QStringList historyBlacklistedServices READ historyBlacklistedServices NOTIFY settingsChanged)
/**
* A list of desktop entries of applications which shouldn't show badges in task manager.
*/
Q_PROPERTY(QStringList badgeBlacklistedApplications READ badgeBlacklistedApplications NOTIFY settingsChanged)
/**
* The date until which do not disturb mode is enabled.
*
@ -284,6 +289,8 @@ public:
QStringList historyBlacklistedApplications() const;
QStringList historyBlacklistedServices() const;
QStringList badgeBlacklistedApplications() const;
QDateTime notificationsInhibitedUntil() const;
void setNotificationsInhibitedUntil(const QDateTime &time);
void resetNotificationsInhibitedUntil();

Loading…
Cancel
Save