Check if there is an activatable service when notification service owner changes
Needs ReviewPublic

Authored by nicolasfella on Sun, Jan 12, 3:36 PM.

Details

Reviewers
broulik
Group Reviewers
Plasma
Summary

At notification backend initialization we don't just check whether the notification service exists but also whether one could be activated and treat it as existant then.
When the service owner changes (e.g. plasmashell is crashing) we check if a new service exists but not whether one could be activated. A notification coming in while plasmashell is crashed thus triggeres the horrible KPassivePopup fallback.

plasmashell itself is not DBus activatable, but it has a waitforname helper that is and forwards the notification to Plasma. With this patch instead of using the fallback we DBus-activate the helper and the notification appears as soon as Plasma is restarted.

Test Plan
  • application is started and sends notification after plasma started: No change
  • application sends notification before plasma is started: No change, notification is shown as soon as Plasma starts
  • application sends notification with running plasma, then plasma quits, application sends another notification, plasma restarts: Second notification is shown as soon as plasma starts instead of creating KPassivePopup

Diff Detail

Repository
R289 KNotifications
Branch
checkactivatable
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 21004
Build 21022: arc lint + arc unit
nicolasfella created this revision.Sun, Jan 12, 3:36 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptSun, Jan 12, 3:36 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
nicolasfella requested review of this revision.Sun, Jan 12, 3:36 PM
  • Move code

What again was the reason for not just sending a notification where DBus activation will do its thing?

nicolasfella added a comment.EditedMon, Jan 13, 8:09 AM

What again was the reason for not just sending a notification where DBus activation will do its thing?

Saving us futile DBus calls, but I don't know if that matters in practice though