diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-10-30 14:23:27 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-10-30 17:27:29 +0100 |
commit | 57e57d9bcda868abcfb552e1247b391162c0dff9 (patch) | |
tree | 7752a32e796d74c8d01a447d1d7376a02cbf7fcc /src/network/access/qhttp2configuration.cpp | |
parent | d51d312c86128150283b6a41f0daac18d9e57f32 (diff) |
Hide comparison operators for QtNetwork value types from non-ADL
Make them hidden friends, add a private isEqual helper where needed.
Adjust and add documentation.
Fixes: QTBUG-87976
Change-Id: If7c19eeab5be7452364eb76193981100f5516d6b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/network/access/qhttp2configuration.cpp')
-rw-r--r-- | src/network/access/qhttp2configuration.cpp | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/network/access/qhttp2configuration.cpp b/src/network/access/qhttp2configuration.cpp index 408f141e77..c9eba3e8fd 100644 --- a/src/network/access/qhttp2configuration.cpp +++ b/src/network/access/qhttp2configuration.cpp @@ -301,18 +301,29 @@ void QHttp2Configuration::swap(QHttp2Configuration &other) noexcept } /*! + \fn bool QHttp2Configuration::operator==(const QHttp2Configuration &lhs, const QHttp2Configuration &rhs) noexcept Returns \c true if \a lhs and \a rhs have the same set of HTTP/2 parameters. */ -bool operator==(const QHttp2Configuration &lhs, const QHttp2Configuration &rhs) + +/*! + \fn bool QHttp2Configuration::operator!=(const QHttp2Configuration &lhs, const QHttp2Configuration &rhs) noexcept + Returns \c true if \a lhs and \a rhs do not have the same set of HTTP/2 + parameters. +*/ + +/*! + \internal +*/ +bool QHttp2Configuration::isEqual(const QHttp2Configuration &other) const noexcept { - if (lhs.d == rhs.d) + if (d == other.d) return true; - return lhs.d->pushEnabled == rhs.d->pushEnabled - && lhs.d->huffmanCompressionEnabled == rhs.d->huffmanCompressionEnabled - && lhs.d->sessionWindowSize == rhs.d->sessionWindowSize - && lhs.d->streamWindowSize == rhs.d->streamWindowSize; + return d->pushEnabled == other.d->pushEnabled + && d->huffmanCompressionEnabled == other.d->huffmanCompressionEnabled + && d->sessionWindowSize == other.d->sessionWindowSize + && d->streamWindowSize == other.d->streamWindowSize; } QT_END_NAMESPACE |