[Development] QLowEnergyController and obsolete ctor

Alex Blasche alexander.blasche at qt.io
Tue Aug 29 13:18:02 CEST 2017


Hi Martin,

> -----Original Message-----
> From: Development [mailto:development-
> bounces+alexander.blasche=qt.io at qt-project.org] On Behalf Of Martin Koller

> In Qt 5.9 I find that the following ctor is marked as obsolete:
> 
>     explicit QLowEnergyController(const QBluetoothAddress &remoteDevice,
>                                   const QBluetoothAddress &localDevice,
>                                   QObject *parent = Q_NULLPTR); // TODO Qt 6 remove ctor
> 
> but there is no other way to create a QLowEnergyController which does not use
> the local default adapter.
> 
> How is this supposed to work ?

The ctor still exists and works. You can use it for Bluetooth Central use cases. Having two local adapters is a very rare use case and only supported when using Bluez. That's why it has moved to obsolete. The fix would be to overload QLEController::createCentral(). Could you file a bug for it and assign it to me?

--
Alex



More information about the Development mailing list