Skip to content

Commit b3d7ac3

Browse files
committed
fix: use errorOccurred signal in qt 5.15 and up
1 parent d1625e5 commit b3d7ac3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/core/ircconnection.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,11 @@ void IrcConnection::setSocket(QAbstractSocket* socket)
11621162
connect(socket, SIGNAL(connected()), this, SLOT(_irc_connected()));
11631163
connect(socket, SIGNAL(disconnected()), this, SLOT(_irc_disconnected()));
11641164
connect(socket, SIGNAL(readyRead()), this, SLOT(_irc_readData()));
1165+
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
1166+
connect(socket, SIGNAL(errorOccurred(QAbstractSocket::SocketError)), this, SLOT(_irc_error(QAbstractSocket::SocketError)));
1167+
#else
11651168
connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(_irc_error(QAbstractSocket::SocketError)));
1169+
#endif
11661170
connect(socket, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(_irc_state(QAbstractSocket::SocketState)));
11671171
if (isSecure())
11681172
connect(socket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(_irc_sslErrors()));

0 commit comments

Comments
 (0)