diff options
author | Ahmad Samir <a.samirh78@gmail.com> | 2023-07-16 00:42:43 +0300 |
---|---|---|
committer | Ahmad Samir <a.samirh78@gmail.com> | 2023-07-17 13:24:11 +0300 |
commit | 6efdfeebba205b9db1eed144ca1808af58cf509a (patch) | |
tree | 40371899c34ebd717a25945925d59d57508ad798 /src/websockets/qwebsocket_p.cpp | |
parent | 95faeb4d75ee295f03f5d4739ecbfef5cbaaa8de (diff) |
Build with QT_NO_CONTEXTLESS_CONNECT
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: Ie5c6c756d35a3cd18b9ae7de708f0b314b5e2a15
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/websockets/qwebsocket_p.cpp')
-rw-r--r-- | src/websockets/qwebsocket_p.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/websockets/qwebsocket_p.cpp b/src/websockets/qwebsocket_p.cpp index b9ee4e5..401e756 100644 --- a/src/websockets/qwebsocket_p.cpp +++ b/src/websockets/qwebsocket_p.cpp @@ -480,7 +480,7 @@ void QWebSocketPrivate::open(const QNetworkRequest &request, QSslSocket *sslSocket = new QSslSocket(q); m_pSocket = sslSocket; if (Q_LIKELY(m_pSocket)) { - QObject::connect(sslSocket, &QSslSocket::connected, [sslSocket](){ + QObject::connect(sslSocket, &QSslSocket::connected, sslSocket, [sslSocket]() { sslSocket->setSocketOption(QAbstractSocket::LowDelayOption, 1); sslSocket->setSocketOption(QAbstractSocket::KeepAliveOption, 1); }); @@ -511,7 +511,7 @@ void QWebSocketPrivate::open(const QNetworkRequest &request, if (url.scheme() == QStringLiteral("ws")) { m_pSocket = new QTcpSocket(q); if (Q_LIKELY(m_pSocket)) { - QObject::connect(m_pSocket, &QTcpSocket::connected, [this](){ + QObject::connect(m_pSocket, &QTcpSocket::connected, m_pSocket, [this](){ m_pSocket->setSocketOption(QAbstractSocket::LowDelayOption, 1); m_pSocket->setSocketOption(QAbstractSocket::KeepAliveOption, 1); }); |