diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-03-13 11:46:34 +0100 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-03-16 16:13:46 +0100 |
commit | ebf6bf3b01f312fe066225c67f794f7ab67cb49a (patch) | |
tree | dedd7bf825c7564985ecdb7b89e5025923377f9b | |
parent | afe20375bab3dea584c3b6c9bc5812da78f6618e (diff) |
Fix some network related deprecation warnings
Change-Id: I0e5e9e42b7c81e1fa5d6abde6bd6346dbc2f14ff
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r-- | src/plugins/qmltooling/qmldbg_local/qlocalclientconnection.cpp | 2 | ||||
-rw-r--r-- | src/qmldebug/qqmldebugconnection.cpp | 4 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgrhisupport.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/qmltooling/qmldbg_local/qlocalclientconnection.cpp b/src/plugins/qmltooling/qmldbg_local/qlocalclientconnection.cpp index 1708166a8a..e641a901ad 100644 --- a/src/plugins/qmltooling/qmldbg_local/qlocalclientconnection.cpp +++ b/src/plugins/qmltooling/qmldbg_local/qlocalclientconnection.cpp @@ -133,7 +133,7 @@ bool QLocalClientConnection::connectToServer() connect(m_socket, &QLocalSocket::connected, this, &QLocalClientConnection::connectionEstablished); connect(m_socket, static_cast<void(QLocalSocket::*)(QLocalSocket::LocalSocketError)>( - &QLocalSocket::error), m_socket, [this](QLocalSocket::LocalSocketError) { + &QLocalSocket::errorOccurred), m_socket, [this](QLocalSocket::LocalSocketError) { m_socket->disconnectFromServer(); m_socket->connectToServer(m_filename); }, Qt::QueuedConnection); diff --git a/src/qmldebug/qqmldebugconnection.cpp b/src/qmldebug/qqmldebugconnection.cpp index 4e087ee6db..ed11bd46db 100644 --- a/src/qmldebug/qqmldebugconnection.cpp +++ b/src/qmldebug/qqmldebugconnection.cpp @@ -388,7 +388,7 @@ void QQmlDebugConnection::connectToHost(const QString &hostName, quint16 port) connect(socket, &QAbstractSocket::disconnected, this, &QQmlDebugConnection::socketDisconnected); connect(socket, &QAbstractSocket::connected, this, &QQmlDebugConnection::socketConnected); connect(socket, static_cast<void(QAbstractSocket::*)(QAbstractSocket::SocketError)>( - &QAbstractSocket::error), this, &QQmlDebugConnection::socketError); + &QAbstractSocket::errorOccurred), this, &QQmlDebugConnection::socketError); connect(socket, &QAbstractSocket::stateChanged, this, &QQmlDebugConnection::socketStateChanged); socket->connectToHost(hostName, port); } @@ -416,7 +416,7 @@ public: connect(parent, &QLocalSocket::stateChanged, this, &LocalSocketSignalTranslator::onStateChanged); connect(parent, static_cast<void(QLocalSocket::*)(QLocalSocket::LocalSocketError)>( - &QLocalSocket::error), this, &LocalSocketSignalTranslator::onError); + &QLocalSocket::errorOccurred), this, &LocalSocketSignalTranslator::onError); } void onError(QLocalSocket::LocalSocketError error) diff --git a/src/quick/scenegraph/qsgrhisupport.cpp b/src/quick/scenegraph/qsgrhisupport.cpp index cf30cb3f9a..84a9669365 100644 --- a/src/quick/scenegraph/qsgrhisupport.cpp +++ b/src/quick/scenegraph/qsgrhisupport.cpp @@ -580,7 +580,7 @@ void QSGRhiProfileConnection::initialize(QRhi *rhi) profPort = 30667; qCDebug(QSG_LOG_INFO, "Sending RHI profiling output to %s:%d", qPrintable(profHost), profPort); m_profConn.reset(new QTcpSocket); - QObject::connect(m_profConn.data(), QOverload<QAbstractSocket::SocketError>::of(&QAbstractSocket::error), m_profConn.data(), + QObject::connect(m_profConn.data(), &QAbstractSocket::errorOccurred, m_profConn.data(), [this](QAbstractSocket::SocketError socketError) { qWarning(" RHI profiler error: %d (%s)", socketError, qPrintable(m_profConn->errorString())); }); m_profConn->connectToHost(profHost, profPort); |