From d58c5a6cf748bf4b7a9c51b10b14cb0c475829a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Thu, 21 Aug 2025 11:23:54 +0200 Subject: [PATCH] Fix bluetooth le connection --- .../bluetoothlowenergydeviceimplementation.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libnymea-core/hardware/bluetoothlowenergy/bluetoothlowenergydeviceimplementation.cpp b/libnymea-core/hardware/bluetoothlowenergy/bluetoothlowenergydeviceimplementation.cpp index be79d1e6..1394a868 100644 --- a/libnymea-core/hardware/bluetoothlowenergy/bluetoothlowenergydeviceimplementation.cpp +++ b/libnymea-core/hardware/bluetoothlowenergy/bluetoothlowenergydeviceimplementation.cpp @@ -48,7 +48,11 @@ BluetoothLowEnergyDeviceImplementation::BluetoothLowEnergyDeviceImplementation(c connect(m_controller, &QLowEnergyController::disconnected, this, &BluetoothLowEnergyDeviceImplementation::onDisconnected); connect(m_controller, &QLowEnergyController::discoveryFinished, this, &BluetoothLowEnergyDeviceImplementation::onServiceDiscoveryFinished); connect(m_controller, &QLowEnergyController::stateChanged, this, &BluetoothLowEnergyDeviceImplementation::onStateChanged); +#if QT_VERSION >= QT_VERSION_CHECK(6,0,0) + connect(m_controller, &QLowEnergyController::errorOccurred, this, &BluetoothLowEnergyDeviceImplementation::onDeviceError); +#else connect(m_controller, SIGNAL(error(QLowEnergyController::Error)), this, SLOT(onDeviceError(QLowEnergyController::Error))); +#endif } QString BluetoothLowEnergyDeviceImplementation::name() const