phonebookui/pbkcommonui/src/cntfavoritesmemberview.cpp
changeset 47 7cbcb2896f0e
parent 46 efe85016a067
child 53 e6aff7b69165
--- a/phonebookui/pbkcommonui/src/cntfavoritesmemberview.cpp	Wed Jun 23 18:02:44 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntfavoritesmemberview.cpp	Tue Jul 06 14:05:47 2010 +0300
@@ -37,11 +37,11 @@
 const char *CNT_FAVORITESMEMBERVIEW_XML = ":/xml/contacts_favmember.docml";
 
 CntFavoritesMemberView::CntFavoritesMemberView() :
-mContact(NULL),
-mModel(NULL),
-mFavoriteListView(NULL), 
-mViewManager(NULL),
-mFetchView(NULL)
+    mContact(NULL),
+    mModel(NULL),
+    mFavoriteListView(NULL), 
+    mViewManager(NULL),
+    mFetchView(NULL)
 {
     bool ok = false;
     mDocumentLoader.load(CNT_FAVORITESMEMBERVIEW_XML, &ok);
@@ -138,13 +138,11 @@
     mOriginalGroupMembers = getContactManager()->contactIds(membersFilter).toSet();
     
     if (!mFetchView) {
-        mFetchView = new CntFetchContacts(getContactManager());
+        mFetchView = new CntFetchContacts(*getContactManager());
         connect(mFetchView, SIGNAL(clicked()), this, SLOT(handleManageFavorites()));
     }
     mFetchView->setDetails(hbTrId("txt_phob_subtitle_favorites"), hbTrId("txt_common_button_save"));
-    mFetchView->displayContacts(CntFetchContacts::popup,
-                                HbAbstractItemView::MultiSelection,
-                                mOriginalGroupMembers);
+    mFetchView->displayContacts(HbAbstractItemView::MultiSelection, mOriginalGroupMembers);
 }
 
 void CntFavoritesMemberView::handleManageFavorites()
@@ -184,11 +182,6 @@
             }
         }
     }
-    
-    // delete the model and recreate it with relationship changes
-    delete mModel;
-    mModel = 0;
-    createModel();
 }
 
 void CntFavoritesMemberView::createModel()
@@ -321,7 +314,7 @@
     QVariantHash preferences;
     preferences["contactId"] = mModel->contact(index).id().localId();
     
-    XQServiceRequest snd("com.nokia.services.hsapplication.IHomeScreenClient",
+    XQServiceRequest snd("com.nokia.symbian.IHomeScreenClient",
                          "addWidget(QString,QVariantHash)",
                          false);
     snd << QString("contactwidgethsplugin");