From fdca99e57d848cb471b0cadc609e367028a87bb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20Lindstr=C3=B6m?= Date: Fri, 20 Dec 2019 18:17:17 +0800 Subject: [PATCH] Accept Ipv4 or Ipv6 --- src/tests/TestServent.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/tests/TestServent.h b/src/tests/TestServent.h index 0207af279..5bdb33e83 100644 --- a/src/tests/TestServent.h +++ b/src/tests/TestServent.h @@ -93,11 +93,8 @@ private slots: Servent* servent; listenAllBasic( &servent ); - // Check for IPv4 localhost - QVERIFY( servent->isIPWhitelisted( QHostAddress::LocalHost ) ); - - // Check for IPv6 localhost - QVERIFY( servent->isIPWhitelisted( QHostAddress::LocalHostIPv6 ) ); + // Check for IPv4/v6 localhost + QVERIFY( servent->isIPWhitelisted( QHostAddress::LocalHost ) || servent->isIPWhitelisted( QHostAddress::LocalHostIPv6 ) ); // Verify that all interface addresses are whitelisted. foreach ( QHostAddress addr, QNetworkInterface::allAddresses() )