add compatibility code for pre 5.15 qt (#807)
This commit is contained in:
parent
d056030e6c
commit
15c2e0022d
@ -152,7 +152,11 @@ void NetworkManager::connect_to_server(server_type p_server)
|
|||||||
});
|
});
|
||||||
connect(server_socket.tcp, &QAbstractSocket::disconnected, ao_app,
|
connect(server_socket.tcp, &QAbstractSocket::disconnected, ao_app,
|
||||||
&AOApplication::server_disconnected);
|
&AOApplication::server_disconnected);
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
|
||||||
|
connect(server_socket.tcp, QOverload<QAbstractSocket::SocketError>::of(&QAbstractSocket::error), this, [this] {
|
||||||
|
#else
|
||||||
connect(server_socket.tcp, &QAbstractSocket::errorOccurred, this, [this] {
|
connect(server_socket.tcp, &QAbstractSocket::errorOccurred, this, [this] {
|
||||||
|
#endif
|
||||||
qCritical() << "TCP socket error:" << server_socket.tcp->errorString();
|
qCritical() << "TCP socket error:" << server_socket.tcp->errorString();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user