summaryrefslogtreecommitdiffstats
path: root/src/network/kernel
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2011-11-30 15:42:05 +0000
committerQt by Nokia <qt-info@nokia.com>2011-11-30 19:04:18 +0100
commit49140efe2d0a31fd529b8e6af09e0df31e3a719c (patch)
tree2f85af2d284061c7e6f80a44184be9f2c7a17a60 /src/network/kernel
parent6468dd4179278276d3ad98696b6f761efa397924 (diff)
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 <thiago.macieira@intel.com>
Diffstat (limited to 'src/network/kernel')
-rw-r--r--src/network/kernel/qhostaddress.cpp2
1 files changed, 2 insertions, 0 deletions
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);
}