Skip to content

Commit

Permalink
Replace QWebSocket::error with errorOccurred
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
  • Loading branch information
claucambra committed Nov 28, 2024
1 parent 73ebd6f commit afc56ad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libsync/pushnotifications.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ PushNotifications::PushNotifications(Account *account, QObject *parent)
, _account(account)
, _webSocket(new QWebSocket(QString(), QWebSocketProtocol::VersionLatest, this))
{
connect(_webSocket, QOverload<QAbstractSocket::SocketError>::of(&QWebSocket::error), this, &PushNotifications::onWebSocketError);
connect(_webSocket, QOverload<QAbstractSocket::SocketError>::of(&QWebSocket::errorOccurred), this, &PushNotifications::onWebSocketError);
connect(_webSocket, &QWebSocket::sslErrors, this, &PushNotifications::onWebSocketSslErrors);
connect(_webSocket, &QWebSocket::connected, this, &PushNotifications::onWebSocketConnected);
connect(_webSocket, &QWebSocket::disconnected, this, &PushNotifications::onWebSocketDisconnected);
Expand Down Expand Up @@ -76,7 +76,7 @@ void PushNotifications::closeWebSocket()
_reconnectTimer->stop();
}

disconnect(_webSocket, QOverload<QAbstractSocket::SocketError>::of(&QWebSocket::error), this, &PushNotifications::onWebSocketError);
disconnect(_webSocket, QOverload<QAbstractSocket::SocketError>::of(&QWebSocket::errorOccurred), this, &PushNotifications::onWebSocketError);
disconnect(_webSocket, &QWebSocket::sslErrors, this, &PushNotifications::onWebSocketSslErrors);

_webSocket->close();
Expand Down Expand Up @@ -174,7 +174,7 @@ void PushNotifications::openWebSocket()
const auto webSocketUrl = capabilities.pushNotificationsWebSocketUrl();

qCInfo(lcPushNotifications) << "Open connection to websocket on" << webSocketUrl << "for account" << _account->url();
connect(_webSocket, QOverload<QAbstractSocket::SocketError>::of(&QWebSocket::error), this, &PushNotifications::onWebSocketError);
connect(_webSocket, QOverload<QAbstractSocket::SocketError>::of(&QWebSocket::errorOccurred), this, &PushNotifications::onWebSocketError);
connect(_webSocket, &QWebSocket::sslErrors, this, &PushNotifications::onWebSocketSslErrors);
_webSocket->open(webSocketUrl);
}
Expand Down

0 comments on commit afc56ad

Please sign in to comment.