From 26e610c3f409e771c4e0e7ba955db7f4155b8825 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 16 Sep 2017 20:21:46 -0700 Subject: 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 --- desktop-widgets/btdeviceselectiondialog.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'desktop-widgets') 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(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(); -- cgit v1.2.3-70-g09d2