diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2014-12-24 14:08:33 -0200 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2014-12-28 15:56:24 +0100 |
commit | 62e751842143168ceaa607f7b8635ed5938df48f (patch) | |
tree | 7443d16c381d7135df5562e5a82870f247ea65d1 /src/network | |
parent | 9a0c4fc479b2f46f569890a2821e56b2943efac5 (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')
-rw-r--r-- | src/network/kernel/qhostaddress.cpp | 5 |
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 |