[Devicenotifications Engine] Keep at most one notification per UDI
Summary:
Each notification was created as new datasource, and was newer removed
as long as the engine exists. This is especially bad for long living
applets like the device notifier. As there can only be one notification
per device (the last error state, or none), use the UDI as source name
and update the contents.
Also cancel (remove source) an old notifications in case of a successful
setup, otherwise old error messages are shown in the device notifier.
Test Plan:
in Dolphin, select "Release" (context menu) for a mounted CD
-> Notification in device notifier appears "Device can be safely removed"
remount without ejecting
-> Notification message is removed, device shows "mounted" emblem.
Without the change, the message stayed and the device kept the notification
emblem "(!)".
Reviewers: Frameworks, broulik
Reviewed By: broulik
Subscribers: broulik, plasma-devel
Tags: Plasma
Differential Revision: https://phabricator.kde.org/D15892