parent
4fc39601dd
commit
70f55d0ebc
3 changed files with 7 additions and 6 deletions
|
@ -125,11 +125,12 @@ uint NotificationsListener::Notify(const QString &appName, uint replacesId,
|
|||
return 0;
|
||||
|
||||
int urgency = -1;
|
||||
bool ok;
|
||||
if (hints.contains("urgency"))
|
||||
if (hints.contains("urgency")) {
|
||||
bool ok;
|
||||
urgency = hints["urgency"].toInt(&ok);
|
||||
if (!ok)
|
||||
urgency = -1;
|
||||
if (!ok)
|
||||
urgency = -1;
|
||||
}
|
||||
if (urgency > -1 && urgency < mPlugin->config()->get<int>("generalUrgency", 0))
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
class KdeConnectPlugin;
|
||||
class NotificationsDbusInterface;
|
||||
class Notification;
|
||||
class NotifyingApplication;
|
||||
struct NotifyingApplication;
|
||||
|
||||
class NotificationsListener : public QDBusAbstractAdaptor
|
||||
{
|
||||
|
|
|
@ -141,7 +141,7 @@ void TestNotificationListener::testNotify()
|
|||
plugin->config()->set("generalUrgency", 0);
|
||||
QCOMPARE(plugin->config()->get<bool>("generalPersistent"), false);
|
||||
QCOMPARE(plugin->config()->get<bool>("generalIncludeBody"), true);
|
||||
QCOMPARE(plugin->config()->get<bool>("generalUrgency"), 0);
|
||||
QCOMPARE(plugin->config()->get<bool>("generalUrgency"), false);
|
||||
|
||||
// applications are modified directly:
|
||||
listener->getApplications().clear();
|
||||
|
|
Loading…
Reference in a new issue