--- a/phoneengine/phonecntfinder2/src/cphcntmatch2.cpp Mon Aug 23 15:42:12 2010 +0300
+++ b/phoneengine/phonecntfinder2/src/cphcntmatch2.cpp Fri Sep 03 13:33:36 2010 +0300
@@ -125,18 +125,30 @@
{
return KNullDesC();
}
+
+// -----------------------------------------------------------------------------
+// GroupName
+// -----------------------------------------------------------------------------
+//
+TPtrC CPhCntMatch2::GroupName() const
+{
+ return iGroupname.utf16();
+}
+
// -----------------------------------------------------------------------------
// Number
// -----------------------------------------------------------------------------
//
-TPtrC CPhCntMatch2::Number() const
+TPtrC CPhCntMatch2::Number()
{
//how many numbers are returned here? should be only one that matched
- if ( iNumber == NULL ) {
-
- TPtrC ptr(FieldValue(QContactPhoneNumber::DefinitionName,
- QContactPhoneNumber::FieldNumber).utf16());
- const_cast<HBufC*>(iNumber) = ptr.Alloc();
+ if ( iNumber == NULL ) {
+ TPtrC ptr(FieldValue(QContactPhoneNumber::DefinitionName,
+ QContactPhoneNumber::FieldNumber).utf16());
+ iNumber = ptr.Alloc();
+ if (!iNumber) {
+ return KNullDesC();
+ }
}
return iNumber->Des();
}
@@ -228,6 +240,11 @@
QContactName::DefinitionName,
QContactName::FieldLastName);
+ if (iContact.type() == QContactType::TypeGroup) {
+ QContactName contactName = iContact.detail(QContactName::DefinitionName);
+ iGroupname = contactName.customLabel();
+ }
+
//Get caller's image
QList<QContactAvatar> details = iContact.details<QContactAvatar>();
for (int i=0;i<details.count();++i) {