From 3fe74b76fd0eaf39d4c6681e2edca5adbf107883 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 7 Aug 2017 20:52:11 -0700 Subject: QHostInfo: Make getaddrinfo() mandatory All systems must implement it by now. If there's any system still without it, that means it has no IPv6 support, so they can disable QtNetwork entirely. [ChangeLog][Deprecation Notice] Starting with Qt 5.10, IPv6 support is mandatory for all platforms. Systems without proper IPv6 support, such as the getaddrinfo() function or the proper socket address structures, will not be able to build QtNetwork anymore. Change-Id: I3868166e5efc45538544fffd14d8c28046f9191b Reviewed-by: Edward Welbourne --- tests/auto/network/kernel/qhostinfo/BLACKLIST | 6 ++++++ tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp | 15 ++++----------- 2 files changed, 10 insertions(+), 11 deletions(-) create mode 100644 tests/auto/network/kernel/qhostinfo/BLACKLIST (limited to 'tests/auto/network/kernel/qhostinfo') diff --git a/tests/auto/network/kernel/qhostinfo/BLACKLIST b/tests/auto/network/kernel/qhostinfo/BLACKLIST new file mode 100644 index 0000000000..87c5fe991f --- /dev/null +++ b/tests/auto/network/kernel/qhostinfo/BLACKLIST @@ -0,0 +1,6 @@ +# These tests fail due to a DNS server issue +# (this is not a Qt bug) +[lookupIPv6:a-plus-aaaa] +windows ci +[blockingLookup:a-plus-aaaa] +windows ci diff --git a/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp b/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp index cb7e66bad4..caf8145c19 100644 --- a/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp +++ b/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp @@ -64,14 +64,10 @@ #include #include "private/qhostinfo_p.h" -#if !defined(QT_NO_GETADDRINFO) -# include -# if defined(Q_OS_UNIX) +#include +#if defined(Q_OS_UNIX) # include -# endif -# if !defined(Q_OS_WIN) # include -# endif #endif #include "../../../network-settings.h" @@ -204,15 +200,13 @@ void tst_QHostInfo::initTestCase() ipv6Available = true; } -// HP-UX 11i does not support IPv6 reverse lookups. -#if !defined(QT_NO_GETADDRINFO) && !(defined(Q_OS_HPUX) && defined(__ia64)) // check if the system getaddrinfo can do IPv6 lookups struct addrinfo hint, *result = 0; memset(&hint, 0, sizeof hint); hint.ai_family = AF_UNSPEC; -# ifdef AI_ADDRCONFIG +#ifdef AI_ADDRCONFIG hint.ai_flags = AI_ADDRCONFIG; -# endif +#endif int res = getaddrinfo("::1", "80", &hint, &result); if (res == 0) { @@ -224,7 +218,6 @@ void tst_QHostInfo::initTestCase() ipv6LookupsAvailable = true; } } -#endif // run each testcase with and without test enabled QTest::addColumn("cache"); -- cgit v1.2.3