phonebookui/phonebookservices/src/cntserviceproviderold2.cpp
changeset 61 d30183af6ca6
parent 53 e6aff7b69165
child 72 6abfb1094884
equal deleted inserted replaced
56:d508aa856878 61:d30183af6ca6
   133 {
   133 {
   134     CNT_ENTRY
   134     CNT_ENTRY
   135     connect(this, SIGNAL(returnValueDelivered()), qApp, SLOT(quit()));
   135     connect(this, SIGNAL(returnValueDelivered()), qApp, SLOT(quit()));
   136     if ( mCurrentRequestIndex != 0 )
   136     if ( mCurrentRequestIndex != 0 )
   137     {
   137     {
   138         CNT_LOG_ARGS("next, completing request.")
   138         bool success = false;
   139         const bool success = completeRequest(mCurrentRequestIndex, retValue);
   139         
       
   140         if (!mOverriddenReturnValue.isNull() && retValue.value<int>() != KCntServicesReturnValueContactDeleted)
       
   141         {
       
   142             CNT_LOG_ARGS(mOverriddenReturnValue.value<int>());
       
   143             success = completeRequest(mCurrentRequestIndex, mOverriddenReturnValue);
       
   144         }
       
   145         else
       
   146         {
       
   147             CNT_LOG_ARGS(retValue.value<int>());
       
   148             success = completeRequest(mCurrentRequestIndex, retValue);
       
   149         }
       
   150         
   140         if ( !success )
   151         if ( !success )
   141         {
   152         {
   142             CNT_LOG_ARGS("Failed to complete highway request.");
   153             CNT_LOG_ARGS("Failed to complete highway request.");
   143         }
   154         }
   144         mCurrentRequestIndex = 0;
   155         mCurrentRequestIndex = 0;
   145     }
   156     }
   146     CNT_EXIT
   157     CNT_EXIT
   147 }
   158 }
   148 
   159 
       
   160 void CntServiceProviderOld2::overrideReturnValue(const QVariant& retValue)
       
   161 {
       
   162     CNT_ENTRY
       
   163     
       
   164     if (mOverriddenReturnValue.isNull() || mOverriddenReturnValue.value<int>() != KCntServicesReturnValueContactSaved)
       
   165     {
       
   166         mOverriddenReturnValue = retValue;
       
   167     }
       
   168     
       
   169     CNT_EXIT
       
   170 }
       
   171 
   149 
   172 
   150 // end of file
   173 // end of file