equal
deleted
inserted
replaced
17 * |
17 * |
18 */ |
18 */ |
19 |
19 |
20 #include <qtcontacts.h> |
20 #include <qtcontacts.h> |
21 #include "cntdefaultinfoprovider.h" |
21 #include "cntdefaultinfoprovider.h" |
|
22 #include <hbglobal.h> |
22 |
23 |
23 /*! |
24 /*! |
24 /return the info fields supported by this provider |
25 /return the info fields supported by this provider |
25 */ |
26 */ |
26 ContactInfoFields CntDefaultInfoProvider::supportedFields() const |
27 ContactInfoFields CntDefaultInfoProvider::supportedFields() const |
46 { |
47 { |
47 number = static_cast<QContactPhoneNumber>(detail).number(); |
48 number = static_cast<QContactPhoneNumber>(detail).number(); |
48 } |
49 } |
49 else |
50 else |
50 { |
51 { |
51 number = contact.detail<QContactPhoneNumber>().number(); |
52 QList<QContactPhoneNumber> numbers = contact.details<QContactPhoneNumber>(); |
|
53 if (numbers.count() > 1) |
|
54 number = hbTrId("txt_phob_dblist_val_ln_numbers", numbers.count()); |
|
55 else if (numbers.count() == 1) |
|
56 number = numbers.at(0).number(); |
52 } |
57 } |
53 |
58 |
54 if (!number.isEmpty()) { |
59 if (!number.isEmpty()) { |
55 emit infoFieldReady(this, contact.localId(), ContactInfoTextField, number); |
60 emit infoFieldReady(this, contact.localId(), ContactInfoTextField, number); |
56 } |
61 } |