From 49140efe2d0a31fd529b8e6af09e0df31e3a719c Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Wed, 30 Nov 2011 15:42:05 +0000 Subject: Fix QHostAddress::operator==(QHostAddress::SpecialAddress) QHostAddress(QHostAddress::Any) was not equal to QHostAddress::Any because only one of the operator== overloads was handling this. Task-number: QTBUG-22898 Change-Id: Ifd36947a50e8c36362b4e850fd8d5105ee0925ff Reviewed-by: Thiago Macieira --- src/network/kernel/qhostaddress.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/network') diff --git a/src/network/kernel/qhostaddress.cpp b/src/network/kernel/qhostaddress.cpp index cbd804c44b..b662a1d610 100644 --- a/src/network/kernel/qhostaddress.cpp +++ b/src/network/kernel/qhostaddress.cpp @@ -899,6 +899,8 @@ bool QHostAddress::operator ==(SpecialAddress other) const return otherAddress.d->protocol == QAbstractSocket::IPv6Protocol && memcmp(&d->a6, &otherAddress.d->a6, sizeof(Q_IPV6ADDR)) == 0; } + if (d->protocol == QAbstractSocket::AnyIPProtocol) + return other == QHostAddress::Any; return int(other) == int(Null); } -- cgit v1.2.3