Update QRestReply documentation
To accommodate the deduplication and non-owning changes in previous commit. Resulted from API-review Change-Id: Ie1c4e9959c1ba7e8ed2be6607d9f6497ae15af39 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit efa178d42c5e9e8c6dc526430f201f16a67149c3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
afc1f2a6cc
commit
7fd767478a
@ -19,8 +19,7 @@ Q_DECLARE_LOGGING_CATEGORY(lcQrest)
|
|||||||
/*!
|
/*!
|
||||||
\class QRestReply
|
\class QRestReply
|
||||||
\since 6.7
|
\since 6.7
|
||||||
\brief QRestReply is the class for following up the requests sent with
|
\brief QRestReply is a convenience wrapper for QNetworkReply.
|
||||||
QRestAccessManager.
|
|
||||||
|
|
||||||
\reentrant
|
\reentrant
|
||||||
\ingroup network
|
\ingroup network
|
||||||
@ -28,13 +27,23 @@ Q_DECLARE_LOGGING_CATEGORY(lcQrest)
|
|||||||
|
|
||||||
\preliminary
|
\preliminary
|
||||||
|
|
||||||
QRestReply is a convenience class for typical RESTful client
|
QRestReply wraps a QNetworkReply and provides convenience methods for data
|
||||||
applications. It wraps the more detailed QNetworkReply and provides
|
and status handling. The methods provide convenience for typical RESTful
|
||||||
convenience methods for data and status handling.
|
client applications.
|
||||||
|
|
||||||
\sa QRestAccessManager, QNetworkReply
|
QRestReply doesn't take ownership of the wrapped QNetworkReply, and the
|
||||||
|
lifetime and ownership of the reply is as defined by QNetworkAccessManager
|
||||||
|
documentation.
|
||||||
|
|
||||||
|
QRestReply object is not copyable, but is movable.
|
||||||
|
|
||||||
|
\sa QRestAccessManager, QNetworkReply, QNetworkAccessManager,
|
||||||
|
QNetworkAccessManager::setAutoDeleteReplies()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Creates a QRestReply and initializes the wrapped QNetworkReply to \a reply.
|
||||||
|
*/
|
||||||
QRestReply::QRestReply(QNetworkReply *reply)
|
QRestReply::QRestReply(QNetworkReply *reply)
|
||||||
: wrapped(reply)
|
: wrapped(reply)
|
||||||
{
|
{
|
||||||
@ -50,6 +59,26 @@ QRestReply::~QRestReply()
|
|||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\fn QRestReply::QRestReply(QRestReply &&other) noexcept
|
||||||
|
|
||||||
|
Move-constructs the reply from \a other.
|
||||||
|
|
||||||
|
\note The moved-from object \a other is placed in a
|
||||||
|
partially-formed state, in which the only valid operations are
|
||||||
|
destruction and assignment of a new value.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\fn QRestReply &QRestReply::operator=(QRestReply &&other) noexcept
|
||||||
|
|
||||||
|
Move-assigns \a other and returns a reference to this reply.
|
||||||
|
|
||||||
|
\note The moved-from object \a other is placed in a
|
||||||
|
partially-formed state, in which the only valid operations are
|
||||||
|
destruction and assignment of a new value.
|
||||||
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Returns a pointer to the underlying QNetworkReply wrapped by this object.
|
Returns a pointer to the underlying QNetworkReply wrapped by this object.
|
||||||
*/
|
*/
|
||||||
@ -106,7 +135,8 @@ std::optional<QJsonDocument> QRestReply::json(QJsonParseError *error)
|
|||||||
calls to get response data will return empty until further data has been
|
calls to get response data will return empty until further data has been
|
||||||
received.
|
received.
|
||||||
|
|
||||||
\sa json(), text(), bytesAvailable(), readyRead()
|
\sa json(), text(), QNetworkReply::bytesAvailable(),
|
||||||
|
QNetworkReply::readyRead()
|
||||||
*/
|
*/
|
||||||
QByteArray QRestReply::body()
|
QByteArray QRestReply::body()
|
||||||
{
|
{
|
||||||
@ -127,7 +157,7 @@ QByteArray QRestReply::body()
|
|||||||
decoding is not supported by \l QStringConverter, or if the decoding
|
decoding is not supported by \l QStringConverter, or if the decoding
|
||||||
has errors (for example invalid characters).
|
has errors (for example invalid characters).
|
||||||
|
|
||||||
\sa json(), body(), isFinished(), finished()
|
\sa json(), body(), QNetworkReply::readyRead()
|
||||||
*/
|
*/
|
||||||
QString QRestReply::text()
|
QString QRestReply::text()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user