From ee271934bf86193c4aabc95b7b870ccb761d4924 Mon Sep 17 00:00:00 2001 From: Alex Blasche Date: Fri, 24 Jun 2016 09:24:18 +0200 Subject: Simplify setLowEnergyTimeout() on iOS and OSX These two platforms always use a timeout. There is no need to test for a disabled timeout feature. Change-Id: If066c286d283ae793ef2b41794587792511a5926 Reviewed-by: Timur Pocheptsov --- src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm') diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm b/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm index 48f84357..02a45f18 100644 --- a/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm +++ b/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm @@ -588,9 +588,8 @@ QString QBluetoothDeviceDiscoveryAgent::errorString() const void QBluetoothDeviceDiscoveryAgent::setLowEnergyDiscoveryTimeout(int timeout) { // cannot deliberately turn it off - if (d_ptr->lowEnergySearchTimeout < 0 || timeout < 0) { - qCDebug(QT_BT_OSX) << "The Bluetooth Low Energy device discovery timeout cannot be negative " - "or set on a backend which does not support this feature."; + if (timeout < 0) { + qCDebug(QT_BT_OSX) << "The Bluetooth Low Energy device discovery timeout cannot be negative."; return; } -- cgit v1.2.3