diff --git a/src/personsmodel.h b/src/personsmodel.h --- a/src/personsmodel.h +++ b/src/personsmodel.h @@ -55,6 +55,7 @@ ContactsVCardRole, //AbstractContact::List (FIXME or map?) GroupsRole, ///groups QStringList + PhoneNumberRole, UserRole = Qt::UserRole + 0x1000 ///< in case it's needed to extend, use this one to start from }; diff --git a/src/personsmodel.cpp b/src/personsmodel.cpp --- a/src/personsmodel.cpp +++ b/src/personsmodel.cpp @@ -123,6 +123,7 @@ roles.insert(PersonUriRole, "personUri"); roles.insert(PersonVCardRole, "personVCard"); roles.insert(ContactsVCardRole, "contactsVCard"); + roles.insert(PhoneNumberRole, "phoneNumber"); return roles; } @@ -188,6 +189,8 @@ return QVariant::fromValue(metacontacts[personIndex[personUri].row()].contacts()); case PersonsModel::GroupsRole: return person->customProperty(QStringLiteral("all-groups")); + case PersonsModel::PhoneNumberRole: + return person->customProperty(AbstractContact::PhoneNumberProperty); } return QVariant(); }