From 8f3ddce790ca21b1201ef3aaa420c0c9b58279b3 Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 Date: Thu, 19 Jan 2023 22:36:54 +0100 Subject: [PATCH] work in progress --- devicefinder.cpp | 2 +- devicehandler.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/devicefinder.cpp b/devicefinder.cpp index 0d4f1ca..75b7285 100644 --- a/devicefinder.cpp +++ b/devicefinder.cpp @@ -11,7 +11,7 @@ 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), + connect(m_deviceDiscoveryAgent, static_cast(&QBluetoothDeviceDiscoveryAgent::errorOccurred), this, &DeviceFinder::scanError); connect(m_deviceDiscoveryAgent, &QBluetoothDeviceDiscoveryAgent::finished, this, &DeviceFinder::scanFinished); diff --git a/devicehandler.cpp b/devicehandler.cpp index 8a2772a..076de47 100644 --- a/devicehandler.cpp +++ b/devicehandler.cpp @@ -51,7 +51,7 @@ void DeviceHandler::setDevice(DeviceInfo *device) connect(m_control, &QLowEnergyController::discoveryFinished, this, &DeviceHandler::serviceScanDone); - connect(m_control, static_cast(&QLowEnergyController::error), + connect(m_control, static_cast(&QLowEnergyController::errorOccurred), this, [this](QLowEnergyController::Error error) { Q_UNUSED(error); setError("Cannot connect to remote device."); @@ -227,7 +227,7 @@ void DeviceHandler::serviceStateChanged(QLowEnergyService::ServiceState s) switch (s) { - case QLowEnergyService::DiscoveringServices: + case QLowEnergyService::RemoteServiceDiscovering: setInfo(tr("Discovering services...")); break; case QLowEnergyService::ServiceDiscovered: @@ -236,7 +236,7 @@ void DeviceHandler::serviceStateChanged(QLowEnergyService::ServiceState s) if (const QLowEnergyCharacteristic hrChar = m_service->characteristic(livestatsCharacUuid); hrChar.isValid()) { - m_notificationDescLivestats = hrChar.descriptor(QBluetoothUuid::ClientCharacteristicConfiguration); + m_notificationDescLivestats = hrChar.descriptor(QBluetoothUuid::DescriptorType::ClientCharacteristicConfiguration); if (m_notificationDescLivestats.isValid()) m_service->writeDescriptor(m_notificationDescLivestats, QByteArray::fromHex("0100")); }