Index: sources/view/settings/VBluetooth.cpp =================================================================== diff -u -r93cb2e56782aa64aafb2b69ec526a5e49ffdf1c7 -r068426e216f9ae5bc4879e4f75bf0f346e33a1ae --- sources/view/settings/VBluetooth.cpp (.../VBluetooth.cpp) (revision 93cb2e56782aa64aafb2b69ec526a5e49ffdf1c7) +++ sources/view/settings/VBluetooth.cpp (.../VBluetooth.cpp) (revision 068426e216f9ae5bc4879e4f75bf0f346e33a1ae) @@ -44,12 +44,15 @@ void View::VBluetooth::onStateChange(const Model::MBluetooth &vData) { - scanInProgress( ! ( vData.state == MBluetooth::eIS_Idle || - vData.state == MBluetooth::eIS_Device_Disconnect || - vData.state == MBluetooth::eIS_Device_Error || - vData.state == MBluetooth::eIS_Device_Error_Init || - vData.state == MBluetooth::eIS_Scan_NotFound || - vData.state == MBluetooth::eIS_Local_Disconnect )); + scanEnabled( ! (vData.state == MBluetooth::eIS_Close || + // local + vData.state == MBluetooth::eIS_Local_Init || + // device + vData.state == MBluetooth::eIS_Device_Connect || + // service + vData.state == MBluetooth::eIS_Service_Start || + vData.state == MBluetooth::eIS_Service_Discover || + vData.state == MBluetooth::eIS_Service_Detail )); switch (vData.state) { // The device name is not always available and the interface may be in investigation. @@ -78,7 +81,6 @@ case MBluetooth::eIS_Idle : message = "" ; break; case MBluetooth::eIS_Close : message = tr("BluetoothInterface Closed" ); break; // Used BluetoothInterface to be consistent with the - case MBluetooth::eIS_Local_Init : message = tr("The Bluetooth Adapter Is Ready %1" ).arg(_localAddr ); break; case MBluetooth::eIS_Local_Connect : message = tr("The Bluetooth Adapter Connected" ); break; case MBluetooth::eIS_Local_Disconnect : message = tr("The Bluetooth Adapter Disconnected" ); break; @@ -112,12 +114,6 @@ case MBluetooth::eIS_Service_Detail_Done : message = tr("Service Detail Done" ); break; case MBluetooth::eIS_Service_Done : message = tr("Service Scanning Finished" ); break; - case MBluetooth::eIS_Pair_Start : message = tr("Pairing ..." ); break; - case MBluetooth::eIS_Pair_Error : message = tr("Pairing Error" ); break; - case MBluetooth::eIS_Pair_PinCode : message = tr("Pairing PinCode" ); break; - case MBluetooth::eIS_Pair_Confirm : message = tr("Pairing Confirm" ); break; - case MBluetooth::eIS_Pair_Done : message = tr("Pairing Done" ); break; - // IMPORTANT: Do not use the "default:" to let compiler check for all the enumeration which are not handled. }