qtmobility/plugins/contacts/symbian/src/cntrelationshipgroup.cpp
changeset 4 90517678cc4f
parent 1 2b40d63a9c3d
child 11 06b8e2af4411
--- a/qtmobility/plugins/contacts/symbian/src/cntrelationshipgroup.cpp	Fri Apr 16 15:51:22 2010 +0300
+++ b/qtmobility/plugins/contacts/symbian/src/cntrelationshipgroup.cpp	Mon May 03 13:18:40 2010 +0300
@@ -69,7 +69,7 @@
  * \a relationship to be saved
  * \a error t
  */
-bool CntRelationshipGroup::saveRelationshipL(QSet<QContactLocalId> *affectedContactIds, QContactRelationship* relationship, QContactManager::Error& error)
+bool CntRelationshipGroup::saveRelationshipL(QSet<QContactLocalId> *affectedContactIds, QContactRelationship* relationship, QContactManager::Error* error)
 {
     //get the ids of the relationship
     QScopedPointer<QContactId> groupId(new QContactId(relationship->first()));
@@ -83,11 +83,11 @@
     affectedContactIds->insert(groupId->localId());
     affectedContactIds->insert(contactId->localId());
     
-    error = QContactManager::NoError;
+    *error = QContactManager::NoError;
     return true;
 }
 
-bool CntRelationshipGroup::removeRelationshipL(QSet<QContactLocalId> *affectedContactIds, const QContactRelationship& relationship, QContactManager::Error& error)
+bool CntRelationshipGroup::removeRelationshipL(QSet<QContactLocalId> *affectedContactIds, const QContactRelationship& relationship, QContactManager::Error* error)
 {
     //get the ids of the relationship
     QScopedPointer<QContactId> groupId(new QContactId(relationship.first()));
@@ -110,15 +110,15 @@
     CleanupStack::PopAndDestroy(contact);
     CleanupStack::PopAndDestroy(groupContact);
 
-    error = QContactManager::NoError;
+    *error = QContactManager::NoError;
     return true;
 }
 
-bool CntRelationshipGroup::validateRelationship(const QContactRelationship &relationship, QContactManager::Error& error)
+bool CntRelationshipGroup::validateRelationship(const QContactRelationship &relationship, QContactManager::Error* error)
 {
     // check that "second" is in this manager
     if (!relationship.second().managerUri().isEmpty() && relationship.second().managerUri() != managerUri()) {
-        error = QContactManager::InvalidRelationshipError;
+        *error = QContactManager::InvalidRelationshipError;
         return false;
     }
 
@@ -162,20 +162,20 @@
 }
 
 //retrieve all the groups that the contact is part of
-QList<QContactRelationship> CntRelationshipGroup::relationshipsL(const QContactId& participantId, QContactRelationshipFilter::Role role, QContactManager::Error& error)
+QList<QContactRelationship> CntRelationshipGroup::relationshipsL(const QContactId& participantId, QContactRelationship::Role role, QContactManager::Error* error)
 {
     QList<QContactRelationship> returnValue;
     
     if (participantId != QContactId())
     {
         //role is a group
-        if(role == QContactRelationshipFilter::First || role == QContactRelationshipFilter::Either)
+        if(role == QContactRelationship::First || role == QContactRelationship::Either)
         {
             fetchGroupMembersL(participantId.localId(), &returnValue);
         }
     
         //role is member of a group
-        if(role == QContactRelationshipFilter::Second || role == QContactRelationshipFilter::Either)
+        if(role == QContactRelationship::Second || role == QContactRelationship::Either)
         {
             fetchMemberOfGroupsL(participantId.localId(), &returnValue);
         }
@@ -188,7 +188,7 @@
     }
     
     if (returnValue.isEmpty())
-        error = QContactManager::DoesNotExistError;
+        *error = QContactManager::DoesNotExistError;
 
     return returnValue;
 }