Add email type and preference API
ClosedPublic

Authored by vkrause on Apr 12 2019, 5:19 PM.

Details

Summary

This is used in several places in KDE PIM via string-based access.
So let's upstream this too and give it a proper API, along the lines
of how this is done for Address or PhoneNumber.

Diff Detail

Repository
R174 KContacts
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
vkrause created this revision.Apr 12 2019, 5:19 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptApr 12 2019, 5:19 PM
Restricted Application added a subscriber: kde-pim. · View Herald Transcript
vkrause requested review of this revision.Apr 12 2019, 5:19 PM
dvratil requested changes to this revision.Apr 14 2019, 10:19 AM
dvratil added a subscriber: dvratil.
dvratil added inline comments.
src/email.cpp
151

std::none_of instead of std::find_if == end?

This revision now requires changes to proceed.Apr 14 2019, 10:19 AM
vkrause updated this revision to Diff 56200.Apr 14 2019, 2:00 PM

Simplify flag decoding a bit.

std::any/none_of doesn't work here, as we use the iterator for then checking against std::end.

dvratil accepted this revision.Apr 15 2019, 8:06 AM

Makes sense, it wouldn't make the code any better.

This revision is now accepted and ready to land.Apr 15 2019, 8:06 AM
This revision was automatically updated to reflect the committed changes.