Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-75100

There is no way to know if a bluetooth adapter is available

    XMLWordPrintable

Details

    • Windows, WinRT
    • 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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              ivan.solovev Ivan Solovev
              jpo38 Jean Porcherot
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes