diff options
Diffstat (limited to 'src/network/access/qhstspolicy.cpp')
-rw-r--r-- | src/network/access/qhstspolicy.cpp | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/src/network/access/qhstspolicy.cpp b/src/network/access/qhstspolicy.cpp index 6922e1d8f9..634bf4784b 100644 --- a/src/network/access/qhstspolicy.cpp +++ b/src/network/access/qhstspolicy.cpp @@ -60,10 +60,10 @@ QT_BEGIN_NAMESPACE applies to subdomains, either in the constructor or by calling setExpiry(), setHost() and setIncludesSubdomains(). - \sa QNetworkAccessManager::enableStrictTransportSecurity() + \sa QNetworkAccessManager::setStrictTransportSecurityEnabled() */ -class QHstsPolicyPrivate +class QHstsPolicyPrivate : public QSharedData { public: QUrl url; @@ -78,6 +78,15 @@ public: }; /*! + Returns \c true if the two policies have the same host and expiration date + while agreeing on whether to include or exclude subdomains. +*/ +bool operator==(const QHstsPolicy &lhs, const QHstsPolicy &rhs) +{ + return *lhs.d == *rhs.d; +} + +/*! Constructs an invalid (expired) policy with empty host name and subdomains not included. */ @@ -121,17 +130,7 @@ QHstsPolicy::~QHstsPolicy() */ QHstsPolicy &QHstsPolicy::operator=(const QHstsPolicy &other) { - *d = *other.d; - return *this; -} - - -/*! - Move-assignment operator. -*/ -QHstsPolicy &QHstsPolicy::operator=(QHstsPolicy &&other) Q_DECL_NOTHROW -{ - qSwap(d, other.d); + d = other.d; return *this; } @@ -196,15 +195,6 @@ bool QHstsPolicy::includesSubDomains() const } /*! - Returns \c true if the two policies have the same host and expiration date - while agreeing on whether to include or exclude subdomains. -*/ -bool QHstsPolicy::operator==(const QHstsPolicy &other) const -{ - return *d == *other.d; -} - -/*! Return \c true if this policy has a valid expiration date and this date is greater than QDateTime::currentGetDateTimeUtc(). |