D25010: [StatJob] Use A QFlag to specify the details returned by statJob

Méven Car noreply at phabricator.kde.org
Tue Oct 29 13:05:13 GMT 2019


meven added a comment.


  In D25010#555890 <https://phabricator.kde.org/D25010#555890>, @kossebau wrote:
  
  > Now that is a quick turn-around, +1 for doing the work :)
  >
  > No time myself to look at this closely the next days, also not that much into KIO, but here some quick feedback with an API police hat on.
  
  
  Your comments are already of great value, given this needs some polishing.
  
  > Would be also good to have some patches which make use of the new API, so one could better judge the usefulness.
  
  The interest here is to have a modern API and better documented that is was and more features.
  In the meantime I have ported the rest of KIO to use it.

INLINE COMMENTS

> kossebau wrote in jobremotetest.cpp:70
> As reader of this code here alone, I wonder what KIO::StatJob::Basic means. To understand what this code does, I would first have to look at the API dox, not good.
> So possibly Basic should get a different name, at least contain "Detail" term perhaps. "Basic" also needs context to have semantics, I could e.g. not tell instantly what basic details are. So perhaps needs to be more expliciti here.

I guess so, "Basic" here lacks context.
But the documentation will be much faster to get than before with the 0 field.

> kossebau wrote in statjob.h:181
> I wonder if this should not be rather a member of StatJob, instead of being on generic KIO namespace level.
> It feels unbalanced to have the enum being in the class, but a util flag set not.

Great suggestion !
I wanted to do that but I just did not find a way to have StatDefaultDetails part of StatJob namespace given `Q_DECLARE_OPERATORS_FOR_FLAGS(StatJob::Details)` must be declared outside of StatJob class.

Adding it to the enum should just work, working on it.

REPOSITORY
  R241 KIO

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

To: meven, #frameworks, dfaure, kossebau
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191029/b8552354/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list