Commit Graph

5 Commits

Author SHA1 Message Date
Alexey Edelev 2625537aee Move host URI option to QGrpcHttp2Channel
The host URI is not an optional property of the QGrpcHttp2Channel and
has not relations to QGrpcChannelOptions. We should move it to the
QGrpcHttp2Channel and use it there directly instead of making the
assumption that any channel should be created using the host URI. This
also removes the requirement of having the options as mandatory
argument to construct the gRPC channels.

Task-number: QTBUG-123625
Change-Id: I6cd64bad6c379f8875dcd6794a95bf68b46da605
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-05-29 16:27:43 +02:00
Alexey Edelev d69bc69750 Remove the 'stream' prefix from all streaming methods
There are no particular reasons for these prefixes. Remove them.

[ChangeLog][GRPC] The 'stream' prefix is removed for all generated
streaming methods.

Task-number: QTBUG-123625
Change-Id: Ie1e63a6c559e259956aa3b4b72aa3ef380df4f44
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-05-15 11:51:01 +02:00
Dennis Oberst 57b875c33b QGrpcOperation: handle failed deserialization directly
Originally motivated by Axivion(SV3), which nagged about the const
errorOccurred signal; this patch removes signal emission for failed
deserialization in the read() functions. Immediately handling this can
lead to better user code as an fallback mechanism can avoid further
execution of unneeded logic.

This patch makes the errorOcurred signal non-const and changes the
signature of the read methods to either return an optional or bool to
signal failure immediately.

Users can then retrieve the error through 'deserializationError()' or
'deserializationErrorString()'. This can be seen in the generated QML
integration code, which uses those to still emit the 'errorOcurred'
signal on deserialization failure.

Change-Id: Ie6761753145536a42d5dd5bf1eac18afa555581a
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-04-18 11:14:09 +02:00
Lucie Gérard 4b21c9ef0d Correct license for example files
According to QUIP-18 [1], all example files should be
LicenseRef-Qt-Commercial OR BSD-3-Clause

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: If6b8c8eb88c8880e6e277f472dfdd5b380a5c83d
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-03-15 14:28:25 +01:00
Tatiana Borisova 84f941cec0 Multi-thread clients usage example
Since the Qt gRPC module does not ensure thread safety at the channel
level, we can include an example demonstrating multiple
QAbstractGrpcClients can communicate asynchronously.

Task-number: QTBUG-117370
Change-Id: I829a9000b405b2d2832cba496b21ec0082273ee2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-03-04 08:47:44 +01:00