From f32a6591126ec1c357b4946eb0e45f6d172812a3 Mon Sep 17 00:00:00 2001 From: APTX Date: Sun, 25 Oct 2015 14:57:54 +0100 Subject: [PATCH] Ensure the client only connects with IPv4. AniDB does not support IPv6. --- client.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client.cpp b/client.cpp index 7ebcdd4..52fa317 100644 --- a/client.cpp +++ b/client.cpp @@ -295,7 +295,11 @@ qDebug() << "Entering Connecting State"; qDebug() << "Host address is:" << m_hostAddress; if (!m_hostAddress.isNull()) { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + if (socket->bind(QHostAddress::AnyIPv4, m_localPort)) +#else if (socket->bind(QHostAddress::Any, m_localPort)) +#endif { #ifdef ANIDBUDPCLIENT_CLIENT_MISC_DEBUG qDebug() << "Successful connection"; -- 2.52.0