Don't block starting notification service
ClosedPublic

Authored by davidedmundson on Jul 28 2017, 12:13 PM.

Details

Summary

We don't need to manually start the DBus service.
It blocks the calling app, and dbusServiceExists means that we will
always end up going the DBus route over a popup anyway, so it won't
do anything useful.

The service (in the plasma case plasma-wait-for-name) will be started
automatically when we actually send the notification.

BUG: 382444

Diff Detail

Repository
R289 KNotifications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
Restricted Application added a project: Frameworks. · View Herald TranscriptJul 28 2017, 12:13 PM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript

@dvratil has slightly more elaborate solution at https://phabricator.kde.org/D6960

No, his one still blocks. This doesn't.

Removing this call is in line with the advice in the dbus spec.

An improvement to the patch would be to remove bool startfdo.

Q_WS_WIN seems to suggest that windows always needs to start the service manually. That case would break with this patch.

Remove startFdo flag

Keep windows away from DBus activation

Better handle the service owner changing on a potentially
DBus activated notification handler

marten added a subscriber: marten.Aug 29 2017, 12:35 PM
mart accepted this revision.Aug 29 2017, 3:32 PM
This revision is now accepted and ready to land.Aug 29 2017, 3:32 PM

The patch looks clean, but I do not fully understand how is supposed to work. Perhaps an explanation of the different scenarios would help future readers of this code.

This revision was automatically updated to reflect the committed changes.