davidedmundson created this revision. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. davidedmundson requested review of this revision.
REVISION SUMMARY Polkit1Backend fetches a list of /all/ actions once on startup, when we want to see if an action is valid we compare it to this list. Fine in principle except that if isValid() is called, we have to block via a nested event loop to wait for the full list to be fetched. Given we construct actions on startup and the backend on startup we almost always hit this. It can easily time out (the case I'm debugging here) or if it's invoked from QML it would simply crash. Any good fix would be an API/behavioural break. (T12643 <https://phabricator.kde.org/T12643>) In practice few places call isValid() at which point the cache is fetched and we hide the problem, also we can document it. It's not slower as the only backend that has CheckActionExistenceCapability is a cache lookup anyway. TEST PLAN Used on a slow VM with a slow KCM My actions started working REPOSITORY R283 KAuth BRANCH delayed_isValid REVISION DETAIL https://phabricator.kde.org/D27140 AFFECTED FILES src/kauthaction.cpp src/kauthaction.h To: davidedmundson Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns