Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
None
-
5.0.2, 5.1.0 RC1
-
None
Description
In documentation says:
void QHostAddress::clear()
Sets the host address to 0.0.0.0.
But in this code:
QHostAddress addrFoo, addrBar; addrFoo.clear(); addrBar.setAddress("0.0.0.0"); if (addrFoo == addrBar) { qDebug() << "Foo == Bar"; } else { qDebug() << "Foo != Bar"; }
will be output "Foo != Bar".
Because “clear()” method sets the host address to 0.0.0.0 or :: and set protocol to QAbstractSocket::UnknownNetworkLayerProtocol
In documentation says nothing about protocol.