phonebookui/phonebookservices/src/cntservicecontactselectionview.cpp
changeset 59 a642906a277a
parent 46 efe85016a067
--- a/phonebookui/phonebookservices/src/cntservicecontactselectionview.cpp	Tue Jul 06 14:05:47 2010 +0300
+++ b/phonebookui/phonebookservices/src/cntservicecontactselectionview.cpp	Wed Aug 18 09:39:00 2010 +0300
@@ -17,15 +17,15 @@
 
 #include "cntservicecontactselectionview.h"
 
+#include <cntservicescontact.h>
 #include <QCoreApplication>
 #include <QModelIndex>
-#include "cntservicehandler.h"
 #include <hblistview.h>
 #include <cntlistmodel.h>
 
-CntServiceContactSelectionView::CntServiceContactSelectionView(CntServiceHandler *aServiceHandler):
+CntServiceContactSelectionView::CntServiceContactSelectionView( CntAbstractServiceProvider& aServiceProvider ):
 CntBaseSelectionView(),
-mServiceHandler(aServiceHandler)
+mProvider( aServiceProvider )
 {
     connect(mListView, SIGNAL(activated(const QModelIndex&)), this, SLOT(onListViewActivated(const QModelIndex&)));
     connect( this, SIGNAL(viewClosed()), this, SLOT(aboutToCloseView()) );
@@ -37,6 +37,7 @@
 
 }
 
+// An item in the selection list has been clicked
 void CntServiceContactSelectionView::onListViewActivated(const QModelIndex &aIndex)
 {
     QContact contact = mListModel->contact(aIndex);
@@ -52,8 +53,11 @@
 
 void CntServiceContactSelectionView::aboutToCloseView()
 {
-    connect(mServiceHandler, SIGNAL(returnValueDelivered()), qApp, SLOT(quit()));
-    mServiceHandler->completeEdit(0);
+    QVariant variant;
+    variant.setValue(KCntServicesReturnValueContactNotModified);
+    mProvider.CompleteServiceAndCloseApp(variant);
+    CntViewParameters args;
+    mMgr->back( args );
 }
 
 void CntServiceContactSelectionView::aboutToOpenView(CntAbstractViewManager* aMgr, const CntViewParameters viewParameters)