summaryrefslogtreecommitdiff
path: root/tests/auto
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2021-03-25 12:03:18 +0100
committerOliver Wolff <oliver.wolff@qt.io>2021-04-08 08:14:13 +0200
commit1cddac5027944cf7ac5296b5e8bbd18be3f9fdbf (patch)
tree506aba997fd482ef0e74832c43d5f3f6037ad2f6 /tests/auto
parent091da38e7b51f09345c2cf18b63c96fcef826683 (diff)
downloadqtconnectivity-1cddac5027944cf7ac5296b5e8bbd18be3f9fdbf.tar.gz
QBTDeviceDiscoveryAgentPrivate use declaration initialization
lowEnergySearchTimeout is still initialized to -1 in qbluetoothdevicediscoveryagent_p.cpp to signal, that this "backend" does not support le scans. Change-Id: Icdde8693fc0de79d2b91867e3a98b883000293df Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp b/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp
index 6d9b2c6c..45b8e0b4 100644
--- a/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp
+++ b/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp
@@ -394,18 +394,13 @@ void tst_QBluetoothDeviceDiscoveryAgent::tst_discoveryTimeout()
QBluetoothDeviceDiscoveryAgent agent;
// check default values
-#if defined(Q_OS_MACOS) || defined(Q_OS_IOS) || defined(Q_OS_ANDROID) || QT_CONFIG(winrt_bt)
+#if defined(Q_OS_MACOS) || defined(Q_OS_IOS) || defined(Q_OS_ANDROID) || QT_CONFIG(winrt_bt) \
+ || QT_CONFIG(bluez)
QCOMPARE(agent.lowEnergyDiscoveryTimeout(), 25000);
agent.setLowEnergyDiscoveryTimeout(-1); // negative ignored
QCOMPARE(agent.lowEnergyDiscoveryTimeout(), 25000);
agent.setLowEnergyDiscoveryTimeout(20000);
QCOMPARE(agent.lowEnergyDiscoveryTimeout(), 20000);
-#elif QT_CONFIG(bluez)
- QCOMPARE(agent.lowEnergyDiscoveryTimeout(), 20000);
- agent.setLowEnergyDiscoveryTimeout(-1); // negative ignored
- QCOMPARE(agent.lowEnergyDiscoveryTimeout(), 20000);
- agent.setLowEnergyDiscoveryTimeout(25000);
- QCOMPARE(agent.lowEnergyDiscoveryTimeout(), 25000);
#else
QCOMPARE(agent.lowEnergyDiscoveryTimeout(), -1);
agent.setLowEnergyDiscoveryTimeout(20000); // feature not supported -> ignored