summaryrefslogtreecommitdiffstats
path: root/framework
diff options
context:
space:
mode:
Diffstat (limited to 'framework')
-rw-r--r--framework/domain/peoplemodel.cpp8
-rw-r--r--framework/domain/peoplemodel.h4
2 files changed, 10 insertions, 2 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}
diff --git a/framework/domain/peoplemodel.h b/framework/domain/peoplemodel.h
index 419d59a6..1e9d2d01 100644
--- a/framework/domain/peoplemodel.h
+++ b/framework/domain/peoplemodel.h
@@ -48,7 +48,9 @@ public:
48 Type, 48 Type,
49 Emails, 49 Emails,
50 Addressbook, 50 Addressbook,
51 DomainObject 51 DomainObject,
52 FirstName,
53 LastName
52 }; 54 };
53 55
54 QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE; 56 QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE;