Making sure that DBus objects are all created before the service

Authored by feverfew on Sep 2 2019, 11:00 AM.



Currently the DBus service is created before the MainWindow DBus object is
created. This can cause hangs if another service makes calls to a a method
in an object that's not been initialised, when the service is already published.
This patch defers the creation of the service until all DBus objects are

Test Plan

Tested in KDevelop. Have "open new folders in tabs" feature enabled.
Open several folders with Dolphin at once. Before this patch
there would be noticeable hanging. With this patch all tabs instantly open with
no hanging.

Diff Detail

R318 Dolphin
DBusFix (branched from master)
No Linters Available
No Unit Test Coverage
Build Status
Buildable 16000
Build 16018: arc lint + arc unit
feverfew created this revision.Sep 2 2019, 11:00 AM
Restricted Application added a project: Dolphin. · View Herald TranscriptSep 2 2019, 11:00 AM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
feverfew requested review of this revision.Sep 2 2019, 11:00 AM
feverfew edited the test plan for this revision. (Show Details)Sep 2 2019, 11:24 AM
elvisangelaccio added inline comments.Sep 2 2019, 6:35 PM

What about this code path? Previously it would create the dbus objects, now with this patch it would not. Is that a problem?

feverfew added inline comments.Sep 2 2019, 8:08 PM

No, if the code reaches here, this instance was basically a glorified URL forwarder, and we wouldn't want it to be reachable via DBus at all.

elvisangelaccio accepted this revision.Sep 2 2019, 8:23 PM

Go for it ;)

This revision is now accepted and ready to land.Sep 2 2019, 8:23 PM

Go for it ;)

Can't commit from my laptop for some reason (and don't have time to figure out why). If you could before tagging that'd be great!

This revision was automatically updated to reflect the committed changes.