From 21ca922eeeab672896264c09df13c0a8f14b5358 Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Tue, 11 Jul 2023 00:03:36 +0300 Subject: Build with QT_NO_CONTEXTLESS_CONNECT (add it to .cmake.conf) This disables the 3-arg QObject::connect() overload: QObject::connect(sender, signal, functor) For details see: https://lists.qt-project.org/pipermail/development/2023-July/044141.html Change-Id: Ie9fe431feac6db6a8981b65fbc25bc8a1e352457 Reviewed-by: Sona Kurazyan --- src/coap/qcoapprotocol.cpp | 4 ++-- src/coap/qcoapqudpconnection.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/coap/qcoapprotocol.cpp b/src/coap/qcoapprotocol.cpp index eb499ed..7b6238a 100644 --- a/src/coap/qcoapprotocol.cpp +++ b/src/coap/qcoapprotocol.cpp @@ -166,12 +166,12 @@ void QCoapProtocol::sendRequest(QPointer reply, QCoapConnection *con internalRequest->setTimeout(maximumTimeout()); } - connect(internalRequest.data(), &QCoapInternalRequest::timeout, + connect(internalRequest.data(), &QCoapInternalRequest::timeout, this, [this](QCoapInternalRequest *request) { Q_D(QCoapProtocol); d->onRequestTimeout(request); }); - connect(internalRequest.data(), &QCoapInternalRequest::maxTransmissionSpanReached, + connect(internalRequest.data(), &QCoapInternalRequest::maxTransmissionSpanReached, this, [this](QCoapInternalRequest *request) { Q_D(QCoapProtocol); d->onRequestMaxTransmissionSpanReached(request); diff --git a/src/coap/qcoapqudpconnection.cpp b/src/coap/qcoapqudpconnection.cpp index c21cd30..99a9461 100644 --- a/src/coap/qcoapqudpconnection.cpp +++ b/src/coap/qcoapqudpconnection.cpp @@ -68,7 +68,7 @@ QCoapQUdpConnection::QCoapQUdpConnection(QCoapQUdpConnectionPrivate &dd, QObject if (isSecure()) { #if QT_CONFIG(dtls) - connect(this, &QCoapConnection::securityConfigurationChanged, + connect(this, &QCoapConnection::securityConfigurationChanged, this, [this]() { Q_D(QCoapQUdpConnection); d->setSecurityConfiguration(securityConfiguration()); @@ -121,11 +121,11 @@ void QCoapQUdpConnection::createSocket() d->udpSocket = new QUdpSocket(this); - connect(d->udpSocket.data(), &QUdpSocket::readyRead, [this]() { + connect(d->udpSocket.data(), &QUdpSocket::readyRead, this, [this]() { Q_D(QCoapQUdpConnection); d->socketReadyRead(); }); - connect(d->udpSocket.data(), &QUdpSocket::errorOccurred, + connect(d->udpSocket.data(), &QUdpSocket::errorOccurred, this, [this](QAbstractSocket::SocketError socketError) { qCWarning(lcCoapConnection) << "CoAP UDP socket error" << socketError << socket()->errorString(); -- cgit v1.2.3