Add setter to Type, Activity, Agent and UrlFilter query fields
ClosedPublic

Authored by meven on Aug 24 2019, 11:45 AM.

Diff Detail

Repository
R159 KActivities Statistics
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 15572
Build 15590: arc lint + arc unit
meven created this revision.Aug 24 2019, 11:45 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptAug 24 2019, 11:45 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
meven requested review of this revision.Aug 24 2019, 11:45 AM
meven updated this revision to Diff 64475.Aug 24 2019, 11:51 AM

Add QStringList setters

ivan added inline comments.Aug 24 2019, 3:09 PM
src/query.h
105

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?

meven updated this revision to Diff 64501.Aug 24 2019, 5:34 PM

Only have set*(Term), add setter for date

ivan accepted this revision.Aug 24 2019, 5:36 PM
This revision is now accepted and ready to land.Aug 24 2019, 5:36 PM
This revision was automatically updated to reflect the committed changes.
meven marked an inline comment as done.Aug 24 2019, 5:39 PM
meven added inline comments.
src/query.h
105

That works

meven marked 2 inline comments as done.Aug 24 2019, 5:39 PM
kossebau added inline comments.
src/query.h
101

Please add "@since 6.62" to all this new API, so consumers of them know which min version of KActivitiesStat they need to require to be able to rely on their existance.

kossebau added inline comments.Aug 28 2019, 8:11 PM
src/query.h
101

"5.62" of course :)

meven marked 2 inline comments as done.Aug 29 2019, 6:54 AM
meven added inline comments.
src/query.h
101

Thanks D23555

meven marked 2 inline comments as done.Aug 29 2019, 7:02 AM