Enforce emission of QGrpcOperation::finished


We've given the promise that the QGrpcOperation::finished signal is
emitted once during the lifetime of an RPC at multiple places!

That implies also the start of the RPC, but as of now this wasn't true.
The QGrpcClientBase fails a RPC under some conditions. We move this
logic to the QGrpcOperation class now.

This patch guarantees that the construction of RPC handlers is
successfull and that the finished signal is emitted in the error case.

In QGrpcOperation we remove the atomic isFinished flag. We replace it
with a more descriptive State, to handle the additional 'Invalid' state.
No multithreading is happening in the finished signal emission, so
atomic properties are not needed.

The 'serializeInitialMessage' is a preemptive move for the upcoming
interceptors logic, which will require such centralized handler.

[ChangeLog][Important Behavior Changes][QGrpcClientBase/QGrpcOperation]
RPC-handlers are now guaranteed to be constructed. The finished signal
will now be invoked at least once during the lifetime, as documented.

Change-Id: I83bcbcefa1f5533401c71260608327fe621324e2
Reviewed-by: Alexey Edelev <semlanik@gmail.com>
commit6e07fd5a2b75a777aaf0425a39077a29f82ab895
parent9dd5330f14c710a311b03b7d5d21bb3c1fd43061
authorDennis Oberst <dennis.oberst@qt.io>
committerDennis Oberst <dennis.oberst@qt.io>
commit timeSat, 6 Dec 2025 00:34:34 +0100