D22144: Add kio recentlyused:/ to access KActivityStats data

Ivan Čukić noreply at phabricator.kde.org
Sat Aug 24 11:49:10 BST 2019


ivan added inline comments.

INLINE COMMENTS

> meven wrote in recentlyused.cpp:109
> We don't have yet set function for Activity, Type, Agent, and Url only add.
> Which means we would need to use query.addActivity(QStringList() << ":any")) sometimes for instance, that is not ideal since it makes the user class use internal details such as ":any".
> I would be in favor to add setActivity(Terms::Activity) in KactivitiesStats same for Type, Agent and Url, to get arount that and maybe also addActivity(Terms::Activity) as well for consistency.

You have `Activity::any()` - no need for the client to use the special values. You can do a `addActivities({Activity::any()})`.

I would not mind to add `set*` variants of `add*` functions - `setActivities`, `setTypes`, etc. to avoid the need of calling `clear*` and then `add*`.

I'm also thinking whether it would be useful to have a variadic template versions of these so that you can skip the `QList<T>` construction. That might be better to wait for Qt 6 and raised C++ version requirement. Not sure.

REPOSITORY
  R320 KIO Extras

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

To: meven, ivan, #frameworks, ngraham, dfaure
Cc: dhaumann, elvisangelaccio, kde-frameworks-devel, kfm-devel, aprcela, vmarinescu, fprice, LeGast00n, MrPepe, fbampaloukas, alexde, GB_2, Codezela, feverfew, meven, michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190824/b53ba003/attachment.html>


More information about the Kde-frameworks-devel mailing list