[polkit-1] Simplify Polkit1Backend action exists lookup
Summary:
Now that isValid() is on demand, and actionStatus is correct, we don't
need to query every possible action.
We will call setupAction which will query the state of this action when
the action is constructed. This will in turn tell us if it is valid
using the existing AuthStatus value.
This means we have all the information available without having to fetch
a whole list, simplifying the code, getting rid of a pseudo-blocking
large DBus call and an event loop all at once.
This mostly completes T12643 within KF5 with no behavioural changes for
clients.
Test Plan:
Ran sddmthemeinstaller -i got an auth prompt
edited sddmthemeinstaller to an invalid name. Got an error "trying to
start an invalid action"
Unit tests pass
Reviewers: broulik
Reviewed By: broulik
Subscribers: kde-frameworks-devel
Tags: Frameworks
Differential Revision: https://phabricator.kde.org/D27284