diff --git a/src/cli/abstractcommand.cpp b/src/cli/abstractcommand.cpp index ab81cc6b9..fa40bfed9 100644 --- a/src/cli/abstractcommand.cpp +++ b/src/cli/abstractcommand.cpp @@ -33,7 +33,7 @@ AbstractCommand::AbstractCommand(QObject * const parent) : QObject(parent), #else &PokitDiscoveryAgent::errorOccurred, #endif - [](const PokitDiscoveryAgent::Error &error) { + this, [](const PokitDiscoveryAgent::Error &error) { qCWarning(lc).noquote() << tr("Bluetooth discovery error:") << error; QTimer::singleShot(0, QCoreApplication::instance(), [](){ QCoreApplication::exit(EXIT_FAILURE); diff --git a/src/lib/abstractpokitservice.cpp b/src/lib/abstractpokitservice.cpp index f83cd1a3c..fbc5f188d 100644 --- a/src/lib/abstractpokitservice.cpp +++ b/src/lib/abstractpokitservice.cpp @@ -221,14 +221,14 @@ bool AbstractPokitServicePrivate::createServiceObject() connect(service, &QLowEnergyService::characteristicChanged, this, &AbstractPokitServicePrivate::characteristicChanged); - connect(service, &QLowEnergyService::descriptorRead, + connect(service, &QLowEnergyService::descriptorRead, this, [](const QLowEnergyDescriptor &descriptor, const QByteArray &value){ qCDebug(lc).noquote() << tr(R"(Descriptor "%1" (%2) read.)") .arg(descriptor.name(), descriptor.uuid().toString()); Q_UNUSED(value) }); - connect(service, &QLowEnergyService::descriptorWritten, + connect(service, &QLowEnergyService::descriptorWritten, this, [](const QLowEnergyDescriptor &descriptor, const QByteArray &newValue){ qCDebug(lc).noquote() << tr(R"(Descriptor "%1" (%2) written.)") .arg(descriptor.name(), descriptor.uuid().toString());