X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fknotificationbackend.cpp;h=8d1b4cd75fc97c4af4c488a3edc74cc31142da7a;hb=e567422cdd0e3c805d4bb37b81d532cb762b983e;hp=68717cd4717fd22623fd00480cbc1275691ff0d2;hpb=d46e1e86c9869996285ac3f88970cf0e9e23e128;p=quassel.git diff --git a/src/qtui/knotificationbackend.cpp b/src/qtui/knotificationbackend.cpp index 68717cd4..8d1b4cd7 100644 --- a/src/qtui/knotificationbackend.cpp +++ b/src/qtui/knotificationbackend.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2019 by the Quassel Project * + * Copyright (C) 2005-2020 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -25,6 +25,7 @@ #include #include +#include #include "client.h" #include "icon.h" @@ -73,7 +74,11 @@ void KNotificationBackend::notify(const Notification& n) selectOverload(&KNotification::activated), this, selectOverload<>(&KNotificationBackend::notificationActivated)); - notification->setActions(QStringList("View")); +#if KNOTIFICATIONS_VERSION >= QT_VERSION_CHECK(5,31,0) + notification->setDefaultAction(tr("View")); +#else + notification->setActions(QStringList{tr("View")}); +#endif notification->setProperty("notificationId", n.notificationId); _notifications.append(qMakePair(n.notificationId, QPointer(notification)));