summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@theqtcompany.com>2016-06-20 13:52:25 +0200
committerTimur Pocheptsov <timur.pocheptsov@theqtcompany.com>2016-06-24 08:10:49 +0000
commite69fed2980b48e21035b1be930901f2d8856b725 (patch)
treeb9c1b741038ff6c9749db29a863d63c483354c22 /src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm
parent701670ec91fdd2ccafc334a73c50c94abd5c62db (diff)
Add a warning when QBDDAgent::setLowEnergyDiscoveryTimeout is no-op
This can avoid accidental issues or wrong assumptions. Task-number: QTBUG-53012 Change-Id: I02024a640f89954d6e55b87825276ea6f5f3d862 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm')
-rw-r--r--src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm b/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm
index eedeebb5..48f84357 100644
--- a/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm
+++ b/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm
@@ -588,8 +588,11 @@ QString QBluetoothDeviceDiscoveryAgent::errorString() const
void QBluetoothDeviceDiscoveryAgent::setLowEnergyDiscoveryTimeout(int timeout)
{
// cannot deliberately turn it off
- if (d_ptr->lowEnergySearchTimeout < 0 || timeout < 0)
+ 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.";
return;
+ }
d_ptr->lowEnergySearchTimeout = timeout;
return;