summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@qt.io>2018-08-20 14:29:42 +0200
committerAlex Blasche <alexander.blasche@qt.io>2018-08-21 06:55:28 +0000
commit175dca8f8b3aff6e5659e7a40b0f2a3d241e9c3b (patch)
tree778d6534b76d1af0d9d3f103d097e8690be80528 /tests/auto
parent322eb120c9237a390ef4d1e29605222498729803 (diff)
Remove direct usage of QLowEnergyController::ctor
QLowEnergyController::createCentral() is the official API to do the same. Change-Id: Idbd26d201b24add6697f6f9cdf1194511c160273 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qlowenergycharacteristic/tst_qlowenergycharacteristic.cpp2
-rw-r--r--tests/auto/qlowenergydescriptor/tst_qlowenergydescriptor.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/qlowenergycharacteristic/tst_qlowenergycharacteristic.cpp b/tests/auto/qlowenergycharacteristic/tst_qlowenergycharacteristic.cpp
index 1862af7f..7e191052 100644
--- a/tests/auto/qlowenergycharacteristic/tst_qlowenergycharacteristic.cpp
+++ b/tests/auto/qlowenergycharacteristic/tst_qlowenergycharacteristic.cpp
@@ -115,7 +115,7 @@ void tst_QLowEnergyCharacteristic::initTestCase()
// find first service with descriptor
QLowEnergyController *controller = 0;
for (const QBluetoothDeviceInfo &remoteDevice : qAsConst(remoteLeDevices)) {
- controller = new QLowEnergyController(remoteDevice, this);
+ controller = QLowEnergyController::createCentral(remoteDevice, this);
qDebug() << "Connecting to" << remoteDevice.name()
<< remoteDevice.address() << remoteDevice.deviceUuid();
controller->connectToDevice();
diff --git a/tests/auto/qlowenergydescriptor/tst_qlowenergydescriptor.cpp b/tests/auto/qlowenergydescriptor/tst_qlowenergydescriptor.cpp
index b6ab0e53..4e82aacd 100644
--- a/tests/auto/qlowenergydescriptor/tst_qlowenergydescriptor.cpp
+++ b/tests/auto/qlowenergydescriptor/tst_qlowenergydescriptor.cpp
@@ -106,7 +106,7 @@ void tst_QLowEnergyDescriptor::initTestCase()
// find first service with descriptor
QLowEnergyController *controller = 0;
for (const QBluetoothDeviceInfo& remoteDeviceInfo : qAsConst(remoteLeDeviceInfos)) {
- controller = new QLowEnergyController(remoteDeviceInfo, this);
+ controller = QLowEnergyController::createCentral(remoteDeviceInfo, this);
qDebug() << "Connecting to" << remoteDeviceInfo.address();
controller->connectToDevice();
QTRY_IMPL(controller->state() != QLowEnergyController::ConnectingState,