Skip to content

extend SNI breakage detection to kded

Harald Sitter requested to merge work/show-on-broken-kded into master

if kded breaks horrendously the StatusNotifierWatcher interface will not be available and KSNI internally will fail to register an indicator and print a warning. unfortunately there's no API exposure of this so we'll need to manually check for when that situation can arise.

to that end we now also monitor the org.kde.StatusNotifierWatcher service. if it is not available we'll schedule automatic dialog activation.

this is 100% shared code with the existing SNI-defect detection which was reshuffled accordingly to fit both services. each service gets its own timer so they don't override each others states. since we require both services to present a working SNI, one service suddenly registering is not enough to stop the activation timer.

I've also added a safety net that starts the timer if the service is already not present when the code runs. this notably is necessary for the new scenarios where drkonqi is invoked out of systemd-coredumpd, widening the gap between crash and drkonqi starting and therefore increasing the chance that the service name has already been lost by the time this monitoring code is running (i.e. crash -> coredump... -> serivce lost -> ...coredump done -> drkonqi -> service already not registered)

Merge request reports

Loading