Set default action on notification
authorKai Uwe Broulik <kde@privat.broulik.de>
Tue, 30 Apr 2019 12:28:21 +0000 (14:28 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sun, 4 Aug 2019 19:17:17 +0000 (21:17 +0200)
This makes the entire notification popup clickable.
Also, mark the text for translation.

src/qtui/knotificationbackend.cpp

index 68717cd..feb0d26 100644 (file)
@@ -73,7 +73,7 @@ void KNotificationBackend::notify(const Notification& n)
             selectOverload<uint>(&KNotification::activated),
             this,
             selectOverload<>(&KNotificationBackend::notificationActivated));
-    notification->setActions(QStringList("View"));
+    notification->setDefaultAction(tr("View"));
     notification->setProperty("notificationId", n.notificationId);
 
     _notifications.append(qMakePair(n.notificationId, QPointer<KNotification>(notification)));