Factorize attribute handling into new AttributeStorage class.
ClosedPublic

Authored by dfaure on Mar 5 2019, 10:26 PM.

Details

Summary

This fixes jobs sending unmodified attributes, potentially overwriting
changes made elsewhere.

Port Collection and Tag to use AttributeStorage.
Item will be for a separate commit.

Test Plan

All tests pass.

Diff Detail

Repository
R165 Akonadi
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 9220
Build 9238: arc lint + arc unit
dfaure created this revision.Mar 5 2019, 10:26 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptMar 5 2019, 10:26 PM
dfaure requested review of this revision.Mar 5 2019, 10:26 PM
dvratil requested changes to this revision.Mar 6 2019, 11:55 AM
dvratil added inline comments.
src/core/attributestorage_p.h
61

What is the benefit of std::set<T> over a QSet<T> here? I don't mind using it, I'm just curious why you preferred it over QSet.

src/core/jobs/tagfetchjob.cpp
155

You already reset the changelog in parseTagFetchResult(), no need to do it here again.

This revision now requires changes to proceed.Mar 6 2019, 11:55 AM
dfaure added inline comments.Mar 6 2019, 12:01 PM
src/core/attributestorage_p.h
61

A hash table for just a few elements is overkill (memory-wise).

src/core/jobs/tagfetchjob.cpp
155

Ah indeed -- I added that later.

dfaure updated this revision to Diff 53269.Mar 6 2019, 12:04 PM

Remove resetChangeLog in tagfetchjob.cpp

dfaure updated this revision to Diff 53270.Mar 6 2019, 12:04 PM

Remove now-unused include in tagfetchjob.cpp

dvratil accepted this revision.Mar 6 2019, 6:21 PM

Thanks!

This revision is now accepted and ready to land.Mar 6 2019, 6:21 PM
dfaure closed this revision.Mar 6 2019, 9:29 PM