diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2017-01-14 09:02:03 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2017-01-15 08:07:22 +0000 |
commit | 4baf08653c69fe5a131dae4ea27ac4cd67743f6e (patch) | |
tree | 2f245788f5cccd35933d720380c336818735f1fc /src/network | |
parent | 21306bccc4fef8c78d550946ec4d7a5426eb5b0d (diff) |
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 <thiago.macieira@intel.com>
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/kernel/qhostaddress.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
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 |