summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2018-10-31 11:05:50 +0100
committerOliver Wolff <oliver.wolff@qt.io>2018-11-15 14:37:30 +0000
commit4821972696716f988b4b92f22a9a552be15c5401 (patch)
treed00c215a5d386a45c3c633ba8a63e1c0194f2e05 /tests/auto
parentc2b510909dc8839ff6578086051a22e8b21462e3 (diff)
qbluetoothlocaldevice_p.cpp: Make sure d_ptr is initialized
Backends that still use qbluetoothlocaldevce_p.cpp (namely ios and winrt) overload QBluetoothLocalDevicePrivate::isValid. While it does not make a difference for ios (as false is returned if no d_ptr is initialized) local device will be seen as invalid on winrt if there is no d_ptr. Fixes: QTBUG-67090 Change-Id: I82dfa4563be0ed4800f0a8dd2a9ccfc3fe313e3b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp b/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp
index acc498cc..4564cf4d 100644
--- a/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp
+++ b/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp
@@ -185,11 +185,11 @@ void tst_QBluetoothServer::tst_receive()
bool localDeviceAvailable = localDev.isValid();
if (localDeviceAvailable) {
- // setHostMode is noop on OS X.
+ // setHostMode is noop on OS X and winrt.
setHostMode(address, hostmode);
if (hostmode == QBluetoothLocalDevice::HostPoweredOff) {
-#ifndef Q_OS_OSX
+#if !defined(Q_OS_OSX) && !QT_CONFIG(winrt_bt)
QCOMPARE(localDevice.hostMode(), hostmode);
#endif
} else {