Skip to content

logout-greeter: don't wake up packagekit needlessly

Harald Sitter requested to merge work/sitter/efficientksmserver into master

Original commit message(s)

  • logout-greeter: surface errors

previously we'd just pretend no errors occurred, which is just not cool. surface them in the UI layer instead.

this is a bit awkward because we want this to be fairly easy to use for third parties but also needs to be easy to create from c++. Soooo there now is an Error.qml component that aliases properties so they are easily set from C++ and then that Error gets created in C++ and set as contextproperty on the greeter.

on the consuming side this allows us to simply pick up the .message (a string) and the .action (Kirigami.Action) to present the error

talking about, our lnf now switches into an error state when an error was detected

  • logout-greeter: don't doubt the daemon

when it reports success on the cancel simply trust it. it will raise errors if the cancel failed for whatever reason

  • logout-greeter: categorize warnings

so one actually knows where they are coming from

  • logout-greeter: don't wake up packagekit needlessly

We can just check the relevant files directly, avoiding the blocking dbus call, which would potentially run into 2x25s timeouts if packagekit is unable to start for whatever reason (e.g. masked on a systemd level)

(For future reference, follow the guidelines at https://cbea.ms/git-commit/#seven-rules)

Reason for the change

The previous code was not only waking up packagekit needlessly it also ran into timeouts when packagekit doesn't manage to start. It also outright ignored errors.

Test plan

To test slap a setError(u"oy vey!"_s); at the end of the constructor and try to log out

Screenshots or screen recordings

Screenshot_20241022_101925

Bugs fixed

Merge request reports

Loading