macOS/bluetooth: remove the forced rescan

I can no longer reproduce the case where this rescan was necessary.
So let's remove it as it causes additional wait time for BT/BLE users on macOS.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2020-08-21 15:40:43 -07:00
parent adeade5581
commit ba3efae6e8

View file

@ -398,15 +398,6 @@ void BTDiscovery::discoverAddress(QString address)
QString btAddress;
btAddress = extractBluetoothAddress(address);
#if defined(Q_OS_MACOS)
// macOS appears to need a fresh scan if we want to switch devices
static QString lastAddress;
if (lastAddress != address) {
btDeviceInfo.clear();
discoveryAgent->stop();
lastAddress = address;
}
#endif
if (!btDeviceInfo.keys().contains(address) && !discoveryAgent->isActive()) {
qDebug() << "restarting discovery agent";
discoveryAgent->start();