Support "default actions", as specified in [1].

Authored by albertvaka on Jan 15 2017, 3:32 PM.

Description

Support "default actions", as specified in [1].

Summary:
Default actions are the actions triggered when the notification is simply
clicked, without adding any "action buttons". Until now, with
KNotifications we could only make notifications that go away when clicked,
which might not be what the user expects (see notifications on smartphones
or other desktop environments).

Since KNotifications uses an int->name mapping (instead of string->name),
we need to manually convert between "default" and "0". Interestingly
enough, there was already code to handle the action "0" and emit
activated(), which is documented as "Emitted only when the default
activation has occurred" but in practice was never actually used.

[1] https://people.gnome.org/~mccann/docs/notification-spec/notification-spec-latest.html

Test Plan: Tests pass.

Reviewers: Frameworks, VDG, mart

Reviewed By: mart

Subscribers: colomar, broulik, mart, Frameworks

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D4142

Details

Committed
albertvakaJan 16 2017, 9:48 PM
Reviewer
mart
Differential Revision
D4142: Support "default actions", as specified in [1].
Parents
R289:923518cee5e4: Prefer nullptr over Q_NULLPTR
Branches
Unknown
Tags
Unknown