summaryrefslogtreecommitdiffstats
path: root/examples/bluetooth/heartrate-game
diff options
context:
space:
mode:
authorAndreas Buhr <andreas.buhr@qt.io>2021-03-16 20:09:11 +0100
committerAndreas Buhr <andreas.buhr@qt.io>2021-03-22 13:51:28 +0100
commit75c3a3ee9fd13fe3717b93d575cd7a72415d0bdd (patch)
treef6131b91438e958dc0b1e6788b32f8ea72dadac2 /examples/bluetooth/heartrate-game
parent50311fdd2da129645a8452b7bf644c332ff3808a (diff)
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 <alexander.blasche@qt.io>
Diffstat (limited to 'examples/bluetooth/heartrate-game')
-rw-r--r--examples/bluetooth/heartrate-game/devicefinder.cpp4
-rw-r--r--examples/bluetooth/heartrate-game/devicehandler.cpp10
2 files changed, 7 insertions, 7 deletions
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<void (QBluetoothDeviceDiscoveryAgent::*)(QBluetoothDeviceDiscoveryAgent::Error)>(&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<void (QLowEnergyController::*)(QLowEnergyController::Error)>(&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();