Commit Graph

1597 Commits

Author SHA1 Message Date
Dennis Oberst bfa2607a72 GrpcToolsMacros.cmake: continue on invalid files
Previously the helper returned early in case no service section was
found in the proto file. If we supply multiple files, this function
should simply skip those. Otherwise it's not possible to process such a
list variable.

Pick-to: 6.10 6.9 6.8
Change-Id: Iab31fa81404f2df2ec4ad628810ff7f948b3eb5f
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-09-02 15:26:58 +02:00
Dennis Oberst 49c5c7d82c Http2Handler: Modify and add debug logs
For understanding the flow better, if needed. Change the log for failed
cancellations to be a warning. This information is usefull to see
without special logging rules!

Pick-to: 6.10 6.9 6.8
Change-Id: I5e30962381c4f476d8e9e1258f5af10c7586942c
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-09-02 15:26:55 +02:00
Dennis Oberst 15cef4fd14 QGrpcHttp2Channel: Guarantee transportation scheme
Currently, if TLS or QLocalSocket is explicitly requested but
unavailable, we fall back to TCP. This is not a safe approach.

This patch asserts on that condition and uses qCFatal to indicate the
mismatch instead of silently falling back to another transport.

Given the security aspects of this file, this strengthens guarantees by
ensuring the requested transport is actually used.

Also: Make construction initialization friendly!

Separated concerns by splitting the large constructor into smaller
segments, achieving the same result through helper functions in the
initializer list.

Added a SocketType enum to clearly identify the transport method. Since
m_isLocalSocket was already removed, this provides more detail without
increasing storage.

[ChangeLog][QGrpcHttp2Channel][Important Behavior Changes]
Requesting TLS or QLocalSocket now fails with a fatal error if the
requested transport is unavailable.

Fixes: QTBUG-139597
Pick-to: 6.10 6.9 6.8
Change-Id: I2914d8a5764436d08b4502aa7d8cf6c4fdeb60d0
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-09-02 15:26:52 +02:00
Dennis Oberst 3afc1866d2 QGrpcHttp2ChannelPrivate: remove unused serializer
Pick-to: 6.10 6.9 6.8
Change-Id: I7104266217c867d74470317ea02f5db75b5d00f7
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-09-02 15:26:49 +02:00
Qt Submodule Update Bot 463205cdf2 Update dependencies on 'dev' in qt/qtgrpc
Change-Id: Ic07e6fed756de50cd37f45d098328f585fe4bcb4
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-09-01 20:59:19 +00:00
Jerome Pasion c6cd23770d Doc: Add security considerations page
-A list of basic security topics when implementing gRPC
-Add links to other modules and relevant pages.

Task-number: QTBUG-138812
Pick-to: 6.9 6.10
Change-Id: I523f07cb516641771eb1457091f381a2e09b0026
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2025-09-01 17:42:54 +02:00
Jaishree Vyas 49c0107975 Doc: Review QtGRPC chat example
As part of reviewing the application examples and following a structure, this
change covers:
-Language changes
-Follows the strucutre
-Includes \sa link to All Qt Examples

Fixes: QTBUG-137964
Pick-to: 6.10 6.9 6.8
Change-Id: Ic14d7042e6db277c1584b69ba46f7748f53642ab
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2025-09-01 08:45:54 +00:00
Dennis Oberst b2d9291983 QGrpcHttp2Channel: Avoid warning on receiving multiple SETTINGS frames
Remove the warning that incorrectly triggers when a second HTTP/2
SETTINGS frame is received.

According to RFC, Section 6.5, a SETTINGS frame "MAY be sent at any
other time by either endpoint over the lifetime of the connection."

Ref: https://www.rfc-editor.org/rfc/rfc7540#section-6.5

Pick-to: 6.10 6.9 6.8
Change-Id: I83b0238405801a853c20f22629b12f67edce26e2
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2025-08-21 13:51:43 +02:00
Dennis Oberst 528469eece Http2Handler: let finish() stop the deadlineTimer
It's the single point where a RPC finishes and the correct place to stop
the timer.

Pick-to: 6.10 6.9 6.8
Change-Id: I2965a938da32a8d78ccfb48f7f5ad37f63ee4363
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-08-20 14:59:39 +02:00
Dennis Oberst 02c989e3e0 QGrpcHttp2ChannelPrivate: remove unused isLocalSocket()
It's not used anywhere in the code

Pick-to: 6.10 6.9 6.8
Change-Id: I388800f73f67f9f37f008590c9f190aa091d9c6b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-08-20 14:59:36 +02:00
Alexey Edelev 7da4e6886a Move the socket error handling to the common place
Instead of connecting each and every Http2Handler to the socket error,
use QGrpcHttp2ChannelPrivate::handleSocketError to iterate over
alive Http2Handler and send errors right from this handler. This saves
some memory and time on handling errorOccurred signal.

Pick-to: 6.10 6.9 6.8
Change-Id: I907e24425aafe3dccca19100d02fe7adffb1fdaa
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2025-08-15 14:37:46 +02:00
Dennis Oberst 66e4a79353 protobuf: fix deserializeList() warnings and improve clarity
Fixes a compiler warning from implicit conversion by introducing a safe
qsizetype cast. Also improves readability and efficiency by renaming
variables and pre-allocating list storage aswell as adding a missing
move.

Pick-to: 6.10 6.9 6.8
Change-Id: I5eb34621690893e06e68c7b821e93e3462388595
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-08-15 11:06:11 +02:00
Alexey Edelev c764a9b223 Allow enums be non-packed
Repeated enum fields should not ignore the 'packed' protobuf attribute,
so if 'packed' is set to 'false', FieldFlag::NonPacked should land to
the message field attributes, indicating to serializer the expected
output format.

Fixes: QTBUG-138683
Pick-to: 6.8 6.9 6.10
Change-Id: I1c2d2bee32b42f60310307e1f3638ba2b3c236a3
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2025-08-13 10:27:13 +02:00
Qt Submodule Update Bot 764ddd4a38 Update dependencies on 'dev' in qt/qtgrpc
Change-Id: Ic3c9c53c5d4b28f53a064509dc8dcd7fb1b1b771
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-08-08 22:40:41 +00:00
Dennis Oberst 0af1daa639 QAbstractGrpcChannel: Add missing move when starting the RPC
Coverity-Id: 479433
Pick-to: 6.10 6.9 6.8
Change-Id: Ieb543fbd6643514e4862d3ad524865196acbacb7
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-08-08 17:45:43 +02:00
Topi Reinio bfc975db58 Doc: Fix incorrect usage of \generatelist
The \generatelist command takes an optional argument
that affect how the members are listed, for example,
`classesbymodule` which creates an annotated list of
the classes in a named C++ module.

`groupsbymodule` is not recognized or documented. QDoc
falls back to generating a list of all members of a
group in this case. While the end result is correct,
this relies on an undocumented feature that is likely
to change and break.

Replace these instances with an explicit \annotatedlist
command that produces the same output.

Pick-to: 6.10
Task-number: QTBUG-138901
Change-Id: Iffa5720e53177d1b996d49f9a607e2a1fa91bb0a
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2025-08-06 09:15:56 +00:00
Kai Köhne d62f437efa Doc: Fix botched linking to QImage
Pick-to: 6.5 6.8 6.9 6.10
Change-Id: I50ba5ed2628ecb753e18dd22c457e749168b6b01
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-08-06 08:25:16 +02:00
Dennis Oberst bd1fccb26a grpc benchmarks: fix compiler warnings
Fix unused variables and add missing include

Pick-to: 6.10 6.9 6.8
Change-Id: Idc756938daa63a9cfd4d336598c7919de999a888
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-08-05 19:23:35 +02:00
Dennis Oberst eb703a45a1 Remove unnecessary QObject:: namespace to improve readability
Removed redundant 'QObject::' namespace to streamline code and enhance
readability, especially in lambda handlers.

Due to our formatting, all lambda handlers will be unnecessarily aligned
to the very right side. Given that connections and lambda handlers are
very common in this codebase this improves the readability of those
lambda handlers.

Pick-to: 6.10 6.9 6.8
Change-Id: I178a838c7702382b4b3845c729d7c11eeeb1c8d1
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
2025-08-05 19:23:32 +02:00
Dennis Oberst 7e06d79d6d QGrpcHttp2Channel: add more debug logging
Easily allows to have a deeper inspection of the system by adding more
debug prints, which can be enabled with the logging category.

Pick-to: 6.10 6.9 6.8
Change-Id: I86d7f6c0c53c412a79a3d66f515fa1cd6757a023
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-08-05 19:23:27 +02:00
Dennis Oberst f1200375f0 QGrpcHttp2Channel: use logging categories and printf style logging
Given the complexity of the http2channel implementation it comes natural
to extend its logging clarity. This aligns with best practices in Qt
development. Also this makes it easier to debug the system remotely.

Pick-to: 6.10 6.9 6.8
Change-Id: Idf00020408b678fc6b17a25db538abd5a838bced
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-08-05 19:23:24 +02:00
Dennis Oberst 4504e44869 Http2Handler: improve readability for dataReceived handler
1. Remove nesting by reversing the state check.
2. Split the messageReceived calculation to be outside of the function
   call. Given that this is an important calculation it should be easily
   understandable.

Pick-to: 6.10 6.9 6.8
Change-Id: Icfaa29a5dc92eb5b1c86469639a3deb90b5aacd0
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
2025-08-05 19:23:20 +02:00
Dennis Oberst 4cf1dd3093 QGrpcHttp2Channel: unify socket error handler
De-duplicate the logic for the error handlers.

Pick-to: 6.10 6.9 6.8
Change-Id: I1f8745046ba996ba81eb1bf2f5c3882b6c31059b
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
2025-08-05 19:23:13 +02:00
Dennis Oberst 1ac37b787a Http2Handler: Re-order ctor args and rename m_operation
Re-order the argument to the Http2Handler ctor. The parent should come
first. Furthermore rename the m_operation to m_context as I think
context is a more fitting name for this important member.

This improves the readability and makes it easier to follow the code.

Pick-to: 6.10 6.9 6.8
Change-Id: I396e205ec345d80a8cf2cfebe43625f72d39ac6e
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-08-05 19:23:08 +02:00
Dennis Oberst 5bc854e901 QGrpcHttp2Channel: implement filterServerMetadata option
Implement the filtering of internal and reserved keys for the server
metadata. gRPC over HTTP2 responses are well defined and such
information shouldn't be provided to users. At least not by default.

Ref: https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#responses

This patch changes the filtering to be applied by default.

[ChangeLog][QGrpcHttp2Channel/QGrpcOperation][Important Behavior Changes]
QGrpcOperation::serverInitialMetadata() and
QGrpcOperation::serverTrailingMetadata() no longer include any internal
gRPC or HTTP/2 pseudo‑headers by default.

Fixes: QTBUG-138363
Change-Id: I4af9e8abe60799e817f47faa5de4c2d0e41854be
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-08-05 19:23:05 +02:00
Dennis Oberst 25782e8866 QGrpc{Call,Channel}Options: add 'filterServerMetadata'
This option enables to control the filtering of the received server
metadata. Both options provide it as optional<bool>, so that
QAbstractGrpcChannel implementations should choose a reasonable default.

This has not been provided to the QQml*Options, as there is currently no
available API to access the server metadata.

[ChangeLog][QGrpc{Call,Channel}Options] Added the filterServerMetadata
property.

Task-number: QTBUG-138363
Change-Id: I325a3b4f6e68d63f0828a6deb1a7be883247614b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-08-05 19:23:00 +02:00
Dennis Oberst 7695e0fc90 QGrpc{Call,Channel}Options: provide noexcept guarantees to metadata()
Before, we did a lazy initialization in the deprecated noexcept getters
to provide a way of not storing the metadata twice. There is just no way
to preserve correctness whilst providing this option.

Whilst const-ref return values provide the most efficient way to access
them, it also most tightly constrains the implementation. Let that be a
lesson ...

We also remove the free-standing 'operator==' as we're comparing with
the matching containers now, there is no need for them (They should also
not be provided like this from QtGrpc, even though private).

Amends: 778371b8ea.

Pick-to: 6.10
Change-Id: I05c4a1f7d2eab00f41ebcad54d9a096b2dcdf540
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2025-08-05 19:22:56 +02:00
Dennis Oberst f636865a23 QGrpcCommonOptions: improve and rename mergeHash()
Rename the free function to 'toHash', as no merging was happening, this
name was misleading.

Improve the implementation by adding the missing 'reserve()' and simply
try_emplace() the pair into the hash. This will still take the newest
value as before but without constructing a temporary key list and having
the extra lookup with value().

Pick-to: 6.10
Change-Id: I4834feea43e20614caea3d587055c024012e0596
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-08-05 19:22:52 +02:00
Dennis Oberst 0e2803842a Deprecate serverMetadata for server{Initial,Trailing}Metadata
We forgot to deprecate the server-metadata interfaces when we deprecated
the client-metadata. The same problems apply here too!

Found during the 6.10 API-review.

[ChangeLog][Deprecation Notice]
Deprecate the metadata()/serverMetadata()/setServerMetadata() methods on
QGrpcOperation and QGrpcOperationContext that use QHash in favor of the
new server{Initial,Trailing}Metadata interfaces, that use QMultiHash and
provide the correct handling of the received metadata in their
respective phase. This is a behavior change as the old metadata()
interface now only returns the initial metadata.

Fixes: QTBUG-138039
Pick-to: 6.10
Change-Id: I307ee81fc353a0f4316fea2d10f56bb6910ae859
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-08-05 19:22:48 +02:00
Dennis Oberst 814c0b6ac2 Emit cancelled finished() in channel implementation
Currently, the QGrpcOperation was finishing itself so that the channel
implementation should only cancel the corresponding RPC. This is the
only place such self-finishing is used.

Let the channel implementation rather take care of the cancellation
logic and emit the finished signal. The actual handler implementation is
responsible for itself, i.e. finished meaning it's done and no
communication will happen through this stream.

Simplify the logic for timeouts and requested cancellations.

Update the deadline testcase to not check for specific messages but
rather for non-empty messages.

Changes will only be relevant for custom channel implementation.

[ChangeLog][QGrpcOperationContext][Important Behavior Changes]
Cancellation logic should also emit finished now. Custom
QAbstractGrpcChannel implementations should adapt their logic.

Pick-to: 6.10 6.9 6.8
Change-Id: Ic4e70b50afe46b5a883f099a6cf245ea9a0e66c1
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-08-05 19:22:44 +02:00
Dennis Oberst 3fea4be230 QGrpcHttp2Channel: Improve the lifetime management of Http2Handler
Our lifetime management was extremely flawed, as there were many points
where Http2Handler instances were not properly deleted, resulting in
inactive zombie handlers that would never be cleaned up.

In a running event loop, there should be no active or pending handlers
left at the time of channel destruction. If we had previously asserted
this condition:

QGrpcHttp2ChannelPrivate::~QGrpcHttp2ChannelPrivate()
{
    Q_ASSERT(children().isEmpty());
}

and then ran our tests, many cases would reveal that we were effectively
leaking memory due to inproper lifetime management on our side.
This is fixed by applying the following:

When the finished signal is emitted, the corresponding Http2Handler
should be deleted. It no longer makes sense to keep it alive beyond that
point, as this aligns with our documented lifetime for client-side RPC
handlers.

Transform the operation context into a QPointer to not steady convert
into shared_ptr's. Connect to the destroyed signal to keep track when
the user-side handler gets deleted.

We definitely don't want to take part in sharing the ownership (and
therefore lifetime) of the operationContext. Pass down a pointer very
early on so that no mistakes happen in the future (as to take a copy of
the shared_ptr in a lambda).

This is streamlined by introducing the finish and asyncFinish functions.

Task-number: QTBUG-128338
Fixes: QTBUG-129160
Pick-to: 6.10 6.9 6.8
Change-Id: I8e17f7832659fb348e7d05aeabe164b16b6ff283
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-08-05 19:22:40 +02:00
Dennis Oberst 5e969e8646 QGrpcHttp2Channel: Remove unneeded check when creating stream
The `m_connection` check was not needed as there are two places where
this is called:
 - inside createHttp2Connection() -> connection gets created, 100% valid
 - inside processOperation(), where we need the m_connection check
   anyways.

Remove the check + error and replace it with an assert.

Pick-to: 6.10 6.9 6.8
Change-Id: Ib1d8a16db65cadfecb242f54a27ab70bb08a78fd
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-08-05 19:22:35 +02:00
Dennis Oberst e48296e650 QGrpcHttp2Channel: Fix missing handling of failed operations
createHttp2Stream is calling finished asynchronously. It must report the
outcome back immediately though, as processOperation() depends on it.

Pick-to: 6.10 6.9 6.8
Change-Id: Ic01fea69dba491c8f119eb3a28523878a8e214d7
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-08-05 19:22:27 +02:00
Dennis Oberst e232a4ee5e QGrpcHttp2Channel: Fix memory leak for cancelled Http2Handler
The QGrpcOperation::cancel() logic is already emitting
QGrpcOperation::finished() for us but the previous cancellation logic
was not deleting the cancelled handler.

Fix this by deleting unconditionally. This is fine for cancelled
handlers. Furthermore transform the cancel() function to return void.
Cancellation should be used unconditionally.

Task-number: QTBUG-129160
Pick-to: 6.10 6.9 6.8
Change-Id: Ifad7230a7592dc5d7691379031356afe1f8f8dc3
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-08-05 19:22:23 +02:00
Dennis Oberst 9de5085814 QGrpcHttp2Channel: validate received headers using protocol rules
The QHttp2Stream implementation doesn't provide any handling or
verification of the HTTP/2 spec. The gRPC over HTTP/2 protocol clearly
defines how Response-Headers, Trailers and Trailers-Only have to behave.

Currently we are missing crucial steps of validation, like:
 - HTTP status to be 200
 - Trailers contain gRPC status
 - Valid gRPC content-type found

Ref: https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#responses

Create the handleHeaders() function to correctly handle the protocol.
Correctly differentiate between Initial, Trailers and TrailersOnly now.

Fixes: QTBUG-138494
Pick-to: 6.10 6.9 6.8
Change-Id: I0d2aba0f123a408b43dc4eb0f2a045898b41bc96
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-08-05 19:22:03 +02:00
Dennis Oberst cdc6938bbf QGrpcHttp2Channel: Fix deadline timeout start location
We should start the deadline-timer when the actual call is beginning and
this is indicated when the initial headers have been sent and not the
stream that has been attached. As a drive-by mark the timer as
single-shot.

Pick-to: 6.10 6.9 6.8
Change-Id: I1eb58d143e4934a3c0770cd3ff24ed47972a5289
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-08-05 19:21:57 +02:00
Dennis Oberst 8d58b8ba6a QGrpcHttp2Channel: fix double-free when deleting pending handlers
The deletion was invalid and could result in a double free. If
createHttp2Connection() encountered expired handlers, it deleted them
but did not remove them from the container. Later, when
settingsFrameReceived() iterated over the same container, it would
encounter the already-deleted handler again.

Harden our handler management by relying on QObject parent <> child
relationship instead of additionally tracking the children by our own.
The handler (child) was already doing that. The channel didn't actually
need any active or pending containers. It's enough to handle the
processing through QObject::children().

We have to add the Q_OBJECT macro now to fully support parent <> child
relationship.

Pick-to: 6.10 6.9 6.8
Change-Id: Iee81e98e826f6019fdf525b167faa33944ebadb2
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2025-08-05 19:21:52 +02:00
Dennis Oberst 76b8c2626a Http2Handler: improve state handling
Since the Http2Handler is largely self-managed, having a clear and
accurate state representation is crucial.

Previously, some key states were missing—particularly those relevant to
the header phase. This made it harder to ensure correct behavior and
state transitions.

This change introduces the 'Idle' and 'RequestHeadersSent' states to
better reflect the handler’s lifecycle. With this we can enforce more
robust validation and ensure the handler behaves as expected.

Furthermore we change the onDone() handling logic (to only allow it to
be called once) to use a bool. Using state management for this is
impractical. It's not a real state of our Http2Handler. It's leaking out
the internal stream state.

Pick-to: 6.10 6.9 6.8
Change-Id: I30b5c935c4fe3aaafb66ed91e25562afca2f8804
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-08-05 19:21:46 +02:00
Dennis Oberst 46bce56bfb Http2Handler: construct initial headers in initialization list
This patch follows C++ best practices. Refactor the
'prepareInitialRequest' function to directly return the constructed
headers so that we can use them in the initializer list.

Ref: https://isocpp.org/wiki/faq/ctors#init-lists

Pick-to: 6.10 6.9 6.8
Change-Id: I095d9ecc3574b8ad1ed344d16701102d2c79df92
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-08-05 19:21:42 +02:00
Dennis Oberst f8196f8050 Http2Handler: provide channel() and channelPriv() accessors
For consistency. No null checking is needed as the channel will always
destroy all children before destroying itself.

Pick-to: 6.10 6.9 6.8
Change-Id: I4638cd906dc6c66d2559048bd147216518655110
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-08-05 19:21:38 +02:00
Dennis Oberst ef9ff0cd55 QtGrpcSslClientTest: verify that incorrectSSL status is not okay
Extends the testcase. The call should fail here with a non-OK status
code.

Pick-to: 6.10 6.9 6.8
Change-Id: I4b8f833f2cb147d9b301004c51dc2a3388876fb6
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-08-05 19:21:33 +02:00
Dennis Oberst 542efe69ec QtGrpcClientUnaryCallTest: improve test logic for metadata()
Extend the testcase to cover both, initial and trailing metadata. This
also shows the current problems with having a QHash metadata and also
the missing separation between initial and trailing metadata.

Pick-to: 6.10 6.9 6.8
Change-Id: I880846ae06e8db338cdb3629dafdff430cab3edb
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-08-05 19:21:25 +02:00
Dennis Oberst 2816a2203f common options: make QMultiHash related helpers free and accessible
For later usage in server metadata deprecation.

Pick-to: 6.10
Change-Id: I973943063b1ba0b065bba48abd12a1be008ebed4
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-08-05 19:21:21 +02:00
Dennis Oberst e7e50fe1e1 Mark deleted rvalue-this overloads as const
These functions are not callable. Declaring them const allows them
to match more calls (specifically, const rvalues, which before would
have given "no matching overload" instead of "deleted" errors).

Pick-to: 6.10
Change-Id: I3d074d561456cf98fccacabea68204c92b7a4b38
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2025-08-05 19:21:16 +02:00
Qt Submodule Update Bot 8c8c100d51 Update dependencies on 'dev' in qt/qtgrpc
Change-Id: I8145ff0eafcdb51a9a02fc6636d932dc27daac06
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-08-05 10:46:02 +00:00
Alexey Edelev 6586e538ac Move the required declarations of out SKIP_COMMAND_LINE_TESTS
The variables are used unconditionally, move them.

Amends c91d02c007

Pick-to: 6.10 6.9 6.8
Change-Id: I0e961922594f6831944e9446b528c5944c493be5
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2025-08-01 11:18:10 +02:00
Alexey Edelev 740c809f94 Move CmdLineGeneratedDir declaration out of SKIP_COMMAND_LINE_TESTS
The variable is used unconditionally.

Amends c91d02c007

Pick-to: 6.10 6.9 6.8
Change-Id: I36910a7b40f16a5a13bf2839a2e6c27aec5e7b26
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2025-07-30 11:21:33 +02:00
Qt Submodule Update Bot 54d4d4266e Update dependencies on 'dev' in qt/qtgrpc
Change-Id: I4cec85220bfb03afa037c375a90e6dd43ecd93dd
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-07-18 13:52:04 +00:00
Alexey Edelev c91d02c007 Skip command line generator tests when crosscompiling
We store the host protoc and generator paths from crosscompiling
environment when building generator tests. The test is supposed to
run on target meanwhile, which surely will lead to an issue if
paths to the tools on target platform differ. This particulary happens
on windows arm64 machine when we copy the cross-compiled tests.

Pick-to: 6.10 6.9 6.8
Change-Id: I85971da1b429383cae0f842306629355fc5833c6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-07-15 19:16:53 +02:00
Qt Submodule Update Bot 5167422dc6 Update dependencies on 'dev' in qt/qtgrpc
Change-Id: I3dd012ae3a6794ee8d63a60f392fc20a79db2108
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-07-15 14:48:45 +00:00