Commit Graph

48 Commits

Author SHA1 Message Date
Alexey Edelev 271764cddf Assert if QGrpcOperationContext::serializer returns null
QGrpcOperationContext shall be constructed with the valid serializer.
Let's avoid unnecessary error handling and assert if
QGrpcOperationContext doesn't contain a valid pointer to a serializer.

[ChangeLog][Grpc] QAbstractGrpcChannel implementations now are obliged
to supply QGrpcContext with the valid serializer. Any attempt to
deserialize the returned message with null serializer now will lead to
assert or SEGV.

Pick-to: 6.8
Change-Id: I1f9142244bf5b5ba7a3d04965649d0a0fbb143b9
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2024-08-28 14:47:48 +02:00
Alexey Edelev 7dedb683e9 Adjust protobuf constrains across repo code
Unify constraints that we use in public API and move them to a
common header file. Add the missing constraints for protobuf types,
that includes all types that sufficient for protobuf processing. Add
map types constains, which checks if the Key and Value meet the
protobuf requirements.

Use newly introduced constaints across the code.

Pick-to: 6.8
Task-number: QTBUG-123626
Change-Id: I7d3944f0a1374e7616304a22ec7ff148967ef525
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-08-28 14:47:48 +02:00
Dennis Oberst 788cf57ef7 QGrpcCallReply: remove subscribe()
The function was introduced back then, when we had finished() separated
into error and ok state. When we switched to the QGrpcStatus finished()
the usefullness of this 'helper' got less and less, where now it's just
a simple wrapper around connect. Remove it now and add the note about
SingleShotConnection in finished()

This makes QGrpcCallReply useless (we could just use QGrpcOperation) but
we'll keep it for potentially further API that could be added for unary
calls only.

Task-number: QTBUG-125406
Pick-to: 6.8
Change-Id: I80bafe369f79361dc69580a1c11e13ee3104a304
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-08-23 12:33:41 +02:00
Dennis Oberst 2af9646e1d QGrpcOperation: provide operation context as (const) ref
This getter is for internal usage in the QGrpcOperation subclasses and
is never non-null. It was provided as a raw pointer to avoid the sharing
with shared_ptr.

Rename it to context() and also provide a const version of it.

Task-number: QTBUG-123625
Pick-to: 6.8
Change-Id: I7099ae56974abc0af2d19d81993af3755eb40b1c
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-08-06 15:53:31 +02:00
Dennis Oberst f30945b7f5 QGrpcMetadata: use QHash instead of std::unordered_multimap <QBA, QBA>
There is likely already an instantiation available for it. Prefer the
usage of QHash to stay within the (Qt) lib boundary.

Remove qgrpcdefs.h as it's now obsolete. Update all occurrences of
QGrpcMetadata.

Task-number: QTBUG-123625
Pick-to: 6.8
Change-Id: Ida7bcd851c2d4b247c1b7a8dccddc3d518e0b5ae
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-07-29 09:21:18 +02:00
Dennis Oberst a734f23ef9 Add override(s) of 'QObject::event()' to QObject subclasses
This provides a life-line if we have to add an event handler at some
point.

This patch addresses all of such problems for QGrpc

... and adds a linebreak for consistency ;)

Task-number: QTBUG-123625
Pick-to: 6.8
Change-Id: Ic36a9b3ab2ef9b9adea38b4d4d78e2b3439e6504
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-07-29 09:20:42 +02:00
Dennis Oberst 5479292128 QGrpcStatus: drag 'StatusCode' enum into the qtgrpc namespace
This will make it easier to re-use it. This enum has a high chance of
being reused in the future.

Task-number: QTBUG-123625
Pick-to: 6.8
Change-Id: I587a2ae41e85b03539bc6213f53851ac37a415df
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-07-29 09:20:30 +02:00
Dennis Oberst d727e2a131 QGrpcOperation: constrain read() with base_of QProtobufMessage
don't let user run into page long error messages.

Task-number: QTBUG-123625
Pick-to: 6.8
Change-Id: Id0d3c41d452c65da633b96ed8c364076f03ef4ec
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-07-19 16:16:20 +02:00
Dennis Oberst cbf7324440 QGrpcOperation: remove private data() from public interface
... and use the pimpl directly

Task-number: QTBUG-123625
Pick-to: 6.8
Change-Id: I3f4e4a14447411235d9895ce9a21789ff82564b7
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-07-11 10:32:43 +02:00
Dennis Oberst aac59f8e1f QGrpcOperation: split metadata() into lvalue and rvalue getter
and delete the rvalue version. Don't hand out refs on temporaries!

Task-number: QTBUG-123625
Pick-to: 6.8
Change-Id: Ide13de50d23c542141ad537ce93dff553688999a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-07-08 09:33:24 +02:00
Dennis Oberst 9148ac483c Apply consistent style for header includes
That includes:
  - Group headers by module separated by a newline.
  - Sort headers alphabetically (exception: qtgrpcglobal.h is first).

We're already practicing this. With this patch we do it more precisely
though.

Pick-to: 6.8
Change-Id: I7a5aab2f1224dc61c32f6ee4040a6bb601267edd
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-07-05 11:33:00 +00:00
Dennis Oberst c42b97fd94 QGrpcOperationPrivate: avoid copying the shared_ptr in the ctor
Don't take the argument by value but rather rvalue. We can guarantee
that for the private pimpl.

As a drive-by mark the single arg ctor explicit.

Pick-to: 6.8
Change-Id: I5430923b757652dc15ab5ea00dbf542280dc6a30
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-07-03 12:02:18 +02:00
Dennis Oberst f3ba230805 QGrpcOperation: sort TU members + docs loosely on header file
Pick-to: 6.8
Change-Id: I985dfefb911b2f5828aaea882e389161a4b4bdeb
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-07-03 12:02:18 +02:00
Dennis Oberst 9aa4c24c34 QGrpcOperation: favor Q_D() over raw d_func calls
Pick-to: 6.8
Change-Id: Iaa80209c6fc621b90a64893d4b0017c55008f8b3
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-07-03 12:02:18 +02:00
Dennis Oberst 15e10394d7 QGrpcChannelOperation: rename to QGrpcOperationContext
The name 'channel operation' can be confusing for people who look at
this class. This was already observed with experienced Qt developers who
struggled to get the idea and usage of this.

This class doesn't perform any operations on its own. It simply holds the
context (e.g. service names, options, signals).

Try to resolve this by renaming into QGrpcOperationContext. I think this
is more accurate then what we had before.

Task-number: QTBUG-123625
Pick-to: 6.8
Change-Id: I6dad0247ffc4c20d1f0b31f1651a608d28043cb0
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-06-27 10:21:34 +02:00
Dennis Oberst eb243cedff QGrpcOperation: add missing doc definition for cancel()
... otherwise the following patches can not merge. The body will be
provided as a follow up.

Pick-to: 6.8
Change-Id: Ie0a5ae0333670c06bdefabda616318d7f5833bc8
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-06-27 10:21:16 +02:00
Alexey Edelev ec8a3fec71 Remove errorOccurred interface signal from grpc operations
The signal is the redundant attempt to make Qt-style primitives. It
increases the usage complexity without any visible advantages. The
finished signal should instead accept the QGrpcStatus code and allow
users to make the descisions about the success of the operation in a
single call stack.

[ChangeLog][GRPC] The QGrpcOperation::errorOccurred and
QGrpcChannelOperation::errorOccurred signals are removed.

[ChangeLog][GRPC] The QGrpcOperation::finished and
QGrpcChannelOperation::finished signals now have QGrpcStatus argument
that indicates the status received from the server-side for the
operation.

Task-number: QTBUG-123625
Change-Id: I87669e0921c41cef0ff9d408bed1b057ba5198f2
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-05-30 12:37:19 +02:00
Dennis Oberst 34e543eda2 QGrpcChannelOperation: rename signals
We rename the dataReady(), sendData(), cancelled() and writesDone()
signals to messageReceived(), writeMessageRequested(), cancelRequested()
and writesDoneRequested() respectively.

Signals in channel operations have different meanings as they either
report the result of specific operations (outgoing) or get a request
from the client (incoming).

Change-Id: Icbc9e99b49cbf8b9977d37a77d5abc56517f661e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-05-28 10:54:05 +02:00
Alexey Edelev 6b763e5e84 Remove the serializer related API from gRPC operations
Do not expose the QAbstractProtobufSerializer API for the
QGrpcOperation and derived classes. QProtobufMessage now allows
serializing using the base class pointer. So we may simplify the
gRPC operations api and implementation. The serializer now is hidden
as the implementation detail.

Change-Id: Ib6865119a1b24e9f43cf60a30e2acc8ad0afdabf
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-05-22 08:02:35 +02:00
Alexey Edelev 9145ffc50d Rename QAbstractGrpcClient to QGrpcClientBase
QAbstractGrpcClient is not abstract and doesn't offer any interfaces
for reimplementation. Assuming it's the base class for all gRPC
clients, containing the generic gRPC client functionality. Rename the
class accordingly.

Taks-number: QTBUG-123625
Change-Id: I38e18a3b67e5f0f9c754e65337b2780780eea467
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-04-24 17:25:10 +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
Dennis Oberst 636b70f93d QGrpcOperation: expose deserializationError, deserializationErrorSring
Expose 'deserializationError' and 'deserializationErrorString', as this
will be needed by the following commit, that changes the error handling
for the read() functions.

An API user could probably need the information of the failed
deserialization.

Change-Id: I0a61b6e4d8d9528c1a9fb45284bcbef6887fb527
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-04-18 11:14:05 +02:00
Alexey Edelev 1152808eea Translate the gRPC status messages
Wrap status messages generated by QtGrpc with QObject::tr calls.
This allows having the translated status messages if localization
is done.

Change-Id: I7eb7d6f7ac803f60414b74e55f80915a5826904b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-04-12 16:16:53 +02:00
Dennis Oberst 9f13e4bd82 qgrpcstream: add missing QObject* parent argument to constructors
fixes Axivion(SV2244): Warns when QObject derived classes do
not have at least one constructor receiving a QObject.

Change-Id: I57823bc501b80c9d9ddd9e97d204b400f55783d2
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-04-10 16:02:36 +00:00
Alexey Edelev bbf73aea13 Remove redundant const modifiers from QGrpcChannelOperation::sendData signal
The Qt signals shouldn't be const. The hole chain of const modifiers
was the result of some intermediate implenentation. In general the
QGrpcChannelOperation *QGrpcOperation::channelOperation return value
doesn't require to be const and the depdendent const modifier of
QGrpcChannelOperation::sendData signal can be removed too.

Change-Id: I64719307b1b33f136b6073af90759628048142bb
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-10 14:10:41 +02:00
Alexey Edelev 535f9a3096 Split the QGrpcStatus constructor
Use the explicit constructors instead of overloading with default
arguments when constructing QGrpcStatus with and without the status
message.

Task-number: QTBUG-123625
Change-Id: I647474e5f3394f18746b8f57f6c0eafc3a9a97fa
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-10 10:38:42 +02:00
Alexey Edelev eadebf81ce Return const ref to QGrpcMetadata in QGrpcOperation::metadata
Avoid redundant copies.

Task-number: QTBUG-123625
Change-Id: I0637b302a78c629badb2741e8e620674ef2d3b0d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-04 14:55:40 +02:00
Dennis Oberst fb0136487a QGrpcOperation: modernize api with [[nodiscard]]
This improves tooling for return values that shouldn't be ignored.
As a drive-by mark some of those functions as noexcept.

Task-number: QTBUG-123625
Pick-to: 6.7
Change-Id: I92a7aed22208b1e5f073089306da2e04fb143f9b
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-04-03 13:16:17 +02:00
Dennis Oberst c232253fbc qtgrpc: unify includes to the schema <Module/file.h>
Found in API-Review.

As a drive-by also change the includes for private headers and
implementation files.

Task-number: QTBUG-123625
Pick-to: 6.7
Change-Id: Ice4218c0425888a53d3e78c9f53aecd7b459cc69
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-03-22 16:56:18 +01:00
Alexey Edelev 48003f9433 Add the missing documentation for the QGrpcOperation::cancel method
Pick-to: 6.6 6.7
Change-Id: I3c0654a33f354aa7e50c2d42e659bff4c6c8181a
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-02-20 07:09:01 +01:00
Alexey Edelev d737f7a5fc Remove the Q_DECLARE_PROTOBUF_SERIALIZERS macro
Now when we store the pointer to the property ordering in each
QProtobufMessage instance, we may remove generating of redundant
(de)serialize functions from messages.

This adds the generic QProtobufMessage::serialize and
QProtobufMessage::deserialize methods. Also we don't need the
template serialize/deserilze methods in QAbstractProtobufSerializer
since ordering information can be retrieved from the protobuf message
base class.

[ChangeLog][Protobuf][QProtobufMessage] Added the serialize and
deserialize methods.
[ChangeLog][Protobuf][QAbstractProtobufSerializer] The serialize
and deserialize methods are now non-template.
[ChangeLog][Protobuf] The Q_DECLARE_PROTOBUF_SERIALIZERS macro
is removed from the API and is not generated anymore.

Task-number: QTBUG-120931
Change-Id: I8ba8e6bb83728e58f781f42520629e1a9be4f026
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
2024-01-24 17:36:40 +01:00
Alexey Edelev 2d0897ce66 Extend interface of gRPC operation with methods supporting QProtobufMessage
Add the following methods:
 - QGrpcOperation::read(QProtobufMessage *message) const
 - QGrpcClientStream::sendMessage(const QProtobufMessage *message)
 - QGrpcBidirStream::sendMessage(const QProtobufMessage *message)

Methods allow serializing/deserializing protobuf message using the
interface base class. These methods use the serializeRawMessage
and deserializeRawMessage methods of QAbstractProtobufSerializer, so
in current implentation they work relatively slower than their template
counterparts.

[ChangeLog][GRPC] Added the following interfaces to gRPC operation
classes:
 - QGrpcOperation::read(QProtobufMessage *message) const
 - QGrpcClientStream::sendMessage(const QProtobufMessage *message)
 - QGrpcBidirStream::sendMessage(const QProtobufMessage *message)

Task-number: QTBUG-120972
Change-Id: I6fb1ec20efd680cb45ccf13833cd5b712d2dd0aa
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
2024-01-24 12:49:16 +01:00
Alexey Edelev 78c7a34e41 Add the missing documentation for QAbstractGrpcClient::errorOccurred signal
Add documentation and link QAbstractGrpcClient::errorOccurred and
QGrpcOperation::errorOccurred wis see also tags.

Pick-to: 6.5 6.6 6.7
Change-Id: I6b07f0d6f9113e1b60a0417f3d9bece0911bdccc
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-01-16 16:18:07 +01:00
Alexey Edelev 9a0132168a Remove the trailing semicolon from QGrpcOperation::read docs
Pick-to: 6.5 6.6 6.7
Change-Id: Icda89df78929514d79829b7e95dc0aa3b2189112
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
2024-01-15 13:30:55 +01:00
Alexey Edelev 703f2e3ce2 Rid of synchronous gRPC API
The API was based on the nested QEventLoop which might cause
potential issues. Since we didn't find a good way to implement this
in channels, it's better to remove the API. It can be restored in
the future releases.

[ChangeLog][GRPC][UnaryCall] The synchronous gRPC calls are not
generated anymore. All related API is removed.

Fixes: QTBUG-118097
Change-Id: Id6d1a610a24ff079ed9a4112ca69ceb61fe03d52
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2023-11-12 10:23:19 +01:00
Konrad Kujawa 3937931b90 Introduce QGrpcClientInterceptor
Introduce interceptors mechanism for every type of call.
Introduce QGrpcInterceptorContinuation, which is
a std::function wrapper for a call.
Introduce QGrpcClientInterceptor - a interface, client API
to implement interception logic by QtGRPC user.
Introduce QGrpcInterceptorManager - registry and a runner
of interception chain.

[ChangeLog][GRPC] Add gRPC client interceptors mechanism,
with QGrpcInterceptorContinuation, QGrpcClientInterceptor,
and QGrpcClientInterceptorManager classes.
[ChangeLog][GRPC] Added setter methods to QGrpcChannelOperation.
[ChangeLog][GRPC] Added addInterceptorManager() method to
the QAbstractGrpcChannel class.
[ChangeLog][GRPC] Added QGrpcOperation::isFinished() method.
[ChangeLog][GRPC] Added QGrpcOperation::waitForFinished() method.

Task-number: QTBUG-111038
Change-Id: I8d49b8f3e8aec52441bf4aada5fdef6875926de2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-11-10 18:56:56 +01:00
Alexey Edelev 684f3ca598 Add the 'method' getter function to the QGrpcOperation
Add the getter of the 'method' name to the QGrpcOperation.
The userfacing getter can be useful for debugging and other
related operations.

Task-numner: QTBUG-105494
Change-Id: Iac210e3e34d16c4aa1b3123ecb98eeab0be5a7af
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
2023-08-28 13:36:38 +02:00
Alexey Edelev 3f515047ad Split QGrpcOperation into Client and Channel parts
This is valid from the design point of view API separation, that
unlock further streaming API improvements.

[ChangeLog][GRPC] QGrpcOperation::abort function is replaced by
QGrpcOperation::cancel function. The logic of new function is generic
for all gRPC operations. All grpc operations(calls and streams) now
emit errorOccurred signal when cancelling.

Task-number: QTBUG-105494
Change-Id: If306dd1ae43daebf5049b5fee55ad90c7fa848c3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
2023-08-28 13:36:38 +02:00
Alexey Edelev 7e896a2a86 Move deserialization error handling to QGrpcOperation
Since QGrpcOperation::read is the common entry-point for the message
deserialization it makes sense to add the deserialization error
processing to the QGrpcOperation primitive.

Change-Id: Ia8ee5e44ab63dfac5c27e505c0194d4548bac157
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
2023-08-14 10:24:54 +02:00
Alexey Edelev e3cd75fce9 Add QGrpcMetadata to the QGrpcOperation
Add the interface that allows reading metadata information received
from the server from the grpc streams and call replies.

TODO: This commit only add interface that should be used in channel
implementation.

Task-number: QTBUG-113663
Change-Id: I9e3d1810d1ee6a3b4e04fbd3555e093789b623ce
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-05-23 16:35:29 +02:00
Konrad Kujawa e295dd2d30 Remove dependency on QAbstractGrpcClient in QGrpcOperation
Make QGrpcOperation use QAbstractProtobufSerializer to perform
serialization.

Fixes: QTBUG-111406
Change-Id: I48e7ca97e043de3827d7c655ae508e221d3d4ca8
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-04-25 16:58:42 +02:00
Konrad Kujawa 04861d217d Fix qdoc warnings with missing module header files
Fix qdoc warnings with missing module header, for example QtGrpcDoc,
by removing moduleheader variable from the .qdocconf files.
Initially that was resolving issues when building documentation on macOS.
Fix the root cause of the problem by changing capitalization of the project
from QtGRPC, to QtGrpc (inspired by the QtNfc module).

Pick-to: 6.5
Change-Id: I3b9cc408235b191bbf1350a18bdd91ae45327e41
Reviewed-by: Luca Di Sera <luca.disera@qt.io>
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-03-13 16:45:07 +01:00
Alexey Edelev d98f418ebd Fix the double-free issues related to QGrpcOperation primitives
In the recent implementation the std::shared_ptr takes the real
ownership over the Qt GRPC channel primitives such as QGrpcOperation,
QGrpcStream, and QGrpcReply. Meanwhile these primitives had the QObject
parent-children relationships with the classes derived of the
QAbstractGrpcClient. This led to the floating double free issue when
Qt GC removed the primitives before the std::shared_ptr did.

Break the parent-child linking between the Qt GRPC channel primitives
and QAbstractGrpcClient. Cleanup the code parts that suppressed the
issue - the use of deleteLater instead of calling destructor directly.

Pick-to: 6.5
Change-Id: I9c6562335020e45ddb8e440311ec119fc90777f8
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-02-09 13:28:17 +00:00
Alexey Edelev c4394828fa Fix documentation of QGrpcStream::messageReceived signal
Add the missing class to the message declaration.

Amends 0d56724387

Pick-to: 6.5
Change-Id: Ida7e60904bbe7d337a46f764321bb9580e93f04d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-01-30 12:20:35 +01:00
Konrad Kujawa 79dc1b71ef Update links to the QtGrpc documentation
Add QtGrpc index and classes documentation pages.
Fix missing links to QtGrpc documentation.
The modules are now consistently named 'Qt GRPC', 'Qt Protobuf'.

Pick-to: 6.5
Change-Id: Iabd91336c871e43c97c49712a52f3aa82f7e75a5
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-01-26 15:08:44 +01:00
Konrad Kujawa 9a1881718b Address minor suggestions for QtGrpc codebase
Add missing explicit, override, default, const keywords.
Omit pointless inline.
Remove empty () in lambdas.
Include mocs for QtGrpc module.
Use trailing , in enums.
Use underlying type for enums.

Task-number: QTBUG-108833
Pick-to: 6.5
Change-Id: I34e73a7f2715f374303634f9ed0236601c094a84
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-01-04 12:40:46 +01:00
Konrad Kujawa 176aa956eb Reflow and fix style issues in QtGrpc documentation and messages
Reflow QtGrpc documentation and messages.
Fix style and grammar issues in the QtGrpc.
Address minor code review suggestions from 'Introduce QtGrpc' patch.

Task-number: QTBUG-108833
Pick-to: 6.5
Change-Id: I74b9725e82e23d0ad6ae9be19b6c5542e63fc487
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-01-04 12:40:43 +01:00
Konrad Kujawa eeb96d7a7b Rename QGrpcAsyncOperation to QGrpcOperation
QGrpcOperation name is more matching the implementation,
because is no longer thread safe and does not implement any of
async methods.

Task-number: QTBUG-108833
Pick-to: 6.5
Change-Id: I926dc651b2c3daa58429bcb358a827bd398cee46
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-12-20 15:25:19 +01:00