mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 22:42:14 -07:00
fix deprecation warning
This commit is contained in:
parent
4e5d1f8b7b
commit
0ef2e924e3
1 changed files with 6 additions and 1 deletions
|
|
@ -46,14 +46,19 @@ RemoteClient::RemoteClient(QObject *parent)
|
|||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||
connect(socket, &QTcpSocket::errorOccurred, this, &RemoteClient::slotSocketError);
|
||||
#else
|
||||
connect(socket, &QTcpSocket::error, this, &RemoteClient::slotSocketError);
|
||||
connect(socket, qOverload<QAbstractSocket::SocketError>(&QTcpSocket::error), this, &RemoteClient::slotSocketError);
|
||||
#endif
|
||||
|
||||
websocket = new QWebSocket(QString(), QWebSocketProtocol::VersionLatest, this);
|
||||
connect(websocket, &QWebSocket::binaryMessageReceived, this, &RemoteClient::websocketMessageReceived);
|
||||
connect(websocket, &QWebSocket::connected, this, &RemoteClient::slotConnected);
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 5, 0))
|
||||
connect(websocket, &QWebSocket::errorOccurred, this, &RemoteClient::slotWebSocketError);
|
||||
#else
|
||||
connect(websocket, qOverload<QAbstractSocket::SocketError>(&QWebSocket::error), this,
|
||||
&RemoteClient::slotWebSocketError);
|
||||
#endif
|
||||
|
||||
connect(this, &RemoteClient::serverIdentificationEventReceived, this,
|
||||
&RemoteClient::processServerIdentificationEvent);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue