Skip to content

Commit

Permalink
Dox
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 1, 2019
1 parent 630cd02 commit 03a2a03
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions python/core/auto_generated/qgsnetworkreply.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,22 @@ Returns the original network request.
%End

void setContent( const QByteArray &content );
%Docstring
Sets the reply content. This is not done by default, as reading network reply content
can only be done once.

.. seealso:: :py:func:`content`
%End

QByteArray content() const;
%Docstring
Returns the reply content. This is not available by default, as reading network reply content
can only be done once.

Blocking network requests (see :py:class:`QgsBlockingNetworkRequest`) will automatically populate this content.

.. seealso:: :py:func:`setContent`
%End

};

Expand Down
14 changes: 14 additions & 0 deletions src/core/qgsnetworkreply.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,22 @@ class CORE_EXPORT QgsNetworkReplyContent
*/
QNetworkRequest request() const { return mRequest; }

/**
* Sets the reply content. This is not done by default, as reading network reply content
* can only be done once.
*
* \see content()
*/
void setContent( const QByteArray &content ) { mContent = content; }

/**
* Returns the reply content. This is not available by default, as reading network reply content
* can only be done once.
*
* Blocking network requests (see QgsBlockingNetworkRequest) will automatically populate this content.
*
* \see setContent()
*/
QByteArray content() const { return mContent; }

private:
Expand Down

0 comments on commit 03a2a03

Please sign in to comment.