Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.12.0
-
None
-
-
8
-
Team 1 Foundation_Sprint 47
Description
There is apparently no way to check if a bluetooth adapter is present or not.
All functions below will return "false" even if an adapter is present. I would expect at least one to return "true" when the adapter is present and "false" when it's not. Else, there is no way to inform the end user about bluetooth being available or not.
bool isBluetoothAvailable1() { return !QBluetoothLocalDevice::allDevices().empty(); } bool isBluetoothAvailable2() { QBluetoothLocalDevice localDevice; return localDevice.isValid(); } bool isBluetoothAvailable3() { std::shared_ptr<QLowEnergyController> created( QLowEnergyController::createPeripheral() ); return created && !created->localAddress().isNull(); } bool isBluetoothAvailable4() { std::shared_ptr<QLowEnergyController> created( QLowEnergyController::createCentral( QBluetoothDeviceInfo() ) ); return created && !created->localAddress().isNull(); }
Attachments
Issue Links
- resulted in
-
QTBUG-98942 Finalize QBluetoothLocalDevice support on Windows
- Closed
For Gerrit Dashboard: QTBUG-75100 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
382092,8 | Windows: extend QBluetoothLocalDevice implementation | dev | qt/qtconnectivity | Status: MERGED | +2 | 0 |