summaryrefslogtreecommitdiffstats
path: root/src/network/kernel/qhostaddress.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2014-12-24 14:08:33 -0200
committerThiago Macieira <thiago.macieira@intel.com>2014-12-28 15:56:24 +0100
commit62e751842143168ceaa607f7b8635ed5938df48f (patch)
tree7443d16c381d7135df5562e5a82870f247ea65d1 /src/network/kernel/qhostaddress.cpp
parent9a0c4fc479b2f46f569890a2821e56b2943efac5 (diff)
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>
Diffstat (limited to 'src/network/kernel/qhostaddress.cpp')
-rw-r--r--src/network/kernel/qhostaddress.cpp5
1 files changed, 4 insertions, 1 deletions
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