diff options
author | Mårten Nordheim <marten.nordheim@qt.io> | 2022-09-09 09:57:49 +0200 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2022-09-12 01:20:19 +0200 |
commit | 4503207caf9349fb48ffecbd1a06506c5e36cb8e (patch) | |
tree | 0a5b1b1ef10ea6833aba766c960a59d13fef1e21 /src/network/access | |
parent | 368905bce36a503e53e1567d8453277e0a6d30fa (diff) |
Http2: Drop an unnecessary copy of incoming data
We don't need the QBA later, so just pass it directly to
the QByteDataBuffer and avoid the ref-counter increase/decrease.
Change-Id: I253a29981bdfffb1a205baaaa0788d4283253e19
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/network/access')
-rw-r--r-- | src/network/access/qhttp2protocolhandler.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/network/access/qhttp2protocolhandler.cpp b/src/network/access/qhttp2protocolhandler.cpp index 562b883242..f41cde067a 100644 --- a/src/network/access/qhttp2protocolhandler.cpp +++ b/src/network/access/qhttp2protocolhandler.cpp @@ -1242,8 +1242,7 @@ void QHttp2ProtocolHandler::updateStream(Stream &stream, const Frame &frame, replyPrivate->totalProgress += length; - const QByteArray wrapped(data, length); - replyPrivate->responseData.append(wrapped); + replyPrivate->responseData.append(QByteArray(data, length)); if (replyPrivate->shouldEmitSignals()) { if (connectionType == Qt::DirectConnection) { |