20 #include <QCoreApplication> |
20 #include <QCoreApplication> |
21 |
21 |
22 CntServiceEditView::CntServiceEditView(CntServiceHandler *aServiceHandler ) : CntEditView(), |
22 CntServiceEditView::CntServiceEditView(CntServiceHandler *aServiceHandler ) : CntEditView(), |
23 mServiceHandler(aServiceHandler) |
23 mServiceHandler(aServiceHandler) |
24 { |
24 { |
25 connect( this, SIGNAL(contactUpdated()), this, SLOT(doContactUpdated()) ); |
25 connect( this, SIGNAL(contactUpdated(bool)), this, SLOT(doContactUpdated(bool)) ); |
26 connect( this, SIGNAL(contactRemoved()), this, SLOT(doContactRemoved()) ); |
26 connect( this, SIGNAL(contactRemoved(bool)), this, SLOT(doContactRemoved(bool)) ); |
27 connect( this, SIGNAL(changesDiscarded()), this, SLOT(doChangesDiscarded()) ); |
27 connect( this, SIGNAL(changesDiscarded()), this, SLOT(doChangesDiscarded()) ); |
28 } |
28 } |
29 |
29 |
30 CntServiceEditView::~CntServiceEditView() |
30 CntServiceEditView::~CntServiceEditView() |
31 { |
31 { |
32 } |
32 } |
33 |
33 |
34 void CntServiceEditView::doContactUpdated() |
34 void CntServiceEditView::doContactUpdated(bool aSuccess) |
35 { |
35 { |
36 connect(mServiceHandler, SIGNAL(returnValueDelivered()), qApp, SLOT(quit())); |
36 connect(mServiceHandler, SIGNAL(returnValueDelivered()), qApp, SLOT(quit())); |
37 mServiceHandler->completeEdit(1); |
37 int retValue = aSuccess ? 1 : 0; |
|
38 mServiceHandler->completeEdit(retValue); |
38 } |
39 } |
39 |
40 |
40 void CntServiceEditView::doContactRemoved() |
41 void CntServiceEditView::doContactRemoved(bool aSuccess) |
41 { |
42 { |
42 connect(mServiceHandler, SIGNAL(returnValueDelivered()), qApp, SLOT(quit())); |
43 connect(mServiceHandler, SIGNAL(returnValueDelivered()), qApp, SLOT(quit())); |
43 mServiceHandler->completeEdit(-1); |
44 int retValue = aSuccess ? -1 : 0; |
|
45 mServiceHandler->completeEdit(retValue); |
44 } |
46 } |
45 |
47 |
46 void CntServiceEditView::doChangesDiscarded() |
48 void CntServiceEditView::doChangesDiscarded() |
47 { |
49 { |
48 connect(mServiceHandler, SIGNAL(returnValueDelivered()), qApp, SLOT(quit())); |
50 connect(mServiceHandler, SIGNAL(returnValueDelivered()), qApp, SLOT(quit())); |