diff options
author | Oliver Wolff <oliver.wolff@qt.io> | 2017-08-07 13:23:52 +0200 |
---|---|---|
committer | Oliver Wolff <oliver.wolff@qt.io> | 2017-08-30 13:33:16 +0000 |
commit | d7af5496668da92bfa48564053bfc039cef6ecea (patch) | |
tree | 558c8c0298332d5159d13c0b445443dc6c91778c /tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp | |
parent | 43a382c16d1c5c80e7a97577a6eb3511dff8c359 (diff) |
winrt: Use config feature when checking for winrt backend in auto tests
As the winrt backend may also be used on desktop Windows, checking for
the operating system does no longer work.
While touching these lines deprecated OS X checks were fixed as well.
Task-number: QTBUG-61566
Change-Id: I247979aa63de6a71ac4908bda946d7db1e29b6c3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp')
-rw-r--r-- | tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp b/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp index c75004d6..cbce5042 100644 --- a/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp +++ b/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp @@ -33,6 +33,7 @@ #include <QList> #include <QLoggingCategory> +#include <private/qtbluetoothglobal_p.h> #include <qbluetoothaddress.h> #include <qbluetoothdevicediscoveryagent.h> #include <qbluetoothlocaldevice.h> @@ -471,7 +472,7 @@ void tst_QBluetoothDeviceDiscoveryAgent::tst_deviceDiscovery() } } } -#if defined(Q_OS_IOS) || defined(Q_OS_WINRT) +#if defined(Q_OS_IOS) || defined(Q_OS_TVOS) || QT_CONFIG(winrt_bt) //On iOS/WinRT, we do not have access to the local device/adapter, numberOfAdapters is 0, //so we skip this test at all. QSKIP("iOS/WinRT: no local Bluetooth device available. Skipping remaining part of test."); @@ -489,7 +490,7 @@ void tst_QBluetoothDeviceDiscoveryAgent::tst_discoveryTimeout() QBluetoothDeviceDiscoveryAgent agent; // check default values -#if defined(Q_OS_OSX) || defined(Q_OS_IOS) || defined(Q_OS_ANDROID) || defined(Q_OS_WINRT) +#if defined(Q_OS_MACOS) || defined(Q_OS_IOS) || defined(Q_OS_ANDROID) || QT_CONFIG(winrt_bt) QCOMPARE(agent.lowEnergyDiscoveryTimeout(), 25000); agent.setLowEnergyDiscoveryTimeout(-1); // negative ignored QCOMPARE(agent.lowEnergyDiscoveryTimeout(), 25000); |