KAuth: Remove nested event loop in Polkit1Backend::actionExists()
Open, Needs TriagePublic

Description

Polkit1Backend currently fetches every possible action on load, then in order to make an async API look syncronous has a nested event loop with a timeout.

This causes QML crashes if the kauth action is created in a module import, as well as having to short a timeout and if you take too long breaking all KAuth usage at all.

KAuth::Action::isValid() is currently an annoying split of

  • is this a null uninitialised object
  • does the action exist

IMHO we should remove the "does this action exist" part from here.
It's not that useful to know, other than error handling when you invoke the action which you'd get anyway.

and if it really is needed, we should expose it as a separate async API.