mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
iOS: save BT DeviceInfo on discovery
On iOS save all discovered devices. Later qt_ble_open queries this list in order to actually connect to the remove device. The Desktop code stores this data with the list items and only saves when the "Save" button is clicked. This is not supported with the current ConnectionListModel implementation. Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
This commit is contained in:
parent
137e83f7f2
commit
5bd90821d0
1 changed files with 9 additions and 0 deletions
|
@ -162,6 +162,15 @@ void BTDiscovery::btDeviceDiscovered(const QBluetoothDeviceInfo &device)
|
|||
qDebug() << id.toByteArray();
|
||||
}
|
||||
|
||||
#if defined(Q_OS_IOS)
|
||||
// On Desktop this is called when "Save" button is clicked. All
|
||||
// DeviceInfo are stored as data on the ui list items.
|
||||
// On mobile (iOS) the current ConnectionListModel does not support
|
||||
// additional data, so just save all discovered devices.
|
||||
|
||||
saveBtDeviceInfo(btDeviceAddress(&device, false).toUtf8().constData(), device);
|
||||
#endif
|
||||
|
||||
btDeviceDiscoveredMain(this_d);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue