sipplugins/sippsipsettingsui/src/sipsettingsmodel.cpp
branchRCL_3
changeset 20 0dcb073356a5
parent 19 b5e99d8877c7
equal deleted inserted replaced
19:b5e99d8877c7 20:0dcb073356a5
   110 void CSIPSettingsModel::SetDefaultProfileL( 
   110 void CSIPSettingsModel::SetDefaultProfileL( 
   111     TInt aIndex )
   111     TInt aIndex )
   112     {
   112     {
   113     __GSLOGSTRING1("CSIPSettingsModel::SetDefaultProfileL index: %d", aIndex)
   113     __GSLOGSTRING1("CSIPSettingsModel::SetDefaultProfileL index: %d", aIndex)
   114     TRAPD(err, iHandler->SetDefaultProfileL( aIndex ));		
   114     TRAPD(err, iHandler->SetDefaultProfileL( aIndex ));		
       
   115     if( err != KErrNone )
       
   116         {
   115       if ( err == KErrInUse )
   117       if ( err == KErrInUse )
   116     	  {
   118     	  {
   117           HBufC* txtErr = StringLoader::LoadLC( R_QTN_SIP_ERROR_PROFILE_USED );
   119           HBufC* txtErr = StringLoader::LoadLC( R_QTN_SIP_ERROR_PROFILE_USED );
   118           CAknErrorNote* note = new ( ELeave ) CAknErrorNote( ETrue );
   120           CAknErrorNote* note = new ( ELeave ) CAknErrorNote( ETrue );
   119           note->ExecuteLD( txtErr->Des() );
   121           note->ExecuteLD( txtErr->Des() );
   121     	  }
   123     	  }
   122       else
   124       else
   123     	  {
   125     	  {
   124           User::Leave( err );
   126           User::Leave( err );
   125     	  }
   127     	  }
       
   128         }
   126     }
   129     }
   127 
   130 
   128 // -----------------------------------------------------------------------------
   131 // -----------------------------------------------------------------------------
   129 // CSIPSettingsModel::ListOfProfileNamesL
   132 // CSIPSettingsModel::ListOfProfileNamesL
   130 // Returns the list of profile names
   133 // Returns the list of profile names