D11107: [KProtocolInfoFactory] Don't clear cache if it had just been built

Eike Hein noreply at phabricator.kde.org
Wed Mar 7 10:26:59 UTC 2018


hein added a comment.


  Good idea, but every time one of those state tracking bools get copied my mind screams "BAD PATTERN". It's not the fault of your patch but I don't like how this cache handling is written - it'd be cleaner if fillCache had a return value for "I actually did work" and if the meaning of m_allProtocolsLoaded got inverted to being a dirty bit, so fillCache() itself can take care of the cache eviction code (qDeleteAll etc.) if dirty is set. Doing this instead creates a "now every time you want to change things you have to read site first and copy some boiler plate" situation.

REPOSITORY
  R241 KIO

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

To: broulik, #frameworks, hein
Cc: michaelh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180307/5f4f2ae4/attachment.html>


More information about the Kde-frameworks-devel mailing list