Index: sources/bluetooth/BluetoothInterface.cpp =================================================================== diff -u -r8247dc0f182707a9689f719e2d386e640440c55b -re3cfef345710717229407f105a0cba1bb479b9d5 --- sources/bluetooth/BluetoothInterface.cpp (.../BluetoothInterface.cpp) (revision 8247dc0f182707a9689f719e2d386e640440c55b) +++ sources/bluetooth/BluetoothInterface.cpp (.../BluetoothInterface.cpp) (revision e3cfef345710717229407f105a0cba1bb479b9d5) @@ -183,8 +183,8 @@ _device->remoteName(), _tempBatt )); #define NOTIFY_DEVICE_CONNECT notifyStateChange(MBluetooth(MBluetooth::eIS_Device_Connect , \ _device->remoteAddress().toString() , \ - _device->remoteName() , \ - getIsCurrentlyPaired() )); + _device->remoteName(), 0 , \ + _local->pairingStatus(_device->remoteAddress()) )); #define NOTIFY_DEVICE_DONE notifyStateChange(MBluetooth(MBluetooth::eIS_Device_Done , \ _device->remoteAddress().toString() , \ _device->remoteName() )); @@ -194,8 +194,8 @@ 0,0, vError, false )); #define NOTIFY_DEVICE_DISCONNECT notifyStateChange(MBluetooth(MBluetooth::eIS_Device_Disconnect , \ _device->remoteAddress().toString() , \ - _device->remoteName() , \ - getIsCurrentlyPaired() )); + _device->remoteName(), 0 , \ + _local->pairingStatus(_device->remoteAddress()) )); // ~~~~~~~~~~ Service #define NOTIFY_SERVICE_START notifyStateChange(MBluetooth(MBluetooth::eIS_Service_Start )); #define NOTIFY_SERVICE_DISCOVER notifyStateChange(MBluetooth(MBluetooth::eIS_Service_Discover )); @@ -376,22 +376,7 @@ emit didStateChange(vData); } - /*! - * \brief BluetoothInterface::getIsCurrentlyPaired - * \details Determine whether the local device is paired to a remote bt device. - * \returns true if there is a pairing, false otherwise - */ -bool BluetoothInterface::getIsCurrentlyPaired() -{ - if ( !isLocalValid() ) { return false; } - if ( !isDeviceValid()) { return false; } - - QBluetoothLocalDevice::Pairing currentPairingStatus = _local->pairingStatus(_device->remoteAddress()); - return currentPairingStatus != QBluetoothLocalDevice::Unpaired; -} - -/*! * \brief BluetoothInterface::doNotifyStatePOSTError * \details The public slot for public notification on POST error, * since the POST is done by ApplicationPOST class, Index: sources/bluetooth/BluetoothInterface.h =================================================================== diff -u -r8247dc0f182707a9689f719e2d386e640440c55b -re3cfef345710717229407f105a0cba1bb479b9d5 --- sources/bluetooth/BluetoothInterface.h (.../BluetoothInterface.h) (revision 8247dc0f182707a9689f719e2d386e640440c55b) +++ sources/bluetooth/BluetoothInterface.h (.../BluetoothInterface.h) (revision e3cfef345710717229407f105a0cba1bb479b9d5) @@ -168,7 +168,6 @@ void interpretBloodPressure (const QByteArray &vData); void interpretInformation (); void interpretBattery (const QByteArray &vData); - bool getIsCurrentlyPaired (); signals: void didStateChange (const BluetoothData &vData); Index: sources/model/settings/MBluetooth.cpp =================================================================== diff -u -r8247dc0f182707a9689f719e2d386e640440c55b -re3cfef345710717229407f105a0cba1bb479b9d5 --- sources/model/settings/MBluetooth.cpp (.../MBluetooth.cpp) (revision 8247dc0f182707a9689f719e2d386e640440c55b) +++ sources/model/settings/MBluetooth.cpp (.../MBluetooth.cpp) (revision e3cfef345710717229407f105a0cba1bb479b9d5) @@ -42,27 +42,3 @@ detailName (vDetailName ), detailValue (vDetailValue ){ } - -MBluetooth::MBluetooth( - InterfaceStates vState , - QString vLocalAddr , - QString vLocalName , - qint16 vError , - bool vValid ): - state (vState ), - localAddr (vLocalAddr ), - localName (vLocalName ), - error (vError ), - valid (vValid ){ -} - -MBluetooth::MBluetooth( - InterfaceStates vState , - QString vDeviceAddr , - QString vDeviceName , - bool vIsPaired ): - state (vState ), - deviceAddr (vDeviceAddr ), - deviceName (vDeviceName ), - isPaired (vIsPaired ){ -} Index: sources/model/settings/MBluetooth.h =================================================================== diff -u -r8247dc0f182707a9689f719e2d386e640440c55b -re3cfef345710717229407f105a0cba1bb479b9d5 --- sources/model/settings/MBluetooth.h (.../MBluetooth.h) (revision 8247dc0f182707a9689f719e2d386e640440c55b) +++ sources/model/settings/MBluetooth.h (.../MBluetooth.h) (revision e3cfef345710717229407f105a0cba1bb479b9d5) @@ -106,8 +106,6 @@ QString detailName = ""; QString detailValue = ""; - bool isPaired = false; - MBluetooth( InterfaceStates vState = eIS_Idle, QString vDeviceAddr = "", @@ -122,21 +120,6 @@ QString vDetailName = "", QString vDetailValue = "" ); - - MBluetooth( - InterfaceStates vState , - QString vLocalAddr , - QString vLocalName , - qint16 vError , - bool vValid - ); - - MBluetooth( - InterfaceStates vState , - QString vDeviceAddr , - QString vDeviceName , - bool vIsPaired - ); }; } Index: sources/view/settings/VBluetooth.cpp =================================================================== diff -u -r8247dc0f182707a9689f719e2d386e640440c55b -re3cfef345710717229407f105a0cba1bb479b9d5 --- sources/view/settings/VBluetooth.cpp (.../VBluetooth.cpp) (revision 8247dc0f182707a9689f719e2d386e640440c55b) +++ sources/view/settings/VBluetooth.cpp (.../VBluetooth.cpp) (revision e3cfef345710717229407f105a0cba1bb479b9d5) @@ -145,12 +145,8 @@ break; case MBluetooth::eIS_Device_Connect : - if(vData.isPaired) - { - LOG_APPED_UI(tr("Bluetooth reconnected.")); - } else { - LOG_APPED_UI(tr("Bluetooth connected." )); - } + if ( vData.devicePair != QBluetoothLocalDevice::Unpaired ) LOG_APPED_UI(tr("Bluetooth reconnected." )); + else LOG_APPED_UI(tr("Bluetooth paired and connected." )); break; case MBluetooth::eIS_Device_Disconnect :