Make format of return value of AllPhoneNumbersProperty the same as PhoneNumberProperty but as a list
ClosedPublic

Authored by sredman on May 22 2019, 7:59 PM.

Details

Summary

Previously, the AllPhoneNumbersProperty return value was a toString'ed version of a KContact::PhoneNumber. This looked a little bit like JSON, and is difficult for the client to parse.

Now just return a list of QStrings containing the phone numbers

Diff Detail

Repository
R732 KPeople VCard Support
Branch
get-all-phones
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 12084
Build 12102: arc lint + arc unit
sredman requested review of this revision.May 22 2019, 7:59 PM
sredman created this revision.

Also, it looks like KContact::PhoneNumber is set up such that it could be used as a QVariant. From my point of view, the additional information in the PhoneNumber object would be useful so I could display something like "Simon Redman (Mobile)" or "Simon Redman (Home)" in case of multiple matches.

apol accepted this revision.May 22 2019, 10:23 PM
This revision is now accepted and ready to land.May 22 2019, 10:23 PM
apol added a comment.May 22 2019, 10:24 PM

Also, it looks like KContact::PhoneNumber is set up such that it could be used as a QVariant. From my point of view, the additional information in the PhoneNumber object would be useful so I could display something like "Simon Redman (Mobile)" or "Simon Redman (Home)" in case of multiple matches.

How would you pass more information? in a QVariantMap?

In D21353#468804, @apol wrote:

How would you pass more information? in a QVariantMap?

It looks like KContacts::PhoneNumber is set up for passing as a QVariant. It has the marshaller and demarshaller, it would possibly just need to be registered into QMetaType

sredman closed this revision.May 22 2019, 11:01 PM