From ee9ee0876219b2e61687d8ff760805fd7da46d39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Tue, 29 Apr 2025 12:40:56 +0200 Subject: [PATCH] Http2: Fix 'Received' typo Missing 'e'. QHttp2Connection is private API so the API can be changed. No known external users. Pick-to: 6.8 Change-Id: I4f3daab9deff3250ff66066dc3e088edfbbfc5ef Reviewed-by: Edward Welbourne Reviewed-by: Matthias Rauter Reviewed-by: Mate Barany (cherry picked from commit 70d3293d72a1a612d375447a6f46ea223be1f9cd) Reviewed-by: Qt Cherry-pick Bot --- src/network/access/qhttp2connection.cpp | 10 ++++---- src/network/access/qhttp2connection_p.h | 4 ++-- .../qhttp2connection/tst_qhttp2connection.cpp | 24 +++++++++---------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/network/access/qhttp2connection.cpp b/src/network/access/qhttp2connection.cpp index 82fe73998d8..cac6be7faa0 100644 --- a/src/network/access/qhttp2connection.cpp +++ b/src/network/access/qhttp2connection.cpp @@ -1539,7 +1539,7 @@ void QHttp2Connection::handleRST_STREAM() const auto error = qFromBigEndian(inboundFrame.dataBegin()); if (QPointer stream = m_streams[streamID]) - emit stream->rstFrameRecived(error); + emit stream->rstFrameReceived(error); // Verify that whatever stream is being RST'd is not in the idle state: const quint32 lastRelevantStreamID = [this, streamID]() { @@ -1717,18 +1717,18 @@ void QHttp2Connection::handlePING() if (inboundFrame.flags() & FrameFlag::ACK) { QByteArrayView pingSignature(reinterpret_cast(inboundFrame.dataBegin()), 8); if (!m_lastPingSignature.has_value()) { - emit pingFrameRecived(PingState::PongNoPingSent); + emit pingFrameReceived(PingState::PongNoPingSent); qCWarning(qHttp2ConnectionLog, "[%p] PING with ACK received but no PING was sent.", this); } else if (pingSignature != m_lastPingSignature) { - emit pingFrameRecived(PingState::PongSignatureChanged); + emit pingFrameReceived(PingState::PongSignatureChanged); qCWarning(qHttp2ConnectionLog, "[%p] PING signature does not match the last PING.", this); } else { - emit pingFrameRecived(PingState::PongSignatureIdentical); + emit pingFrameReceived(PingState::PongSignatureIdentical); } m_lastPingSignature.reset(); return; } else { - emit pingFrameRecived(PingState::Ping); + emit pingFrameReceived(PingState::Ping); } diff --git a/src/network/access/qhttp2connection_p.h b/src/network/access/qhttp2connection_p.h index 23fbaec7d20..ca6bc06746c 100644 --- a/src/network/access/qhttp2connection_p.h +++ b/src/network/access/qhttp2connection_p.h @@ -131,7 +131,7 @@ Q_SIGNALS: void promisedStreamReceived(quint32 newStreamID); void uploadBlocked(); void dataReceived(const QByteArray &data, bool endStream); - void rstFrameRecived(quint32 errorCode); + void rstFrameReceived(quint32 errorCode); void bytesWritten(qint64 bytesWritten); void uploadDeviceError(const QString &errorString); @@ -261,7 +261,7 @@ Q_SIGNALS: void errorReceived(/*@future: add as needed?*/); // Connection errors only, no stream-specific errors void connectionClosed(); void settingsFrameReceived(); - void pingFrameRecived(QHttp2Connection::PingState state); + void pingFrameReceived(QHttp2Connection::PingState state); void errorOccurred(Http2::Http2Error errorCode, const QString &errorString); void receivedGOAWAY(Http2::Http2Error errorCode, quint32 lastStreamID); void receivedEND_STREAM(quint32 streamID); diff --git a/tests/auto/network/access/qhttp2connection/tst_qhttp2connection.cpp b/tests/auto/network/access/qhttp2connection/tst_qhttp2connection.cpp index 98d8f9453ae..440c34b6b9f 100644 --- a/tests/auto/network/access/qhttp2connection/tst_qhttp2connection.cpp +++ b/tests/auto/network/access/qhttp2connection/tst_qhttp2connection.cpp @@ -382,8 +382,8 @@ void tst_QHttp2Connection::testPING() QVERIFY(clientStream); QVERIFY(waitForSettingsExchange(connection, serverConnection)); - QSignalSpy serverPingSpy{ serverConnection, &QHttp2Connection::pingFrameRecived }; - QSignalSpy clientPingSpy{ connection, &QHttp2Connection::pingFrameRecived }; + QSignalSpy serverPingSpy{ serverConnection, &QHttp2Connection::pingFrameReceived }; + QSignalSpy clientPingSpy{ connection, &QHttp2Connection::pingFrameReceived }; QByteArray data{"pingpong"}; connection->sendPing(data); @@ -424,8 +424,8 @@ void tst_QHttp2Connection::testRSTServerSide() auto *serverStream = newIncomingStreamSpy.front().front().value(); QCOMPARE(clientStream->streamID(), serverStream->streamID()); - QSignalSpy rstClientSpy{ clientStream, &QHttp2Stream::rstFrameRecived }; - QSignalSpy rstServerSpy{ serverStream, &QHttp2Stream::rstFrameRecived }; + QSignalSpy rstClientSpy{ clientStream, &QHttp2Stream::rstFrameReceived }; + QSignalSpy rstServerSpy{ serverStream, &QHttp2Stream::rstFrameReceived }; QCOMPARE(clientStream->state(), QHttp2Stream::State::Open); QCOMPARE(serverStream->state(), QHttp2Stream::State::Open); @@ -457,8 +457,8 @@ void tst_QHttp2Connection::testRSTClientSide() auto *serverStream = newIncomingStreamSpy.front().front().value(); QCOMPARE(clientStream->streamID(), serverStream->streamID()); - QSignalSpy rstClientSpy{ clientStream, &QHttp2Stream::rstFrameRecived }; - QSignalSpy rstServerSpy{ serverStream, &QHttp2Stream::rstFrameRecived }; + QSignalSpy rstClientSpy{ clientStream, &QHttp2Stream::rstFrameReceived }; + QSignalSpy rstServerSpy{ serverStream, &QHttp2Stream::rstFrameReceived }; QCOMPARE(clientStream->state(), QHttp2Stream::State::Open); QCOMPARE(serverStream->state(), QHttp2Stream::State::Open); @@ -490,8 +490,8 @@ void tst_QHttp2Connection::testRSTReplyOnDATAEND() auto *serverStream = newIncomingStreamSpy.front().front().value(); QCOMPARE(clientStream->streamID(), serverStream->streamID()); - QSignalSpy rstClientSpy{ clientStream, &QHttp2Stream::rstFrameRecived }; - QSignalSpy rstServerSpy{ serverStream, &QHttp2Stream::rstFrameRecived }; + QSignalSpy rstClientSpy{ clientStream, &QHttp2Stream::rstFrameReceived }; + QSignalSpy rstServerSpy{ serverStream, &QHttp2Stream::rstFrameReceived }; QSignalSpy endServerSpy{ serverConnection, &QHttp2Connection::receivedEND_STREAM }; QSignalSpy errrorServerSpy{ serverStream, &QHttp2Stream::errorOccurred }; @@ -602,8 +602,8 @@ void tst_QHttp2Connection::testBadFrameSize() auto *serverStream = newIncomingStreamSpy.front().front().value(); QCOMPARE(clientStream->streamID(), serverStream->streamID()); - QSignalSpy rstClientSpy{ clientStream, &QHttp2Stream::rstFrameRecived }; - QSignalSpy rstServerSpy{ serverStream, &QHttp2Stream::rstFrameRecived }; + QSignalSpy rstClientSpy{ clientStream, &QHttp2Stream::rstFrameReceived }; + QSignalSpy rstServerSpy{ serverStream, &QHttp2Stream::rstFrameReceived }; QSignalSpy goawayClientSpy{ connection, &QHttp2Connection::receivedGOAWAY }; QSignalSpy goawayServerSpy{ serverConnection, &QHttp2Connection::receivedGOAWAY }; @@ -663,7 +663,7 @@ void tst_QHttp2Connection::testDataFrameAfterRSTIncoming() auto *serverStream = newIncomingStreamSpy.front().front().value(); QCOMPARE(clientStream->streamID(), serverStream->streamID()); - QSignalSpy rstServerSpy{ serverStream, &QHttp2Stream::rstFrameRecived }; + QSignalSpy rstServerSpy{ serverStream, &QHttp2Stream::rstFrameReceived }; QCOMPARE(clientStream->state(), QHttp2Stream::State::Open); QCOMPARE(serverStream->state(), QHttp2Stream::State::Open); @@ -705,7 +705,7 @@ void tst_QHttp2Connection::testDataFrameAfterRSTOutgoing() auto *serverStream = newIncomingStreamSpy.front().front().value(); QCOMPARE(clientStream->streamID(), serverStream->streamID()); - QSignalSpy rstServerSpy{ serverStream, &QHttp2Stream::rstFrameRecived }; + QSignalSpy rstServerSpy{ serverStream, &QHttp2Stream::rstFrameReceived }; QCOMPARE(clientStream->state(), QHttp2Stream::State::Open); QCOMPARE(serverStream->state(), QHttp2Stream::State::Open);