D27284: [polkit-1] Simplify Polkit1Backend action exists lookup

David Edmundson noreply at phabricator.kde.org
Mon Feb 10 12:21:19 GMT 2020


davidedmundson created this revision.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
davidedmundson requested review of this revision.

REVISION 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 <https://phabricator.kde.org/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

REPOSITORY
  R283 KAuth

BRANCH
  kauth_fixup

REVISION DETAIL
  https://phabricator.kde.org/D27284

AFFECTED FILES
  src/backends/polkit-1/Polkit1Backend.cpp
  src/backends/polkit-1/Polkit1Backend.h

To: davidedmundson
Cc: kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200210/58e2fa06/attachment.html>


More information about the Kde-frameworks-devel mailing list