Disable bluetooth RFCOM discovery on iOS
This commit is contained in:
parent
be1c03d77e
commit
99d3275edc
@ -6,7 +6,6 @@ BluetoothServiceDiscovery::BluetoothServiceDiscovery(DiscoveryModel *discoveryMo
|
||||
QObject(parent),
|
||||
m_discoveryModel(discoveryModel)
|
||||
{
|
||||
|
||||
m_nymeaServiceUuid = QBluetoothUuid(QUuid("997936b5-d2cd-4c57-b41b-c6048320cd2b"));
|
||||
|
||||
m_localDevice = new QBluetoothLocalDevice(this);
|
||||
|
||||
@ -13,7 +13,10 @@ NymeaDiscovery::NymeaDiscovery(QObject *parent) : QObject(parent)
|
||||
|
||||
m_upnp = new UpnpDiscovery(m_discoveryModel, this);
|
||||
m_zeroConf = new ZeroconfDiscovery(m_discoveryModel, this);
|
||||
|
||||
#ifndef Q_OS_IOS
|
||||
m_bluetooth = new BluetoothServiceDiscovery(m_discoveryModel, this);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool NymeaDiscovery::discovering() const
|
||||
@ -30,12 +33,16 @@ void NymeaDiscovery::setDiscovering(bool discovering)
|
||||
// For zeroconf we'll ignore it as zeroconf doesn't do active discovery but just listens for changes in the net all the time
|
||||
if (discovering) {
|
||||
m_upnp->discover();
|
||||
// Note: this is the nymea uuid
|
||||
m_bluetooth->discover();
|
||||
if (m_bluetooth) {
|
||||
m_bluetooth->discover();
|
||||
}
|
||||
} else {
|
||||
m_upnp->stopDiscovery();
|
||||
m_bluetooth->stopDiscovery();
|
||||
if (m_bluetooth) {
|
||||
m_bluetooth->stopDiscovery();
|
||||
}
|
||||
}
|
||||
|
||||
emit discoveringChanged();
|
||||
}
|
||||
|
||||
|
||||
@ -194,7 +194,7 @@ Page {
|
||||
return false
|
||||
}
|
||||
}
|
||||
progressive: hasSecurePort
|
||||
progressive: true
|
||||
secondaryIconName: "../images/network-secure.svg"
|
||||
secondaryIconColor: isTrusted ? app.guhAccent : Material.foreground
|
||||
swipe.enabled: discoveryDeviceDelegate.discoveryDevice.deviceType === DiscoveryDevice.DeviceTypeNetwork
|
||||
@ -248,7 +248,6 @@ Page {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ThinDivider {}
|
||||
|
||||
Reference in New Issue
Block a user