From 75c3a3ee9fd13fe3717b93d575cd7a72415d0bdd Mon Sep 17 00:00:00 2001 From: Andreas Buhr Date: Tue, 16 Mar 2021 20:09:11 +0100 Subject: rename error signals to errorOccurred Currently, there is a name clash between the error getter and the error signal. This leads to extensive use of qOverload or similar. This patch renames all error signals to errorOccurred to resolve this. Task-number: QTBUG-62877 Change-Id: I615e2405f855433b6e142d820072c4d3f35ae28f Reviewed-by: Alex Blasche --- examples/bluetooth/heartrate-game/devicefinder.cpp | 4 ++-- examples/bluetooth/heartrate-game/devicehandler.cpp | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'examples/bluetooth/heartrate-game') diff --git a/examples/bluetooth/heartrate-game/devicefinder.cpp b/examples/bluetooth/heartrate-game/devicefinder.cpp index 19ebee90..c63327f6 100644 --- a/examples/bluetooth/heartrate-game/devicefinder.cpp +++ b/examples/bluetooth/heartrate-game/devicefinder.cpp @@ -61,8 +61,8 @@ DeviceFinder::DeviceFinder(DeviceHandler *handler, QObject *parent): m_deviceDiscoveryAgent->setLowEnergyDiscoveryTimeout(5000); connect(m_deviceDiscoveryAgent, &QBluetoothDeviceDiscoveryAgent::deviceDiscovered, this, &DeviceFinder::addDevice); - connect(m_deviceDiscoveryAgent, static_cast(&QBluetoothDeviceDiscoveryAgent::error), - this, &DeviceFinder::scanError); + connect(m_deviceDiscoveryAgent, &QBluetoothDeviceDiscoveryAgent::errorOccurred, this, + &DeviceFinder::scanError); connect(m_deviceDiscoveryAgent, &QBluetoothDeviceDiscoveryAgent::finished, this, &DeviceFinder::scanFinished); connect(m_deviceDiscoveryAgent, &QBluetoothDeviceDiscoveryAgent::canceled, this, &DeviceFinder::scanFinished); diff --git a/examples/bluetooth/heartrate-game/devicehandler.cpp b/examples/bluetooth/heartrate-game/devicehandler.cpp index 96d93044..16e94577 100644 --- a/examples/bluetooth/heartrate-game/devicehandler.cpp +++ b/examples/bluetooth/heartrate-game/devicehandler.cpp @@ -121,11 +121,11 @@ void DeviceHandler::setDevice(DeviceInfo *device) connect(m_control, &QLowEnergyController::discoveryFinished, this, &DeviceHandler::serviceScanDone); - connect(m_control, static_cast(&QLowEnergyController::error), - this, [this](QLowEnergyController::Error error) { - Q_UNUSED(error); - setError("Cannot connect to remote device."); - }); + connect(m_control, &QLowEnergyController::errorOccurred, this, + [this](QLowEnergyController::Error error) { + Q_UNUSED(error); + setError("Cannot connect to remote device."); + }); connect(m_control, &QLowEnergyController::connected, this, [this]() { setInfo("Controller connected. Search services..."); m_control->discoverServices(); -- cgit v1.2.3