bluetoothengine/btui/btuidelegate/btdelegateconnect.cpp
changeset 51 625f43ae9362
parent 42 b72428996822
child 57 5ebadcda06cb
equal deleted inserted replaced
49:9866e1d49556 51:625f43ae9362
   160             QString conflictDevName = (mConflictDevIndex.data(BtDeviceModel::NameAliasRole)).toString();    
   160             QString conflictDevName = (mConflictDevIndex.data(BtDeviceModel::NameAliasRole)).toString();    
   161     
   161     
   162             QString questionText(hbTrId("txt_bt_info_to_connect_1_2_needs_to_be_disconnec")
   162             QString questionText(hbTrId("txt_bt_info_to_connect_1_2_needs_to_be_disconnec")
   163                     .arg(mDeviceName).arg(conflictDevName));
   163                     .arg(mDeviceName).arg(conflictDevName));
   164             
   164             
   165             HbMessageBox::question( questionText, this, SLOT(handleUserAnswer(HbAction*)), 
   165             HbMessageBox::question( questionText, this, SLOT(handleUserAnswer(int)), 
   166                     hbTrId("txt_common_button_continue"), hbTrId("txt_common_button_cancel") );        
   166                     HbMessageBox::Continue | HbMessageBox::Cancel );       
   167         }
   167         }
   168     }
   168     }
   169     else {
   169     else {
   170         // command is finished
   170         // command is finished
   171         emitCommandComplete(aErr);
   171         emitCommandComplete(aErr);
   173 }
   173 }
   174 
   174 
   175 /*!
   175 /*!
   176  * handle user response to query about disconnecting conflict device
   176  * handle user response to query about disconnecting conflict device
   177  */
   177  */
   178 void BtDelegateConnect::handleUserAnswer( HbAction* answer )
   178 void BtDelegateConnect::handleUserAnswer( int answer )
   179 {
   179 {
   180     HbMessageBox* dlg = static_cast<HbMessageBox*>( sender() );
   180     if( answer == HbMessageBox::Continue ) { 
   181     if( dlg->actions().first() == answer ) { 
       
   182         // Continue, ie. disconnect conflict device and then try reconnecting again
   181         // Continue, ie. disconnect conflict device and then try reconnecting again
   183         if (!mAbstractDelegate) //if there is no other delegate running
   182         if (!mAbstractDelegate) //if there is no other delegate running
   184         { 
   183         { 
   185             QList<QVariant>list;
   184             QList<QVariant>list;
   186             QVariant paramFirst;
   185             QVariant paramFirst;