From 62e751842143168ceaa607f7b8635ed5938df48f Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 24 Dec 2014 14:08:33 -0200 Subject: 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 --- src/network/kernel/qhostaddress.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/network/kernel/qhostaddress.cpp') diff --git a/src/network/kernel/qhostaddress.cpp b/src/network/kernel/qhostaddress.cpp index cf24438f0c..10fdf2f97d 100644 --- a/src/network/kernel/qhostaddress.cpp +++ b/src/network/kernel/qhostaddress.cpp @@ -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 -- cgit v1.2.3