From 8a6d9c307851f3492ddc597f5f03e80f236a7857 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 15 Jul 2019 12:57:40 +0200 Subject: Fix compilation with C++20 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implicit capture of 'this' in [=] is deprecated in C++20. Fix by using explicit capture. Change-Id: I96132d83d87ae61986ba1b1ea3f9cf8e50059f1f Reviewed-by: MÃ¥rten Nordheim --- src/bluetooth/qlowenergycontroller_bluezdbus.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bluetooth/qlowenergycontroller_bluezdbus.cpp b/src/bluetooth/qlowenergycontroller_bluezdbus.cpp index f019d9c2..26ceefb0 100644 --- a/src/bluetooth/qlowenergycontroller_bluezdbus.cpp +++ b/src/bluetooth/qlowenergycontroller_bluezdbus.cpp @@ -336,7 +336,7 @@ void QLowEnergyControllerPrivateBluezDBus::connectToDevice() QDBusPendingReply<> reply = device->Connect(); QDBusPendingCallWatcher* watcher = new QDBusPendingCallWatcher(reply, this); connect(watcher, &QDBusPendingCallWatcher::finished, this, - [=](QDBusPendingCallWatcher* call) { + [this](QDBusPendingCallWatcher* call) { QDBusPendingReply<> reply = *call; if (reply.isError()) { qCDebug(QT_BT_BLUEZ) << "BTLE_DBUS::connect() failed" @@ -358,7 +358,7 @@ void QLowEnergyControllerPrivateBluezDBus::disconnectFromDevice() QDBusPendingReply<> reply = device->Disconnect(); QDBusPendingCallWatcher* watcher = new QDBusPendingCallWatcher(reply, this); connect(watcher, &QDBusPendingCallWatcher::finished, this, - [=](QDBusPendingCallWatcher* call) { + [this](QDBusPendingCallWatcher* call) { QDBusPendingReply<> reply = *call; if (reply.isError()) { qCDebug(QT_BT_BLUEZ) << "BTLE_DBUS::disconnect() failed" -- cgit v1.2.3