Implement TaskQueries::findContexts()
ClosedPublic

Authored by ervin on Jun 23 2019, 6:35 PM.

Diff Detail

Repository
R4 Zanshin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ervin requested review of this revision.Jun 23 2019, 6:35 PM
ervin created this revision.
dfaure added inline comments.Jun 23 2019, 11:04 PM
src/akonadi/akonaditaskqueries.cpp
57

minor: this call to value() is a second lookup that was already done by contains(), so performance would be improved by using an iterator instead.

231

Performance: you could remove the isContext() check (2 lines above) and call createContextFromItem unconditionally, it returns nullptr if the item isn't a context (so you'd do if (!context) return false;).

ervin updated this revision to Diff 60605.Jun 24 2019, 5:38 PM

Addressing dfaure's comments

dfaure accepted this revision.Jun 25 2019, 6:40 AM
This revision is now accepted and ready to land.Jun 25 2019, 6:40 AM
This revision was automatically updated to reflect the committed changes.