summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/socket
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2022-10-31 15:13:04 +0100
committerMårten Nordheim <marten.nordheim@qt.io>2022-11-02 19:46:19 +0100
commit4d3f5ac0cc731a1120154f707bceb57eb4ddabe2 (patch)
tree273b3eec233b9a0514f93fe2a351b08cd8aa9527 /tests/auto/network/socket
parent899e540d46adb72f212091ffb5fd3bf2262a556c (diff)
QHostAddress: Fix incorrect comparison against 'Any'
When 'this' is IPv6 and 'other' is Any then there is no point in testing 'other's IPv6 address. Added extra tests against QHostAddress::Any*. Pick-to: 6.4 6.2 5.15 Fixes: QTBUG-108103 Change-Id: I09f32b1b147b1ec8380546c91cd89684a6bebe2e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/network/socket')
-rw-r--r--tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
index b241f735b7..22d24ed448 100644
--- a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
+++ b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
@@ -628,7 +628,7 @@ void tst_QUdpSocket::dualStack()
QCOMPARE(dgram.senderAddress(), makeNonAny(v4Sock.localAddress(), QHostAddress::Null));
if (dgram.destinationPort() != -1) {
QCOMPARE(dgram.destinationPort(), int(dualSock.localPort()));
- QVERIFY(dgram.destinationAddress().isEqual(dualSock.localAddress()));
+ QVERIFY(dgram.destinationAddress().isEqual(makeNonAny(dualSock.localAddress(), QHostAddress::LocalHost)));
} else {
qInfo("Getting IPv4 destination address failed.");
}