D23399: Add setter to Type, Activity, Agent and UrlFilter query fields

Ivan Čukić noreply at phabricator.kde.org
Sat Aug 24 16:09:20 BST 2019


ivan added inline comments.

INLINE COMMENTS

> query.h:105
> +    void setUrlFilters(const QStringList &urlFilters);
> +    void setType(const Terms::Type &types);
> +    void setAgent(const Terms::Agent &agents);

I screwed up the names - plurals vs singulars here as `Agent` can contain several agents - having `Agent::current` looked better than `Agents::current`.

We'll need to do something about this for Qt6/KF6.

Now, I can not guarantee this, but I think we will have a smaller API change if these were all named in plural. In that case, with the implicit conversion from `QStringList` to `Agent` and others, only one `set`  function should be needed for each of these.

So

  void setTypes(const Terms::Type &types);

instead of

  void setTypes(const QStringList &types);
  void setType(const Terms::Type &types);

What do you think?

REPOSITORY
  R159 KActivities Statistics

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

To: meven, ivan
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/20190824/7bedcf05/attachment.html>


More information about the Kde-frameworks-devel mailing list