phonebookui/phonebookservices/src/cntserviceproviderfetch.cpp
changeset 53 e6aff7b69165
parent 50 77bc263e1626
child 72 6abfb1094884
equal deleted inserted replaced
51:81c360d47083 53:e6aff7b69165
    44 
    44 
    45 void CntServiceProviderFetch::multiFetch(const QString &title, const QString &action )
    45 void CntServiceProviderFetch::multiFetch(const QString &title, const QString &action )
    46 {
    46 {
    47     CNT_ENTRY
    47     CNT_ENTRY
    48     mCurrentRequestIndex = setCurrentRequestAsync();
    48     mCurrentRequestIndex = setCurrentRequestAsync();
    49     mServices.setQuitable(requestInfo().isEmbedded());
    49     mServices.setQuittable(requestInfo().isEmbedded());
    50     mServices.multiFetch( title, action, *this );
    50     mServices.multiFetch( title, action, *this );
    51     CNT_EXIT
    51     CNT_EXIT
    52 }
    52 }
    53 
    53 
    54 void CntServiceProviderFetch::singleFetch(const QString &title, const QString &action )
    54 void CntServiceProviderFetch::singleFetch(const QString &title, const QString &action )
    55 {
    55 {
    56     CNT_ENTRY
    56     CNT_ENTRY
    57     mCurrentRequestIndex = setCurrentRequestAsync();
    57     mCurrentRequestIndex = setCurrentRequestAsync();
    58     mServices.setQuitable(requestInfo().isEmbedded());
    58     mServices.setQuittable(requestInfo().isEmbedded());
    59     mServices.singleFetch( title, action, *this );
    59     mServices.singleFetch( title, action, *this );
    60     CNT_EXIT
    60     CNT_EXIT
    61 }
    61 }
    62 
    62 
    63 void CntServiceProviderFetch::CompleteServiceAndCloseApp(const QVariant& retValue)
    63 void CntServiceProviderFetch::CompleteServiceAndCloseApp(const QVariant& retValue)
    64 {
    64 {
    65     CNT_ENTRY
    65     CNT_ENTRY
    66     connect(this, SIGNAL(returnValueDelivered()), qApp, SLOT(quit()));
       
    67     if ( mCurrentRequestIndex != 0 )
    66     if ( mCurrentRequestIndex != 0 )
    68     {
    67     {
       
    68         connect(this, SIGNAL(returnValueDelivered()), qApp, SLOT(quit()));
    69         const bool success = completeRequest(mCurrentRequestIndex, retValue);
    69         const bool success = completeRequest(mCurrentRequestIndex, retValue);
    70         if ( !success )
    70         if ( !success )
    71         {
    71         {
    72             CNT_LOG_ARGS("Failed to complete highway request.");
    72             CNT_LOG_ARGS("Failed to complete highway request.");
    73         }
    73         }