mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
iOS: check for UUID instead of physical address
on iOS the address we display on Connection is an UUID, not a physical address. This change the pattern (on iOS) used to enable bluetooth_mode. Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
This commit is contained in:
parent
5bd90821d0
commit
8f3ac0402c
1 changed files with 5 additions and 0 deletions
|
@ -159,6 +159,11 @@ Kirigami.Page {
|
|||
onCurrentTextChanged: {
|
||||
// pattern that matches BT addresses
|
||||
var btAddr = /[0-9A-Fa-f][0-9A-Fa-f]:[0-9A-Fa-f][0-9A-Fa-f]:[0-9A-Fa-f][0-9A-Fa-f]:[0-9A-Fa-f][0-9A-Fa-f]:[0-9A-Fa-f][0-9A-Fa-f]:[0-9A-Fa-f][0-9A-Fa-f]/ ;
|
||||
|
||||
// On iOS we store UUID instead of device address.
|
||||
if (Qt.platform.os === 'ios')
|
||||
btAddr = /\{?[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\}/;
|
||||
|
||||
if (btAddr.test(currentText))
|
||||
downloadThread.deviceData.bluetoothMode = true
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue