summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2024-01-22 09:59:29 +0000
committerTopi Reinio <topi.reinio@qt.io>2024-01-25 06:29:09 +0000
commit711def1290439d19e7ed9068704bb2160edab968 (patch)
tree718fcc954490fba9cdf719e3caffb2d5ec45ac7b /src
parent75a918d487aabacd2d377e1e79baea7d30deb5ac (diff)
Doc: Qt Network: Fix references to renamed functions
As part of the API review process, in QNetworkRequestFactory: (set|clear)Headers() were renamed to (set|clear)CommonHeaders(), and request() was renamed to createRequest(). In addition, QHttpHeaders::has() was renamed to contains(). Update references to the old names in the documentation. Pick-to: 6.7 Change-Id: Ib79ae99de26be2f3af60787c8b86c3c20cb30067 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/network/access/qhttpheaders.cpp2
-rw-r--r--src/network/access/qnetworkrequestfactory.cpp28
2 files changed, 15 insertions, 15 deletions
diff --git a/src/network/access/qhttpheaders.cpp b/src/network/access/qhttpheaders.cpp
index 7a640b509ca..b26824f10a4 100644
--- a/src/network/access/qhttpheaders.cpp
+++ b/src/network/access/qhttpheaders.cpp
@@ -872,7 +872,7 @@ bool QHttpHeaders::replace(qsizetype i, WellKnownHeader name, QAnyStringView new
/*!
Returns whether the headers contain header with \a name.
- \sa has(QHttpHeaders::WellKnownHeader)
+ \sa contains(QHttpHeaders::WellKnownHeader)
*/
bool QHttpHeaders::contains(QAnyStringView name) const
{
diff --git a/src/network/access/qnetworkrequestfactory.cpp b/src/network/access/qnetworkrequestfactory.cpp
index 09413044046..1a07f9293a9 100644
--- a/src/network/access/qnetworkrequestfactory.cpp
+++ b/src/network/access/qnetworkrequestfactory.cpp
@@ -183,7 +183,7 @@ void QNetworkRequestFactory::setSslConfiguration(const QSslConfiguration &config
The returned request is filled with the data that this factory
has been configured with.
- \sa request(const QUrlQuery&), request(const QString&, const QUrlQuery&)
+ \sa createRequest(const QUrlQuery&), createRequest(const QString&, const QUrlQuery&)
*/
QNetworkRequest QNetworkRequestFactory::createRequest() const
@@ -197,7 +197,7 @@ QNetworkRequest QNetworkRequestFactory::createRequest() const
The returned request's URL is formed by appending the provided \a path
to the baseUrl (which may itself have a path component).
- \sa request(const QString &, const QUrlQuery &), request(), baseUrl()
+ \sa createRequest(const QString &, const QUrlQuery &), createRequest(), baseUrl()
*/
QNetworkRequest QNetworkRequestFactory::createRequest(const QString &path) const
{
@@ -210,7 +210,7 @@ QNetworkRequest QNetworkRequestFactory::createRequest(const QString &path) const
The returned request's URL is formed by appending the provided \a query
to the baseUrl.
- \sa request(const QString &, const QUrlQuery &), request(), baseUrl()
+ \sa createRequest(const QString &, const QUrlQuery &), createRequest(), baseUrl()
*/
QNetworkRequest QNetworkRequestFactory::createRequest(const QUrlQuery &query) const
{
@@ -226,7 +226,7 @@ QNetworkRequest QNetworkRequestFactory::createRequest(const QUrlQuery &query) co
If the provided \a path contains query items, they will be combined
with the items in \a query.
- \sa request(const QUrlQuery&), request(), baseUrl()
+ \sa createRequest(const QUrlQuery&), createRequest(), baseUrl()
*/
QNetworkRequest QNetworkRequestFactory::createRequest(const QString &path, const QUrlQuery &query) const
{
@@ -240,7 +240,7 @@ QNetworkRequest QNetworkRequestFactory::createRequest(const QString &path, const
This is a convenience mechanism for setting headers that
repeat across requests.
- \sa headers(), clearHeaders(), createRequest()
+ \sa commonHeaders(), clearCommonHeaders(), createRequest()
*/
void QNetworkRequestFactory::setCommonHeaders(const QHttpHeaders &headers)
{
@@ -251,7 +251,7 @@ void QNetworkRequestFactory::setCommonHeaders(const QHttpHeaders &headers)
/*!
Returns the currently set headers.
- \sa setHeaders(), clearHeaders()
+ \sa setCommonHeaders(), clearCommonHeaders()
*/
QHttpHeaders QNetworkRequestFactory::commonHeaders() const
{
@@ -261,7 +261,7 @@ QHttpHeaders QNetworkRequestFactory::commonHeaders() const
/*!
Clears current headers.
- \sa headers(), setHeaders()
+ \sa commonHeaders(), setCommonHeaders()
*/
void QNetworkRequestFactory::clearCommonHeaders()
{
@@ -284,11 +284,11 @@ void QNetworkRequestFactory::clearCommonHeaders()
By always re-setting the new token ensures that subsequent requests will
always have the latest, valid, token.
- The presence of the bearer token does not impact the \l headers()
- listing. If the \l headers() also lists \c Authorization header, it
+ The presence of the bearer token does not impact the \l commonHeaders()
+ listing. If the \l commonHeaders() also lists \c Authorization header, it
will be overwritten.
- \sa setBearerToken(), headers()
+ \sa setBearerToken(), commonHeaders()
*/
QByteArray QNetworkRequestFactory::bearerToken() const
{
@@ -336,7 +336,7 @@ QString QNetworkRequestFactory::userName() const
/*!
Sets the username of this factory to \a userName.
- The username is set in the request URL when \l request() is called.
+ The username is set in the request URL when \l createRequest() is called.
The QRestAccessManager / QNetworkAccessManager will attempt to use
these credentials when the server indicates that authentication
is required.
@@ -375,7 +375,7 @@ QString QNetworkRequestFactory::password() const
/*!
Sets the password of this factory to \a password.
- The password is set in the request URL when \l request() is called.
+ The password is set in the request URL when \l createRequest() is called.
The QRestAccessManager / QNetworkAccessManager will attempt to use
these credentials when the server indicates that authentication
is required.
@@ -432,14 +432,14 @@ std::chrono::milliseconds QNetworkRequestFactory::transferTimeout() const
/*!
Returns query parameters that are added to individual requests' query
parameters. The query parameters are added to any potential query
- parameters provided with the individual \l request() calls.
+ parameters provided with the individual \l createRequest() calls.
Use cases for using repeating query parameters are server dependent,
but typical examples include language setting \c {?lang=en}, format
specification \c {?format=json}, API version specification
\c {?version=1.0} and API key authentication.
- \sa setQueryParameters(), clearQueryParameters(), request()
+ \sa setQueryParameters(), clearQueryParameters(), createRequest()
*/
QUrlQuery QNetworkRequestFactory::queryParameters() const
{