diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-09-16 20:21:46 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-09-17 09:58:11 -0700 |
commit | 26e610c3f409e771c4e0e7ba955db7f4155b8825 (patch) | |
tree | 64a61900a1b2a903344a0237d9b2bc56d2c565be /desktop-widgets/btdeviceselectiondialog.cpp | |
parent | db38a7023db5ebf1c58e8bc652071d8f509bd001 (diff) | |
download | subsurface-26e610c3f409e771c4e0e7ba955db7f4155b8825.tar.gz |
BLE: create controller from QBtDeviceInfo
Creating it from an address is a) deprecated and b) impossible on Mac or iOS.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/btdeviceselectiondialog.cpp')
-rw-r--r-- | desktop-widgets/btdeviceselectiondialog.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/desktop-widgets/btdeviceselectiondialog.cpp b/desktop-widgets/btdeviceselectiondialog.cpp index eb05c4f42..cf70daa3f 100644 --- a/desktop-widgets/btdeviceselectiondialog.cpp +++ b/desktop-widgets/btdeviceselectiondialog.cpp @@ -152,7 +152,9 @@ void BtDeviceSelectionDialog::on_save_clicked() // Save the selected device selectedRemoteDeviceInfo = QSharedPointer<QBluetoothDeviceInfo>(new QBluetoothDeviceInfo(remoteDeviceInfo)); - + QString address = remoteDeviceInfo.address().isNull() ? remoteDeviceInfo.deviceUuid().toString() : + remoteDeviceInfo.address().toString(); + saveBtDeviceInfo(address.toUtf8().constData(), remoteDeviceInfo); if (remoteDeviceDiscoveryAgent->isActive()) { // Stop the SDP agent if the clear button is pressed and enable the Scan button remoteDeviceDiscoveryAgent->stop(); |