diff options
Diffstat (limited to 'src/network/access/qnetworkreply.cpp')
-rw-r--r-- | src/network/access/qnetworkreply.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/network/access/qnetworkreply.cpp b/src/network/access/qnetworkreply.cpp index 8095a4591d..9334b01de6 100644 --- a/src/network/access/qnetworkreply.cpp +++ b/src/network/access/qnetworkreply.cpp @@ -42,7 +42,7 @@ QNetworkReplyPrivate::QNetworkReplyPrivate() itself. QNetworkReply is a sequential-access QIODevice, which means that - once data is read from the object, it no longer kept by the + once data is read from the object, it is no longer kept by the device. It is therefore the application's responsibility to keep this data if it needs to. Whenever more data is received from the network and processed, the readyRead() signal is emitted. @@ -331,7 +331,7 @@ QNetworkReplyPrivate::QNetworkReplyPrivate() processing. After this signal is emitted, there will be no more updates to the reply's data or metadata. - Unless close() or abort() have been called, the reply will be still be opened + Unless close() or abort() have been called, the reply will still be opened for reading, so the data can be retrieved by calls to read() or readAll(). In particular, if no calls to read() were made as a result of readyRead(), a call to readAll() will retrieve the full @@ -612,8 +612,9 @@ QVariant QNetworkReply::header(QNetworkRequest::KnownHeaders header) const the remote server \sa rawHeader() + \note In Qt versions prior to 6.7, this function took QByteArray only. */ -bool QNetworkReply::hasRawHeader(const QByteArray &headerName) const +bool QNetworkReply::hasRawHeader(QAnyStringView headerName) const { Q_D(const QNetworkReply); return d->findRawHeader(headerName) != d->rawHeaders.constEnd(); @@ -627,13 +628,12 @@ bool QNetworkReply::hasRawHeader(const QByteArray &headerName) const header field. \sa setRawHeader(), hasRawHeader(), header() + \note In Qt versions prior to 6.7, this function took QByteArray only. */ -QByteArray QNetworkReply::rawHeader(const QByteArray &headerName) const +QByteArray QNetworkReply::rawHeader(QAnyStringView headerName) const { Q_D(const QNetworkReply); - QNetworkHeadersPrivate::RawHeadersList::ConstIterator it = - d->findRawHeader(headerName); - if (it != d->rawHeaders.constEnd()) + if (const auto it = d->findRawHeader(headerName); it != d->rawHeaders.constEnd()) return it->second; return QByteArray(); } |