phonebookui/pbkcommonui/src/cnturleditormodel.cpp
changeset 40 b46a585f6909
parent 31 2a11b5b00470
child 46 efe85016a067
--- a/phonebookui/pbkcommonui/src/cnturleditormodel.cpp	Thu May 27 12:45:19 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cnturleditormodel.cpp	Fri Jun 11 13:29:23 2010 +0300
@@ -63,5 +63,20 @@
         }
     }
 }
+
+QContactDetail CntUrlEditorModel::detail() const 
+{
+    QListIterator<QContactUrl> urlList(mContact->details<QContactUrl>());
+    urlList.toBack(); // go through backwards, so the newest item will be returned
+    while ( urlList.hasPrevious() )
+    {
+        QContactUrl url = urlList.previous();
+        if ( !url.value(QContactUrl::FieldUrl).isEmpty() )
+        {
+            return url;
+        }
+    }
+    return QContactEmailAddress(); // return empty address if none found
+}
 // End of File