--- a/phonebookui/pbkcommonui/src/cntphonenumbermodel.cpp Thu May 27 12:45:19 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntphonenumbermodel.cpp Fri Jun 11 13:29:23 2010 +0300
@@ -90,4 +90,19 @@
{
}
+QContactDetail CntPhoneNumberModel::detail() const
+{
+ QListIterator<QContactPhoneNumber> numberList(mContact->details<QContactPhoneNumber>());
+ numberList.toBack(); // go through backwards, so the newest item will be returned
+ while ( numberList.hasPrevious() )
+ {
+ QContactPhoneNumber number = numberList.previous();
+ if ( !number.value(QContactPhoneNumber::FieldNumber).isEmpty() )
+ {
+ return number;
+ }
+ }
+ return QContactPhoneNumber(); // return empty address if none found
+}
+
// End of File