Report QHostAddress::Any explicitly in qDebug()
With toString(), it was printing "0.0.0.0", which is the same as QHostAddress::AnyIPv4, making it difficult to tell the two apart. Change-Id: I4668ec3337c25ddfdc2fa3bbacc83b9d34316b1f Reviewed-by: Richard J. Moore <rich@kde.org>
This commit is contained in:
parent
9a0c4fc479
commit
62e7518421
@ -1024,7 +1024,10 @@ bool QHostAddress::isLoopback() const
|
||||
#ifndef QT_NO_DEBUG_STREAM
|
||||
QDebug operator<<(QDebug d, const QHostAddress &address)
|
||||
{
|
||||
d.maybeSpace() << "QHostAddress(" << address.toString() << ')';
|
||||
if (address == QHostAddress::Any)
|
||||
d.maybeSpace() << "QHostAddress(QHostAddress::Any)";
|
||||
else
|
||||
d.maybeSpace() << "QHostAddress(" << address.toString() << ')';
|
||||
return d.space();
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user