diff options
author | Alex Blasche <alexander.blasche@qt.io> | 2017-04-05 16:01:38 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@qt.io> | 2017-04-06 07:31:45 +0000 |
commit | ba56814fa4f0ca4a20d8448dcee95e5bf7c9d3a5 (patch) | |
tree | 571c61765ff6a1f75a4fc6e37a8cc54636c57fad /tests | |
parent | cda661e1446d4ad00390dacdff8eb107a13d636b (diff) |
Replace custom QT_BLUEZ_BLUETOOTH against the related feature define
Change-Id: I4fbb948841a610640acaf87364e2157e31782836
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'tests')
4 files changed, 4 insertions, 10 deletions
diff --git a/tests/auto/qbluetoothdevicediscoveryagent/qbluetoothdevicediscoveryagent.pro b/tests/auto/qbluetoothdevicediscoveryagent/qbluetoothdevicediscoveryagent.pro index cb7b4179..900bb5e9 100644 --- a/tests/auto/qbluetoothdevicediscoveryagent/qbluetoothdevicediscoveryagent.pro +++ b/tests/auto/qbluetoothdevicediscoveryagent/qbluetoothdevicediscoveryagent.pro @@ -4,7 +4,3 @@ CONFIG += testcase QT = core concurrent bluetooth-private testlib osx:QT += widgets - -qtConfig(bluez) { - DEFINES += QT_BLUEZ_BLUETOOTH -} diff --git a/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp b/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp index efc4d8a6..c75004d6 100644 --- a/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp +++ b/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp @@ -96,7 +96,7 @@ tst_QBluetoothDeviceDiscoveryAgent::~tst_QBluetoothDeviceDiscoveryAgent() { } -#ifdef QT_BLUEZ_BLUETOOTH +#if QT_CONFIG(bluez) // This section was adopted from tst_qloggingcategory.cpp QString logMessage; @@ -133,7 +133,7 @@ void tst_QBluetoothDeviceDiscoveryAgent::initTestCase() qRegisterMetaType<QBluetoothDeviceInfo>(); qRegisterMetaType<QBluetoothDeviceDiscoveryAgent::InquiryType>(); -#ifdef QT_BLUEZ_BLUETOOTH +#if QT_CONFIG(bluez) // To distinguish Bluez 4 and 5 we peek into the debug output // of first Bluetooth ctor. It executes a runtime test and prints the result // as logging output. This avoids more complex runtime detection logic within this unit test. @@ -495,7 +495,7 @@ void tst_QBluetoothDeviceDiscoveryAgent::tst_discoveryTimeout() QCOMPARE(agent.lowEnergyDiscoveryTimeout(), 25000); agent.setLowEnergyDiscoveryTimeout(20000); QCOMPARE(agent.lowEnergyDiscoveryTimeout(), 20000); -#elif defined(QT_BLUEZ_BLUETOOTH) +#elif QT_CONFIG(bluez) if (isBluez5Runtime) { QCOMPARE(agent.lowEnergyDiscoveryTimeout(), 20000); agent.setLowEnergyDiscoveryTimeout(-1); // negative ignored diff --git a/tests/auto/qbluetoothsocket/qbluetoothsocket.pro b/tests/auto/qbluetoothsocket/qbluetoothsocket.pro index b73d9311..32fc6558 100644 --- a/tests/auto/qbluetoothsocket/qbluetoothsocket.pro +++ b/tests/auto/qbluetoothsocket/qbluetoothsocket.pro @@ -13,6 +13,4 @@ osx { DEFINES += QT_OSX_BLUETOOTH } else: android { DEFINES += QT_ANDROID_BLUETOOTH -} else: qtConfig(bluez) { - DEFINES += QT_BLUEZ_BLUETOOTH } diff --git a/tests/auto/qbluetoothsocket/tst_qbluetoothsocket.cpp b/tests/auto/qbluetoothsocket/tst_qbluetoothsocket.cpp index 566a5c5b..fa4629ac 100644 --- a/tests/auto/qbluetoothsocket/tst_qbluetoothsocket.cpp +++ b/tests/auto/qbluetoothsocket/tst_qbluetoothsocket.cpp @@ -505,7 +505,7 @@ void tst_QBluetoothSocket::tst_preferredSecurityFlags() //test default values #if defined(QT_ANDROID_BLUETOOTH) | defined(QT_OSX_BLUETOOTH) QCOMPARE(socket.preferredSecurityFlags(), QBluetooth::Secure); -#elif defined(QT_BLUEZ_BLUETOOTH) +#elif QT_CONFIG(bluez) QCOMPARE(socket.preferredSecurityFlags(), QBluetooth::Authorization); #else QCOMPARE(socket.preferredSecurityFlags(), QBluetooth::NoSecurity); |