fix deprecation warning

This commit is contained in:
RickyRister 2025-04-15 02:44:29 -07:00
parent 4e5d1f8b7b
commit 0ef2e924e3

View file

@ -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);