From ba56814fa4f0ca4a20d8448dcee95e5bf7c9d3a5 Mon Sep 17 00:00:00 2001 From: Alex Blasche Date: Wed, 5 Apr 2017 16:01:38 +0200 Subject: Replace custom QT_BLUEZ_BLUETOOTH against the related feature define Change-Id: I4fbb948841a610640acaf87364e2157e31782836 Reviewed-by: Kai Koehne --- .../qbluetoothdevicediscoveryagent.pro | 4 ---- .../tst_qbluetoothdevicediscoveryagent.cpp | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'tests/auto/qbluetoothdevicediscoveryagent') 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(); qRegisterMetaType(); -#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 -- cgit v1.2.3