Add MemoryStore
AbandonedPublic

Authored by ervin on Oct 9 2015, 9:25 AM.

Details

Reviewers
bensi
Summary

MemoryStore create cache information about collections, tags and items.
AkonadiFakeData inherit of MemoryStore.

Diff Detail

Repository
R4 Zanshin
Lint
Lint Skipped
Unit
Unit Tests Skipped
bensi updated this revision to Diff 955.Oct 9 2015, 9:25 AM
bensi retitled this revision from to Add CacheInterface.
bensi updated this object.
bensi edited the test plan for this revision. (Show Details)
bensi added a reviewer: ervin.
bensi set the repository for this revision to R4 Zanshin.
bensi added a project: Zanshin.
ervin requested changes to this revision.Oct 9 2015, 11:48 AM
ervin edited edge metadata.
ervin added inline comments.
src/akonadi/akonadicacheinterface.cpp
3 ↗(On Diff #955)

Same thing, re-add my copyright line.

src/akonadi/akonadicacheinterface.h
3 ↗(On Diff #955)

There's a sizeable code just being moved, you're supposed to keep my copyright line too. ;-)

35 ↗(On Diff #955)

Missing space before ":", but I don't see why it would need to inherit from QObject in the first place.

Also I'm not sure I like the name since a) it is not an interface and b) it is not only for caching. :-)

MemoryStore?

48–50 ↗(On Diff #955)

Try to avoid changing the signature of those and avoid making them virtual. It seems to be only about change notification, so I would propose something like:

  • Introduce private virtuals like onCollectionCreated(col) and friends which do nothing;
  • Have them called at the end of the public methods;
  • In the sub-class just overload the onCollectionCreated() and friends.
54–56 ↗(On Diff #955)

ditto.

62–64 ↗(On Diff #955)

ditto.

tests/testlib/akonadifakedata.h
46–48

The virtual isn't needed here.

This revision now requires changes to proceed.Oct 9 2015, 11:48 AM
bensi updated this revision to Diff 1116.Oct 30 2015, 10:31 PM
bensi retitled this revision from Add CacheInterface to Add MemoryStore.
bensi updated this object.
bensi edited edge metadata.
ervin requested changes to this revision.Nov 1 2015, 12:57 PM
ervin edited edge metadata.
ervin added inline comments.
src/akonadi/akonadimemorystore.h
38

Space before & note after.

63–65

No need to move that to MemoryStore. I think those method can (and should) stay in the fake data. Their implementation might need to be adjusted a tiny bit of course.

67–70

Same for those, they shall not be in MemoryStore.

79

Space before & not after.

This revision now requires changes to proceed.Nov 1 2015, 12:57 PM
ervin commandeered this revision.Apr 18 2017, 10:07 AM
ervin edited reviewers, added: bensi; removed: ervin.

Revamped and rebased in my local repository, can be closed.

ervin abandoned this revision.Apr 18 2017, 10:07 AM