Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.5.3, 4.6.0, 4.6.1, 4.6.2, 4.6.3, 4.7.0
-
None
-
10039e4b5bb80e5a9705126e7c62c588039acde6
Description
Up to 4.7, the documentation on QHostAddress says:
in "Detailed Description":
A host address is set with setAddress(), checked for its type using isIPv4Address() or isIPv6Address(), and retrieved with toIPv4Address(), toIPv6Address(), or toString().
and on QHostAddress::toIPv4Address() (same for toIPv6Address)
Returns the IPv4 address as a number.
For example, if the address is 127.0.0.1, the returned value is 2130706433 (i.e. 0x7f000001).
This value is only valid if isIp4Addr() returns true.
-------
So there are two different methods "isIp4Addr()" and "isIPv4Address()" but both are only available if built with Qt3 compatibility.
Either the convenient methods should be brought back or the documentation should refer to "protocol() == QAbstractSocket::IPv4Protocol" or something.