[WIP] Add AbstractContact properties for KContact::PhoneNumber objects
Needs ReviewPublic

Authored by sredman on May 23 2019, 7:42 PM.

Details

Reviewers
apol
Summary
  • Add phone number getters to PersonData
  • Add KContact::PhoneNumber properties to AbstractContact

Since commit a0757af0653 in KContacts, KContacts::PhoneNumber is QMetaType-capable. This has not yet been released, which makes it not ideal for inclusion here. Nevertheless, this is the support we need, so maybe the right answer is to have some clever "ifdef-ing" to make the new code added by this patch not be included if there is a too-old version of KPIM

Diff Detail

Repository
R307 KPeople
Branch
kcontacts-phonenumber
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 12111
Build 12129: arc lint + arc unit
sredman created this revision.May 23 2019, 7:42 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptMay 23 2019, 7:42 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
sredman requested review of this revision.May 23 2019, 7:42 PM
sredman updated this revision to Diff 58556.May 23 2019, 8:44 PM
  • Move KF5::Contacts to PUBLIC library
sredman updated this revision to Diff 58561.May 23 2019, 9:46 PM
  • Add link_library target to backends as well
sredman edited the summary of this revision. (Show Details)May 23 2019, 10:19 PM
apol added a comment.EditedMay 24 2019, 10:49 AM

Seems like a clear layer break to spill KContacts over KPeople :P.
Let's discuss it at the sprint? Or earlier. Let's discuss it? ^^'

src/persondata.h
123

wrong comment

In D21369#469389, @apol wrote:

Seems like a clear layer break to spill KContacts over KPeople :P.
Let's discuss it at the sprint? Or earlier. Let's discuss it? ^^'

Sounds good

If I understand correctly, the only reason to use KContacts here is so we can use its PhoneNumber type. We could change it to a QString?

apol added a comment.Jun 15 2019, 1:27 PM

If I understand correctly, the only reason to use KContacts here is so we can use its PhoneNumber type. We could change it to a QString?

It is a string now, the advantage of using the PhoneNumber class is that it has some extra metadata with it (e.g. that you get to know if it's a work or home phone number).