diff options
Diffstat (limited to 'framework')
-rw-r--r-- | framework/src/domain/contactcontroller.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/framework/src/domain/contactcontroller.cpp b/framework/src/domain/contactcontroller.cpp index b9bb90c2..5211e5a5 100644 --- a/framework/src/domain/contactcontroller.cpp +++ b/framework/src/domain/contactcontroller.cpp | |||
@@ -30,6 +30,12 @@ public: | |||
30 | { | 30 | { |
31 | } | 31 | } |
32 | 32 | ||
33 | void set(const QStringList &list) | ||
34 | { | ||
35 | for (const auto &email: list) { | ||
36 | add({{"email", email}}); | ||
37 | } | ||
38 | } | ||
33 | }; | 39 | }; |
34 | 40 | ||
35 | class PhonesController : public Kube::ListPropertyController | 41 | class PhonesController : public Kube::ListPropertyController |
@@ -41,6 +47,12 @@ public: | |||
41 | { | 47 | { |
42 | } | 48 | } |
43 | 49 | ||
50 | void set(const QStringList &list) | ||
51 | { | ||
52 | for (const auto &number: list) { | ||
53 | add({{"number", number}}); | ||
54 | } | ||
55 | } | ||
44 | }; | 56 | }; |
45 | 57 | ||
46 | ContactController::ContactController() | 58 | ContactController::ContactController() |
@@ -84,6 +96,9 @@ void ContactController::loadContact(const QVariant &contact) | |||
84 | setCompany(addressee.organization()); | 96 | setCompany(addressee.organization()); |
85 | setJobTitle(addressee.role()); | 97 | setJobTitle(addressee.role()); |
86 | setImageData(addressee.photo().rawData()); | 98 | setImageData(addressee.photo().rawData()); |
99 | |||
100 | static_cast<MailsController*>(mailsController())->set(addressee.emails()); | ||
101 | static_cast<PhonesController*>(phonesController())->set(numbers); | ||
87 | } | 102 | } |
88 | } | 103 | } |
89 | 104 | ||