diff options
Diffstat (limited to 'framework/domain/peoplemodel.cpp')
-rw-r--r-- | framework/domain/peoplemodel.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/framework/domain/peoplemodel.cpp b/framework/domain/peoplemodel.cpp index 7cc2f3fa..d33c6703 100644 --- a/framework/domain/peoplemodel.cpp +++ b/framework/domain/peoplemodel.cpp | |||
@@ -50,7 +50,9 @@ QHash< int, QByteArray > PeopleModel::roleNames() const | |||
50 | {Emails, "emails"}, | 50 | {Emails, "emails"}, |
51 | {Addressbook, "addressbook"}, | 51 | {Addressbook, "addressbook"}, |
52 | {Type, "type"}, | 52 | {Type, "type"}, |
53 | {DomainObject, "domainObject"} | 53 | {DomainObject, "domainObject"}, |
54 | {FirstName, "firstName"}, | ||
55 | {LastName, "lastName"} | ||
54 | }; | 56 | }; |
55 | return roles; | 57 | return roles; |
56 | } | 58 | } |
@@ -70,6 +72,10 @@ QVariant PeopleModel::data(const QModelIndex &idx, int role) const | |||
70 | return "contact"; | 72 | return "contact"; |
71 | case DomainObject: | 73 | case DomainObject: |
72 | return QVariant::fromValue(contact); | 74 | return QVariant::fromValue(contact); |
75 | case FirstName: | ||
76 | return "FIRSTNAME"; | ||
77 | case LastName: | ||
78 | return contact->getFn(); | ||
73 | } | 79 | } |
74 | return QSortFilterProxyModel::data(idx, role); | 80 | return QSortFilterProxyModel::data(idx, role); |
75 | } | 81 | } |