From f57dd8761ae53e0cf7812704e442ea16189c5a7b Mon Sep 17 00:00:00 2001 From: Sergei Ilinykh Date: Sun, 14 Jul 2024 01:25:35 +0300 Subject: [PATCH] Fix lambda capture deprecation warning --- src/xmpp/xmpp-im/xmpp_carbons.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xmpp/xmpp-im/xmpp_carbons.cpp b/src/xmpp/xmpp-im/xmpp_carbons.cpp index 829bac56..ba4cd211 100644 --- a/src/xmpp/xmpp-im/xmpp_carbons.cpp +++ b/src/xmpp/xmpp-im/xmpp_carbons.cpp @@ -188,7 +188,7 @@ void CarbonsManager::setEnabled(bool enable) JT_MessageCarbons *jt = new JT_MessageCarbons(d->push_m->client()->rootTask()); connect( jt, &JT_MessageCarbons::finished, this, - [=]() { + [this, jt]() { if (jt->success()) d->enable = true; else @@ -202,7 +202,7 @@ void CarbonsManager::setEnabled(bool enable) JT_MessageCarbons *jt = new JT_MessageCarbons(d->push_m->client()->rootTask()); connect( jt, &JT_MessageCarbons::finished, this, - [=]() { + [this]() { d->enable = false; d->unsubscribe(); emit finished();