When the module is loaded the handler is notified over DBus just to go back to the module to init it. Skip the roundtrip and init directly.
Details
- Reviewers
jgrulich - Group Reviewers
Plasma - Commits
- R116:eec18ad4f337: Save unneeded DBus roundtrip
Restarted plasmashell and kded5. (dis)connected wifi. Got notifications about it
Diff Detail
- Repository
- R116 Plasma Network Management Applet
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Isn't that Handler also used from the plasmoid and KCM, which is in a separate process from kded?
I think this was done this way to make the kded module used only when either the applet or KCM is running. It was Lukáš Tinkl who implemented at the beginning of Plasma 5 so I don't really remember the details. Part of this was also done for https://bugs.kde.org/show_bug.cgi?id=338513.
Actually it was me who pushed this, Lukáš just did some changes to it.
Here are some details: https://cgit.kde.org/plasma-nm.git/commit/?id=81839a1566d0c0209a308d71b03837f996a19c96
I see that we already initialize the secret agent right when the kded module is loaded, but I see a potential problem in showing a notification using a fallback backend (the ugly notification which pops on the top of screen) when Plasma notifications are not ready yet.
Actually we already initialize the secret agent right when the kded module is loaded, but I see a potential problem in showing a notification using a fallback backend (the ugly notification which pops on the top of screen) when Plasma notifications are not ready yet, because NetworkManager might be trying to activate a connection before Plasma starts.
(the ugly notification which pops on the top of screen) when Plasma notifications are not ready yet
Plasma ships a trick for that which means that we always get plasma notifications when plasma is installed regardless of if it's running.