[Differential] [Commented On] D1076: Add properties dialog

elvisangelaccio (Elvis Angelaccio) noreply at phabricator.kde.org
Wed Mar 9 10:18:10 UTC 2016


elvisangelaccio added a comment.


  In https://phabricator.kde.org/D1076#20666, @rthomsen wrote:
  
  > Incorporate Elvis' suggestions.
  >
  > One question:
  >  Archive::isPasswordProtected() (which already existed before this patch) cannot be const due to calling listIfNotListed(). In documentation for Q_PROPERTY it is recommended that all READ functions be const. What's the reason for isPasswordProtected() calling listIfNotListed()? And is it safe that this functions is not const? Also, if this function calls listIfNotListed() should some of the other READ functions call listIfNotListed() as well?
  
  
  Yeah the listIfNotListed() function is weird. I think is the right time to move it in the right place. After all we just need to list the archive once, in the Archive constructor. Then we need to list it again only after an update operation (add or delete for now).
  
  If we do this, we can make the isPasswordProtected() function const, as it should be.

REPOSITORY
  rARK Ark

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

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: rthomsen, elvisangelaccio
Cc: kde-utils-devel, tctara


More information about the Kde-utils-devel mailing list