summaryrefslogtreecommitdiffstats
path: root/examples/bluetooth
diff options
context:
space:
mode:
Diffstat (limited to 'examples/bluetooth')
-rw-r--r--examples/bluetooth/heartrate-game/devicehandler.cpp2
-rw-r--r--examples/bluetooth/lowenergyscanner/device.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/bluetooth/heartrate-game/devicehandler.cpp b/examples/bluetooth/heartrate-game/devicehandler.cpp
index 3d263a4c..3bbadd7e 100644
--- a/examples/bluetooth/heartrate-game/devicehandler.cpp
+++ b/examples/bluetooth/heartrate-game/devicehandler.cpp
@@ -115,7 +115,7 @@ void DeviceHandler::setDevice(DeviceInfo *device)
// Make connections
//! [Connect-Signals-1]
- m_control = new QLowEnergyController(m_currentDevice->getDevice(), this);
+ m_control = QLowEnergyController::createCentral(m_currentDevice->getDevice(), this);
//! [Connect-Signals-1]
m_control->setRemoteAddressType(m_addressType);
//! [Connect-Signals-2]
diff --git a/examples/bluetooth/lowenergyscanner/device.cpp b/examples/bluetooth/lowenergyscanner/device.cpp
index cfbf4596..4e54d1e3 100644
--- a/examples/bluetooth/lowenergyscanner/device.cpp
+++ b/examples/bluetooth/lowenergyscanner/device.cpp
@@ -179,7 +179,7 @@ void Device::scanServices(const QString &address)
//! [les-controller-1]
if (!controller) {
// Connecting signals and slots for connecting to LE services.
- controller = new QLowEnergyController(currentDevice.getDevice());
+ controller = QLowEnergyController::createCentral(currentDevice.getDevice());
connect(controller, &QLowEnergyController::connected,
this, &Device::deviceConnected);
connect(controller, QOverload<QLowEnergyController::Error>::of(&QLowEnergyController::error),