bluetoothengine/btui/Ecom/src/BTUIPairedDevicesView.cpp
changeset 1 6a1fe72036e3
parent 0 f63038272f30
child 6 6a29d5ad0713
child 15 00f9ee97d895
equal deleted inserted replaced
0:f63038272f30 1:6a1fe72036e3
   178 	delete iBtEngSettings;
   178 	delete iBtEngSettings;
   179 	delete iBTPluginMan;
   179 	delete iBTPluginMan;
   180 	
   180 	
   181 	if(iConstructAsGsPlugin)
   181 	if(iConstructAsGsPlugin)
   182 	    	delete iTabHelper;	
   182 	    	delete iTabHelper;	
       
   183 	
       
   184 	CancelDisconnectQueryDlg();
   183 	
   185 	
   184     TRACE_FUNC_EXIT
   186     TRACE_FUNC_EXIT
   185     }
   187     }
   186 
   188 
   187 // ---------------------------------------------------------
   189 // ---------------------------------------------------------
  1065     iModel->GetDevice(device);
  1067     iModel->GetDevice(device);
  1066 	iDisconnectQueryDevice = device;//remember device related with query dialog
  1068 	iDisconnectQueryDevice = device;//remember device related with query dialog
  1067 
  1069 
  1068     // Create confirmation query
  1070     // Create confirmation query
  1069     HBufC* stringholder = StringLoader::LoadLC(R_BT_DISCONNECT_FROM, device.iName);
  1071     HBufC* stringholder = StringLoader::LoadLC(R_BT_DISCONNECT_FROM, device.iName);
  1070     iDisconnectQueryDlg = CAknQueryDialog::NewL();
  1072     if (!iDisconnectQueryDlg)
       
  1073         {
       
  1074         iDisconnectQueryDlg = CAknQueryDialog::NewL();
       
  1075         }
  1071 
  1076 
  1072 	if(iCoverDisplayEnabled)
  1077 	if(iCoverDisplayEnabled)
  1073 		{
  1078 		{
  1074 	    CleanupStack::PushL(iDisconnectQueryDlg); 
       
  1075 	    iDisconnectQueryDlg->PublishDialogL(ECmdShowDisconnectQuery, KUidCoverUiCategoryBtui); // initializes cover support    
  1079 	    iDisconnectQueryDlg->PublishDialogL(ECmdShowDisconnectQuery, KUidCoverUiCategoryBtui); // initializes cover support    
  1076 	    CleanupStack::Pop(iDisconnectQueryDlg); 
       
  1077 	
  1080 	
  1078 		CAknMediatorFacade* covercl = AknMediatorFacade(iDisconnectQueryDlg); // uses MOP, so control provided 
  1081 		CAknMediatorFacade* covercl = AknMediatorFacade(iDisconnectQueryDlg); // uses MOP, so control provided 
  1079 		if (covercl) // returns null if __COVER_DISPLAY is not defined
  1082 		if (covercl) // returns null if __COVER_DISPLAY is not defined
  1080 		    {	    
  1083 		    {	    
  1081 		    covercl->BufStream() << BTDeviceNameConverter::ToUTF8L(device.iName);// takes copy so consts are ok too
  1084 		    covercl->BufStream() << BTDeviceNameConverter::ToUTF8L(device.iName);// takes copy so consts are ok too
  1098 	
  1101 	
  1099 // ----------------------------------------------------------
  1102 // ----------------------------------------------------------
  1100 // CBTUIPairedDevicesView::CancelDisconnectQueryDlgL
  1103 // CBTUIPairedDevicesView::CancelDisconnectQueryDlgL
  1101 // ----------------------------------------------------------
  1104 // ----------------------------------------------------------
  1102 //
  1105 //
  1103 void CBTUIPairedDevicesView::CancelDisconnectQueryDlgL()
  1106 void CBTUIPairedDevicesView::CancelDisconnectQueryDlg()
  1104 {
  1107 {
  1105 	TRACE_FUNC_ENTRY
  1108 	TRACE_FUNC_ENTRY
  1106 	
  1109 	
  1107 	if(iDisconnectQueryDlg)
  1110 	if(iDisconnectQueryDlg)
  1108 	{
  1111 	{
  1852         // has been shown and paired device has been turned off simultaneously.
  1855         // has been shown and paired device has been turned off simultaneously.
  1853         // CancelDisconnectQuery dialog need to be closed. 
  1856         // CancelDisconnectQuery dialog need to be closed. 
  1854         if(aErr == KErrDisconnected)
  1857         if(aErr == KErrDisconnected)
  1855             {
  1858             {
  1856             if(iDisconnectQueryDlg && aDevice.iAddr == iDisconnectQueryDevice.iAddr)
  1859             if(iDisconnectQueryDlg && aDevice.iAddr == iDisconnectQueryDevice.iAddr)
  1857                 CancelDisconnectQueryDlgL();
  1860                 CancelDisconnectQueryDlg();
  1858             
  1861             
  1859             TRACE_FUNC_EXIT
  1862             TRACE_FUNC_EXIT
  1860             return;
  1863             return;
  1861             }
  1864             }
  1862         // show general error if any of these failed
  1865         // show general error if any of these failed