sipplugins/sippsipsettingsui/src/sipsettingsmodel.cpp
changeset 15 8248b03a2669
parent 0 307788aac0a8
child 12 c2e8c8b73582
equal deleted inserted replaced
0:307788aac0a8 15:8248b03a2669
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 
    19 
    20 // INCLUDE FILES
    20 // INCLUDE FILES
    21 
    21 #include    <aknnotewrappers.h>
    22 #include    <e32std.h>
    22 #include    <e32std.h>
    23 #include    <escapeutils.h>
    23 #include    <escapeutils.h>
    24 #include    <StringLoader.h>
    24 #include    <StringLoader.h>
    25 #include    <gssipsettingspluginrsc.rsg> //GUI Resource
    25 #include    <gssipsettingspluginrsc.rsg> //GUI Resource
    26 #include    "sipsettingsmodel.h"
    26 #include    "sipsettingsmodel.h"
   109 //
   109 //
   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 	iHandler->SetDefaultProfileL( aIndex );
   114     TRAPD(err, iHandler->SetDefaultProfileL( aIndex ));		
       
   115       if ( err == KErrInUse )
       
   116     	  {
       
   117           HBufC* txtErr = StringLoader::LoadLC( R_QTN_SIP_ERROR_PROFILE_USED );
       
   118           CAknErrorNote* note = new ( ELeave ) CAknErrorNote( ETrue );
       
   119           note->ExecuteLD( txtErr->Des() );
       
   120           CleanupStack::PopAndDestroy( txtErr );
       
   121     	  }
       
   122       else
       
   123     	  {
       
   124           User::Leave( err );
       
   125     	  }
   115     }
   126     }
   116 
   127 
   117 // -----------------------------------------------------------------------------
   128 // -----------------------------------------------------------------------------
   118 // CSIPSettingsModel::ListOfProfileNamesL
   129 // CSIPSettingsModel::ListOfProfileNamesL
   119 // Returns the list of profile names
   130 // Returns the list of profile names