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