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>
This commit is contained in:
Mårten Nordheim 2022-09-09 09:57:49 +02:00
parent 368905bce3
commit 4503207caf

View File

@ -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) {