Commit 56da16bc authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compile against last qt5.15 without deprecated methods

parent 952d7f45
......@@ -53,10 +53,14 @@ namespace KCDDB
{
qCDebug(LIBKCDDB) << "Couldn't connect to " << socket_->peerName() << ":" << socket_->peerPort();
qCDebug(LIBKCDDB) << "Socket error: " << socket_->errorString();
if ( socket_->error() == QAbstractSocket::HostNotFoundError )
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
const auto socketError = socket_->error();
#else
const auto socketError = socket_->socketError();
#endif
if ( socketError == QAbstractSocket::HostNotFoundError )
return HostNotFound;
else if ( socket_->error() == QAbstractSocket::SocketTimeoutError )
else if ( socketError == QAbstractSocket::SocketTimeoutError )
return NoResponse;
else
return UnknownError;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment