From 4baf08653c69fe5a131dae4ea27ac4cd67743f6e Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sat, 14 Jan 2017 09:02:03 +0100 Subject: QHostAddress: add missing docs qHash(QHostAddress) was added in Qt 5.0 (at least the version with uint seed = 0). op==(QHostAddress::SpecialAddress, QHostAddress) was there since QHostAddress was added before public history. Since QHostAddress does not have a \since, the I did not supply one for op==, either. Since the equality operator did not have unit-tests, added one. Change-Id: I954a0df02464338f08a12ca58d4cc0ceb013e67a Reviewed-by: Thiago Macieira --- src/network/kernel/qhostaddress.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/network') diff --git a/src/network/kernel/qhostaddress.cpp b/src/network/kernel/qhostaddress.cpp index 086e8cede1..fc753204a9 100644 --- a/src/network/kernel/qhostaddress.cpp +++ b/src/network/kernel/qhostaddress.cpp @@ -1251,6 +1251,11 @@ QDebug operator<<(QDebug d, const QHostAddress &address) } #endif +/*! + \since 5.0 + \relates QHostAddress + Returns a hash of the host address \a key, using \a seed to seed the calculation. +*/ uint qHash(const QHostAddress &key, uint seed) { // both lines might throw @@ -1258,6 +1263,15 @@ uint qHash(const QHostAddress &key, uint seed) return qHashBits(key.d->a6.c, 16, seed); } +/*! + \relates QHostAddress + \fn operator==(QHostAddress::SpecialAddress lhs, const QHostAddress &rhs) + + Returns \c true if special address \a lhs is the same as host address \a rhs; + otherwise returns \c false. + + \sa isEqual() +*/ #ifndef QT_NO_DATASTREAM /*! \relates QHostAddress -- cgit v1.2.3