bluetoothengine/btui/Ecom/src/BTUISap.cpp
branchRCL_3
changeset 6 6a29d5ad0713
parent 0 f63038272f30
child 14 f7fbeaeb166a
--- a/bluetoothengine/btui/Ecom/src/BTUISap.cpp	Tue Feb 02 00:20:42 2010 +0200
+++ b/bluetoothengine/btui/Ecom/src/BTUISap.cpp	Fri Feb 19 22:59:18 2010 +0200
@@ -18,7 +18,6 @@
 
 #include <aknnotewrappers.h>
 #include <aknradiobuttonsettingpage.h>
-#include <StringLoader.h>	// localisation stringloader
 #include <BtuiViewResources.rsg>		// Compiled resource ids
 #include <BTSapDomainPSKeys.h>	
 #include <centralrepository.h> 
@@ -29,13 +28,13 @@
 #include <SecondaryDisplay/BtuiSecondaryDisplayAPI.h>
 #include <btfeaturescfg.h>					// For EnterpriseEnablementL()
 #include <btnotif.h>
-
+#include <utf.h>
+#include <bluetoothuiutil.h>
 #include "btdevmodel.h"
 
 #include "debug.h"
 #include "BTUIMainView.h"
 
-#include <utf.h>
 // ----------------------------------------------------
 // CBTUIMainView::SetSapStatusL
 // ----------------------------------------------------
@@ -72,26 +71,28 @@
 				{
 
 				// Create confirmation query
-				HBufC* stringholder = StringLoader::LoadLC( R_BT_DISCONNECT_FROM, connectedSap );
+				RBuf stringholder;
+				CleanupClosePushL( stringholder );
+				BluetoothUiUtil::LoadResourceAndSubstringL( stringholder, 
+				        R_BT_DISCONNECT_FROM, connectedSap, 0 );
 				CAknQueryDialog* dlg = CAknQueryDialog::NewL();
 
 				if(iCoverDisplayEnabled)
 					{
 					CleanupStack::PushL(dlg); 						
 				    dlg->PublishDialogL(ECmdShowDisconnectQuery, KUidCoverUiCategoryBtui); // initializes cover support    
-					CleanupStack::Pop(dlg); 						
-
 					CAknMediatorFacade* covercl = AknMediatorFacade(dlg); // uses MOP, so control provided 
 					if (covercl) // returns null if __COVER_DISPLAY is not defined
 					    {	    
 					    covercl->BufStream() << BTDeviceNameConverter::ToUTF8L(connectedSap);// takes copy so consts are ok too
 					    covercl->BufStream().CommitL(); // no more data to send so commit buf
-					    }  
+					    }
+					CleanupStack::Pop(dlg);
 					}
 					
-				TInt keypress = dlg->ExecuteLD( R_BT_DISCONNECT_FROM_QUERY, *stringholder );
+				TInt keypress = dlg->ExecuteLD( R_BT_DISCONNECT_FROM_QUERY, stringholder );
 
-				CleanupStack::PopAndDestroy(stringholder);	// stringholder
+				CleanupStack::PopAndDestroy(&stringholder);	// stringholder
 
 				if( keypress )	// User has accepted the dialog
 					{