diff options
Diffstat (limited to 'src/network/access')
-rw-r--r-- | src/network/access/qabstractnetworkcache.cpp | 8 | ||||
-rw-r--r-- | src/network/access/qabstractnetworkcache.h | 4 | ||||
-rw-r--r-- | src/network/access/qhttpmultipart.cpp | 8 | ||||
-rw-r--r-- | src/network/access/qhttpmultipart.h | 3 | ||||
-rw-r--r-- | src/network/access/qnetworkcookie.cpp | 8 | ||||
-rw-r--r-- | src/network/access/qnetworkcookie.h | 3 | ||||
-rw-r--r-- | src/network/access/qnetworkrequest.cpp | 8 | ||||
-rw-r--r-- | src/network/access/qnetworkrequest.h | 2 |
8 files changed, 44 insertions, 0 deletions
diff --git a/src/network/access/qabstractnetworkcache.cpp b/src/network/access/qabstractnetworkcache.cpp index 70b1211595..5bdb7039e5 100644 --- a/src/network/access/qabstractnetworkcache.cpp +++ b/src/network/access/qabstractnetworkcache.cpp @@ -149,6 +149,14 @@ QNetworkCacheMetaData &QNetworkCacheMetaData::operator=(const QNetworkCacheMetaD } /*! + \fn void QNetworkCacheMetaData::swap(QNetworkCacheMetaData &other) + \since 5.0 + + Swaps this metadata instance with \a other. This function is very + fast and never fails. + */ + +/*! Returns true if this meta data is equal to the \a other meta data; otherwise returns false. \sa operator!=() diff --git a/src/network/access/qabstractnetworkcache.h b/src/network/access/qabstractnetworkcache.h index 8d7e77eeb0..a27d0fb4f0 100644 --- a/src/network/access/qabstractnetworkcache.h +++ b/src/network/access/qabstractnetworkcache.h @@ -71,6 +71,10 @@ public: ~QNetworkCacheMetaData(); QNetworkCacheMetaData &operator=(const QNetworkCacheMetaData &other); + + void swap(QNetworkCacheMetaData &other) + { qSwap(d, other.d); } + bool operator==(const QNetworkCacheMetaData &other) const; inline bool operator!=(const QNetworkCacheMetaData &other) const { return !(*this == other); } diff --git a/src/network/access/qhttpmultipart.cpp b/src/network/access/qhttpmultipart.cpp index ca7e2f6be8..281629a808 100644 --- a/src/network/access/qhttpmultipart.cpp +++ b/src/network/access/qhttpmultipart.cpp @@ -125,6 +125,14 @@ QHttpPart &QHttpPart::operator=(const QHttpPart &other) } /*! + \fn void QHttpPart::swap(QHttpPart &other) + \since 5.0 + + Swaps this HTTP part with \a other. This function is very fast and + never fails. +*/ + +/*! Returns true if this object is the same as \a other (i.e., if they have the same headers and body). diff --git a/src/network/access/qhttpmultipart.h b/src/network/access/qhttpmultipart.h index 378ae3cd9e..993cb9a987 100644 --- a/src/network/access/qhttpmultipart.h +++ b/src/network/access/qhttpmultipart.h @@ -62,6 +62,9 @@ public: QHttpPart(const QHttpPart &other); ~QHttpPart(); QHttpPart &operator=(const QHttpPart &other); + + void swap(QHttpPart &other) { qSwap(d, other.d); } + bool operator==(const QHttpPart &other) const; inline bool operator!=(const QHttpPart &other) const { return !operator==(other); } diff --git a/src/network/access/qnetworkcookie.cpp b/src/network/access/qnetworkcookie.cpp index 1fdf798dc6..2a3db12f51 100644 --- a/src/network/access/qnetworkcookie.cpp +++ b/src/network/access/qnetworkcookie.cpp @@ -144,6 +144,14 @@ QNetworkCookie &QNetworkCookie::operator=(const QNetworkCookie &other) } /*! + \fn void QNetworkCookie::swap(QNetworkCookie &other) + \since 5.0 + + Swaps this cookie with \a other. This function is very fast and + never fails. +*/ + +/*! \fn bool QNetworkCookie::operator!=(const QNetworkCookie &other) const Returns true if this cookie is not equal to \a other. diff --git a/src/network/access/qnetworkcookie.h b/src/network/access/qnetworkcookie.h index 5553e857de..8925791710 100644 --- a/src/network/access/qnetworkcookie.h +++ b/src/network/access/qnetworkcookie.h @@ -70,6 +70,9 @@ public: QNetworkCookie(const QNetworkCookie &other); ~QNetworkCookie(); QNetworkCookie &operator=(const QNetworkCookie &other); + + void swap(QNetworkCookie &other) { qSwap(d, other.d); } + bool operator==(const QNetworkCookie &other) const; inline bool operator!=(const QNetworkCookie &other) const { return !(*this == other); } diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp index cb4614bb0a..b6447e7314 100644 --- a/src/network/access/qnetworkrequest.cpp +++ b/src/network/access/qnetworkrequest.cpp @@ -396,6 +396,14 @@ QNetworkRequest &QNetworkRequest::operator=(const QNetworkRequest &other) } /*! + \fn void QNetworkRequest::swap(QNetworkRequest &other) + \since 5.0 + + Swaps this network request with \a other. This function is very + fast and never fails. +*/ + +/*! Returns the URL this network request is referring to. \sa setUrl() diff --git a/src/network/access/qnetworkrequest.h b/src/network/access/qnetworkrequest.h index 68fc655b7a..6aa365dc08 100644 --- a/src/network/access/qnetworkrequest.h +++ b/src/network/access/qnetworkrequest.h @@ -114,6 +114,8 @@ public: ~QNetworkRequest(); QNetworkRequest &operator=(const QNetworkRequest &other); + inline void swap(QNetworkRequest &other) { qSwap(d, other.d); } + bool operator==(const QNetworkRequest &other) const; inline bool operator!=(const QNetworkRequest &other) const { return !operator==(other); } |