path: root/src/network/kernel/qhostaddress.h
diff options
authorShane Kearns <>2011-10-24 11:01:09 +0100
committerQt by Nokia <>2011-10-24 13:56:41 +0200
commit3736dcb65e92ea3d6f1af827a52b09ebd1250f7e (patch)
tree6dfe2acfabd55ac35135dfd19c4ada764001e475 /src/network/kernel/qhostaddress.h
parent29c30a20bab4c4ea892b95c08c71bb5f136bb82c (diff)
Network - Add QHostAddress::isLoopback API.
The standard IPv4 loopback address is, however anything in the range is also a loopback address. isLoopback returns true for any address that is in the IPv4 loopback address range, or is the single IPv6 loopback address ::1 Task-number: QTBUG-22246 Change-Id: Ic39100e2e97a52db700e01b109998a1cfd4335e3 Reviewed-by: Thiago Macieira (Intel) <>
Diffstat (limited to 'src/network/kernel/qhostaddress.h')
1 files changed, 2 insertions, 0 deletions
diff --git a/src/network/kernel/qhostaddress.h b/src/network/kernel/qhostaddress.h
index 3d364de6e6..83e8a7ce3c 100644
--- a/src/network/kernel/qhostaddress.h
+++ b/src/network/kernel/qhostaddress.h
@@ -120,6 +120,8 @@ public:
bool isInSubnet(const QHostAddress &subnet, int netmask) const;
bool isInSubnet(const QPair<QHostAddress, int> &subnet) const;
+ bool isLoopback() const;
static QPair<QHostAddress, int> parseSubnet(const QString &subnet);