Commit Graph

14 Commits

Author SHA1 Message Date
Konrad Kujawa 5bb03ba979 Rename QAbstractGrpcClient::stream() to startStream()
Task-number: QTBUG-108833
Pick-to: 6.5
Change-Id: I3507f316bd857c2db36c887bf454a46dcf50d724
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
2023-02-20 12:46:32 +01:00
Konrad Kujawa 68b3ce7941 Rename QAbstractGrpcChannel::stream() to startStream()
Task-number: QTBUG-108833
Pick-to: 6.5
Change-Id: I448b3b15b49391287fc443e7d277ea666678111a
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-02-20 12:46:25 +01:00
Konrad Kujawa d5dc4814de Use return type QGrpcCallReply* in QAbstractGrpcChannel::call()
Use return type instead of QGrpcCallReply* parameter in
QAbstractGrocChannel::call() method.

Pick-to: 6.5
Change-Id: Ica90d0b89416119415b379e30a092bc92d5fa8ae
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-02-08 16:18:25 +01:00
Alexey Edelev 5591744492 Remove QAbstractGrpcChannel::thread() method
The method was used in the QAbstractGrpcClient::attachChannel method.
It doesn't make sense to expose this API at all since the check could
be done implicitily using the d-prointer to QAbstractGrpcChannelPrivate
directly

Amends 0d56724387

Pick-to: 6.5
Change-Id: Id747a54d03a2090770bbbd5d7e456a5248949b5b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-02-03 12:55:48 +01:00
Konrad Kujawa 1fc63830df Use _L1 string literals instead of QLatin1StringView constructor
Task-number: QTBUG-108833
Pick-to: 6.5
Change-Id: I9a55da19eca1a145a43b7d454857465bd53c2ed1
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-01-31 14:23:24 +01:00
Konrad Kujawa a4dff7c073 Use QLatin1String1View and QByteArrayView in QAbstractGrpcClient
Use QLatin1StringView in QAbstractGrpcClient and
whenever it is possible, because method and service names
are ASCII-only and may only contain characters allowed
by HTTP/2 text header values.

Use QByteArrayView in QAbstractGrpcClient, because it represents
arbitrary bytes sent to the server.

Task-number: QTBUG-108833
Pick-to: 6.5
Change-Id: I1a9cf7df8cff9dbfe703f6a3bfcb01217df8c4cc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-01-27 09:28:13 +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 c4754ea69e Remove client argument from QAbstractGrpcChannel::stream() method
Having stream as a holder of the pointer to a QAbstractGrpcClient
(aka parent) is good enough.
The channel has no reason to know about client at all,
since it works with primitives derived from QGrpcAsyncOperation,
the connection lifecycle should also be controlled by the those privitives.

Task-number: QTBUG-108833
Pick-to: 6.5
Change-Id: I61e38daf1dc68d31e4a71819fb4c42a0f8785880
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-01-05 14:59:35 +01:00
Konrad Kujawa e982b0655f Use QObject::d_ptr in QtGrpc
Use QObject::d_ptr instead of implementing it
on it's own for every class.

Task-number: QTBUG-108833
Pick-to: 6.5
Change-Id: I9276312dd1c81f33fd223ffc0452ab91f79984ad
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-01-05 13:26:38 +01:00
Konrad Kujawa e250e6b6ff Fix clazy-connect-3arg-lambda warnings
Task-number: QTBUG-108833
Pick-to: 6.5
Change-Id: Ie05aa52e2c437228263c60ab522836e8c52706fd
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-01-04 11:40:49 +00: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 92ad7b1579 Use std::shared_ptr instead of QSharedPointer
Task-number: QTBUG-108833
Pick-to: 6.5
Change-Id: I51dcc024a3f4eb0d9a53f60a57c0a9621f8980c4
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-12-21 13:39:42 +01:00
Konrad Kujawa 0d56724387 Introduce QtGrpc
QtGrpc provides support for serializing and deserializing
gRPC services using Qt.

The tool was originally written by Alexey Edelev, along with various
contributors, on GitHub. Originally under MIT license, but major
contributors have agreed to relicense the code under GPL/commercial for
inclusion in tools for Qt. Their copyright notice is retained and
the original source code, still licensed as MIT, can be found in its
original repository[0].

[0]: https://github.com/semlanik/qtprotobuf

Change-Id: Id29e70df1249e9369fbfaa2c543f3ff29efbdbea
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-12-09 15:00:04 +01:00