diff options
author | Mårten Nordheim <[email protected]> | 2024-06-13 16:28:14 +0200 |
---|---|---|
committer | Mårten Nordheim <[email protected]> | 2024-06-28 15:17:46 +0200 |
commit | ff26a209eaac9a9013a0cc41185a38d448af97e2 (patch) | |
tree | d8861f7ada28d72ca366a0a6f2d36dd26f05d7d0 | |
parent | 3fe9c38053774ea3dd6b20d14dd664dd8464208c (diff) |
QHttp2Connection: add take- and clearDownloadBuffer
Instead of retaining the data in the buffer forever.
The downloadBuffer function was only added because there may be data
received before there is a chance to connect to the signal. But then
there is no reason to keep it there forever.
Removing the downloadBuffer() function might be an idea at some point
in preference of using these.
Pick-to: 6.8
Change-Id: I0b66676c8827570c5a25de2a28617880ccd9cf18
Reviewed-by: Timur Pocheptsov <[email protected]>
-rw-r--r-- | src/network/access/qhttp2connection_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/network/access/qhttp2connection_p.h b/src/network/access/qhttp2connection_p.h index 0ee19bac07e..f1f33aaa69d 100644 --- a/src/network/access/qhttp2connection_p.h +++ b/src/network/access/qhttp2connection_p.h @@ -114,6 +114,8 @@ public: HPack::HttpHeader receivedHeaders() const noexcept { return m_headers; } QByteDataBuffer downloadBuffer() const noexcept { return m_downloadBuffer; } + QByteDataBuffer takeDownloadBuffer() noexcept { return std::exchange(m_downloadBuffer, {}); } + void clearDownloadBuffer() { m_downloadBuffer.clear(); } Q_SIGNALS: void headersReceived(const HPack::HttpHeader &headers, bool endStream); |