Changeset View
Changeset View
Standalone View
Standalone View
src/persondata.cpp
Show First 20 Lines • Show All 201 Lines • ▼ Show 20 Line(s) | 199 | { | |||
---|---|---|---|---|---|
202 | for (const QVariant &e : emails) { | 202 | for (const QVariant &e : emails) { | ||
203 | Q_ASSERT(e.canConvert<QString>()); | 203 | Q_ASSERT(e.canConvert<QString>()); | ||
204 | ret += e.toString(); | 204 | ret += e.toString(); | ||
205 | } | 205 | } | ||
206 | ret.removeDuplicates(); | 206 | ret.removeDuplicates(); | ||
207 | return ret; | 207 | return ret; | ||
208 | } | 208 | } | ||
209 | 209 | | |||
210 | KContacts::PhoneNumber PersonData::phoneNumber() const | ||||
211 | { | ||||
212 | const QVariant phoneNumber = contactCustomProperty(AbstractContact::KContactPhoneNumberProperty); | ||||
213 | return phoneNumber.value<KContacts::PhoneNumber>(); | ||||
214 | } | ||||
215 | | ||||
216 | KContacts::PhoneNumber::List PersonData::allPhoneNumbers () const | ||||
217 | { | ||||
218 | const QVariantList phoneNumberList = contactCustomProperty(AbstractContact::KContactAllPhoneNumbersProperty).toList(); | ||||
219 | KContacts::PhoneNumber::List ret; | ||||
220 | | ||||
221 | for (const QVariant& phoneNumber : phoneNumberList) { | ||||
222 | ret += phoneNumber.value<KContacts::PhoneNumber>(); | ||||
223 | } | ||||
224 | | ||||
225 | return ret; | ||||
226 | } |