summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimur Pocheptsov <Timur.Pocheptsov@digia.com>2014-12-03 13:08:48 +0100
committerTimur Pocheptsov <Timur.Pocheptsov@digia.com>2014-12-03 16:37:26 +0100
commitff28b5529c7620f57130f24ce4fd6d55ab49c0af (patch)
treec6f73dca05edccf597df5c046c01a509426f9994 /src
parent43536fcb2970bcf3fa67b36777a9cf16ff46363d (diff)
QBluetoothLocalDevice - isValid, tests (OS X and iOS)
Cancel the previous modification - even if BT is off, the device is valid unless we create it with some address (in the 'OFF' state I can not verify any address and the device is considered invalid). Enable (back) auto-test - if BT is off we just skip the test (as it's done in other test functions). Change-Id: I8b013af6a73eab9699a91834e197716836b00e78 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/bluetooth/qbluetoothlocaldevice_osx.mm6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/bluetooth/qbluetoothlocaldevice_osx.mm b/src/bluetooth/qbluetoothlocaldevice_osx.mm
index 7e5cb12a..38f15b8c 100644
--- a/src/bluetooth/qbluetoothlocaldevice_osx.mm
+++ b/src/bluetooth/qbluetoothlocaldevice_osx.mm
@@ -120,11 +120,7 @@ QBluetoothLocalDevicePrivate::QBluetoothLocalDevicePrivate(QBluetoothLocalDevice
QT_BT_MAC_AUTORELEASEPOOL;
HostController defaultController([[IOBluetoothHostController defaultController] retain]);
- if (!defaultController || [defaultController powerState] != kBluetoothHCIPowerStateON) {
- // IOBluetooth can return non-null host controller without working adapter.
- // Unfortunately, a local device in such a state is totally useless:
- // you can not access any information like address/name or change the device
- // state to powered on. So it's not valid.
+ if (!defaultController) {
qCCritical(QT_BT_OSX) << "QBluetoothLocalDevicePrivate(), failed to "
"init a host controller object";
return;