Commit Graph

1494 Commits

Author SHA1 Message Date
Qt Submodule Update Bot 6a4be9b9e5 Update dependencies on '6.10' in qt/qtgrpc
Change-Id: Ie12670c0d588036f48139699924dadbaf4046e62
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-07-22 17:57:26 +00:00
Qt Submodule Update Bot 4888380f62 Update dependencies on '6.10' in qt/qtgrpc
Change-Id: I74f6b29e56bb4b2f95c1409ec1f8513e9ea24c3f
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-07-16 12:51:38 +00:00
Alexey Edelev 7112d80af0 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.9 6.8
Change-Id: I85971da1b429383cae0f842306629355fc5833c6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit c91d02c007)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-07-15 18:22:44 +00:00
Alexey Edelev a4321cb012 UnTP the CMake protobuf API
Remove the technical preview markers from CMake API. Leftovers
from TP phase.

Pick-to: 6.9 6.8
Change-Id: Ic1c363638f2848467845f41e3f20b97c5ed9bfb4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit cbab241c75)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-07-10 16:46:02 +00:00
Alexey Edelev 17d2bef72b Use common::iterateMessageFields in MessageDeclarationPrinter::printProperties
Deduplicate code.

Pick-to: 6.9 6.8
Change-Id: Ieb50b0e41787fb3988f85ca83024069d161c872a
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
(cherry picked from commit 342694b2d3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-07-09 12:12:58 +00:00
Qt Submodule Update Bot 750c0edd64 Update dependencies on '6.10' in qt/qtgrpc
Change-Id: Ie222d7872f7ce63fa703fb5b1e92baab2a69402d
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-07-07 10:39:17 +00:00
Marc Mutz 487f87c78c Include what you need: qquaternion.h
qmatrix4x4.h will lose its qquaternion.h include, so include
qquaternion.h explicitly in all files that mention 'QQuaternion',
unless, for a foo.cpp, the own foo.h has already included it.

Amends 6637773cbd.

Pick-to: 6.9 6.8
Change-Id: I114f58d1d443164eb419dab98623d06044419a81
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 944aa03dea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-07-04 10:57:34 +00:00
Dennis Oberst 9bbd8d17fc chat example: various enhancements
This patch includes:
  - Show available server ports dynamically. Qt built without SSL
    support should not show the https port.
  - Add an early note about the prerequisites for running the example so
    that users are guided from early on.
  - Use std::cout in combination with std::endl to flush the buffer.
    QtCreator doesn't print when simply using "\n".

Pick-to: 6.9 6.8
Change-Id: I4eb7f6fbc1474508af2a88a3313cf94325a63657
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit e81b5d59ad)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-07-03 18:59:04 +00:00
Alexei Cazacov 1280f84db4 Docs: Fix weird duplications in documentation tree
This commit removes the latest example entry from the TOC, because it
somehow breaks the tree generation. The example entry is not needed
here, because the examples are added to the TOC automatically.

Fixes: QTBUG-138180
Pick-to: 6.9
Change-Id: I7d0491684af8c651cafb988acfac311f148a71b6
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit 837145416f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-07-03 13:54:22 +00:00
Qt Submodule Update Bot d3166e98d8 Update dependencies on '6.10' in qt/qtgrpc
Change-Id: Ib9716032dd068f30037588b74bf281c703020506
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-07-02 14:43:49 +00:00
Dennis Oberst 0da4fadb73 QGrpcHttp2Channel: use owning sendDATA interface in processQueue
Go up the chain and use the highest abstraction of the sendDATA
interfaces. Previously, we've been hit by internal QObject::deleteLater
calls for destroying the device in QtNetwork, which slowed down the
sending process. This has been fixed upstream, and all sendDATA
calls, except the QNCBD overload, now destroy the device immediately.

Reference: 4bc878ff4fbacd39d4c0ed1e8e742fd18fa74fed.

This version is now superior, as we don't have to create a new
connection just to destroy the device.

Pick-to: 6.9 6.8
Change-Id: I9416de25169fbaaa1657db7120987754699e4c00
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 7bac7883b7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-07-01 14:38:16 +00:00
Qt Submodule Update Bot db531a5739 Update dependencies on '6.10' in qt/qtgrpc
Change-Id: Icacce54a40063fa21d02bb6e888ee8de2abe17a2
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-06-30 05:42:33 +00:00
Qt Submodule Update Bot 845c19286c Update dependencies on '6.10' in qt/qtgrpc
Change-Id: I2300dc1113637eb69a51018ef86dec269051074b
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-06-25 14:57:38 +00:00
Cristian Le e6b08e7856 Use `_qt_internal_set_source_file_generated`
Migrate implementations that set `GENERATED` source property

Task-number: QTBUG-125077
Pick-to: 6.9
Change-Id: Idb0b7e5fe5efe9996ba3a8a097f3da746b131bac
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 8974c1c558)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-06-24 10:46:00 +00:00
Qt Submodule Update Bot 4c25d16841 Update dependencies on '6.10' in qt/qtgrpc
Change-Id: Ie5d2af499e0c14b0ee9dee5b37f0a0ed8b0dde0e
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-06-23 01:02:37 +00:00
Dennis Oberst 48767cec95 generators: mark security critical source files
Reviewed and marked all security critical files in the
qtgrpc/src/tools directory.

More information: https://contribute.qt-project.org/quips/23

Task-number: QTBUG-135456
Change-Id: I1328431d24aa330a40e95824fdcdbb34e6cf53cd
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit be37926280)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-06-20 15:00:23 +00:00
Dennis Oberst aac33e4c85 qtprotobuf: mark security critical source files
Reviewed and marked all security critical files in the
qtgrpc/src/protobuf directory.

More information: https://contribute.qt-project.org/quips/23

Fixes: QTBUG-135456
Change-Id: I9cc05039ca5830d04816ada978ec193ece154732
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 9e9196380c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-06-20 15:00:17 +00:00
Dennis Oberst d8ea42b4dd QGrpc{Call,Channel}Options: make addMetadata(QBA, QBA) non-owning
Decouples our public API from the implementation. This is also slightly
superior as potential duplicates will not be copied on function call.

Discovered during the 6.10 API review.

Change-Id: I78bc123cf4db034ce12f62a5a4576c8e0d0d64f3
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 6670aafd85)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-06-20 15:00:10 +00:00
Qt Submodule Update Bot 55f53658b3 Update dependencies on '6.10' in qt/qtgrpc
Change-Id: I4d80303b27807d0f011942b981fd2921dea25268
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-06-17 19:40:35 +00:00
Dennis Oberst 5ee0db4455 docs: Add internal documentation for QGrpcCommonOptions
... to avoid qdoc warnings about it being undocumented.

Change-Id: Ic092c26d7e43dd9a51646cc6edf6f418bc8857ec
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 390e1b9a06)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-06-17 12:01:18 +00:00
Alexey Edelev 3a70639e9e Use QT_DEFINE_TAG for the multi value metadata tag definition
Avoid using improper default-constuctable enum class, use the
exising API for the tag definition instead.

Change-Id: Id75cb7e06a54139116595c60ec09f3810313f26b
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit deea825f7a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-06-16 16:41:54 +00:00
Alexey Edelev 0505c39ba5 Fix the qmlRealtivePath calculation
The prefix was wrongly added to the parent directory but not to the
actual file name.

Amends d4e8ef8942

Fixes: QTBUG-137313
Pick-to: 6.9 6.8
Change-Id: I1e907e7be26048174899855efc6a9ed661a1e4d0
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
(cherry picked from commit 9e4b2ec356)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-06-12 13:47:38 +00:00
Qt Submodule Update Bot 8f7f3ffe4e Update dependencies on '6.10' in qt/qtgrpc
Change-Id: Ia7713c7ea76e7b643e0e18f95fc81167e899ba64
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-06-09 15:42:49 +00:00
Qt Submodule Update Bot b12a59a5b2 Update dependencies on '6.10' in qt/qtgrpc
Change-Id: I7666d16556736a40684bdd4ec500f85d47b6cffb
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-06-05 08:59:59 +00:00
Alexandru Croitor 331c681fe0 CMake: Add PURL and CPE info to 3rd party attribution files
[ChangeLog][Third-Party Code] Added PURL and CPE information to the
attribution files of 3rd party sources.

Pick-to: 6.9 6.8 6.5
Fixes: QTBUG-137264
Task-number: QTBUG-129602
Change-Id: Ied50c009c8208ab576e5432586c99cb0e8ba84b4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit bd86e2f91b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-06-04 13:26:14 +00:00
Cristian Le 5f1ed8da0e Move `qt_internal_project_setup` as early as possible
The earliest we can move this is right after `BuildInternals`. This
allows us to add function calls before navigating the `find_package`
tree of the dependents.

Task-number: QTBUG-135233
Change-Id: I6a875982fa6d8b15dcfacfda5e4d5976d02798d6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2025-05-30 12:29:32 +02:00
Topi Reinio 3691055700 Doc: Enable automatic linking to sources on code.qt.io
Since 6.10, QDoc is capable of generating links to the declaration in
the source code for each documented C++ API entity in their `Detailed
description`.

Add the required configuration to enable this feature for modules in
qtgrpc.

Change-Id: I09020881035bde71470ccb8c77d7905321f56251
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2025-05-27 12:16:31 +00:00
Qt Submodule Update Bot eebbc89765 Update dependencies on 'dev' in qt/qtgrpc
Change-Id: I7f3b4b0f6de79ac1e508819b0d39dc2a9368a462
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-05-23 22:20:34 +00:00
Qt Submodule Update Bot a9b2f02b41 Update dependencies on 'dev' in qt/qtgrpc
Change-Id: Ifb64e1c9a2bc09a4f6186a65012dde9c74e21b35
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-05-21 09:42:36 +00:00
Alexey Edelev a445cf4344 Make the well-known type scheme lookup explicit in installed Qt
Instead of storing the build-time path to the well-known types
protobuf includes, calculate them when configuring user projects.

New approach expects that all well-known type schemas that the
ProtobufWellKnownTypes module used at build time are present when
configuring user projects. The include paths then calculated and
stored in the QT_PROTOBUF_INCLUDES property of the
ProtobufWellKnownTypes module.

The property usage remains unchanged.

Pick-to: 6.9 6.8
Fixes: QTBUG-130113
Change-Id: I31a607404f85f2a325c63e0f28d2ab2a0f4ea25f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-05-19 10:13:14 +01:00
Alexey Edelev 5494d64908 Make the types list of qt_internal_add_protobuf_wellknown_types named
Add the TYPES argument to the qt_internal_add_protobuf_wellknown_types
command instead of using ARGN. It's safer and more scalable approach.

Pick-to: 6.8 6.9
Change-Id: I75ac5df740b614433b74e8b70729211f49e0a308
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2025-05-19 10:13:11 +01:00
Alexey Edelev 18bb2ba5e1 Allow specifying extra protobuf include directories for protobuf modules
Iterate the _<Module>_proto_external_include_dir variable in
<Module>ProtobufProperties.cmake and add the existing paths to
the QT_PROTO_INCLUDES property. This allow specifying extra paths
in <Module>Config.cmake.

If the respecive paths are not found or are not absolute, the
respective warning is raised.
Setting QT_NO_WARN_PROTOBUF_BROKEN_INCLUDES to ON suppresses the
warning.

Pick-to: 6.8 6.9
Change-Id: I4b6971e84f35b2986d187fb5d1766ed0cf3390f5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-05-19 10:13:09 +01:00
Qt Submodule Update Bot cf750df488 Update dependencies on 'dev' in qt/qtgrpc
Change-Id: Ibf5f7750f2a7286c43da3123ad1ed000ffa334d4
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-05-18 11:06:17 +00:00
Dennis Oberst bfb44df850 Fix and improve benchmarks
The existing benchmarks were not optimal: bidirectional streaming wasn’t
fully asynchronous, limiting channel performance. Introduce a
`BenchmarkData` type to collect detailed metrics and print richer
results at the end. Also add latency measurements for unary READ and
WRITE operations.

As a drive-by add cxx20 checks in cmake.

Pick-to: 6.9 6.8
Change-Id: I56d61e4712b7fe9e5b8b52a14f84b0583094e373
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-05-16 14:42:19 +02:00
Dennis Oberst 66984e6a3c QGrpc{Channel,Call}Options: Support incremental updates via addMetadata
Currently we only provide `setMetadata(~)` as a way for users to
supply their metadata. However, certain code paths would benefit from
having an `add` functionality as well, without requiring the user to
create a temporary object.

[ChangeLog][GRPC][QGrpc*Options] Added support for incrementally adding
metadata via `addMetadata()`.

Change-Id: Ibc5d721850745df5f171b9126b595ca9c6b0c319
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-05-16 14:42:14 +02:00
Dennis Oberst 778371b8ea Deprecate QHash<QBA,QBA> metadata in favor of QMultiHash
Even though gRPC provides some leeway, as "Access to metadata is
language dependent", we have yet to see an implementation which doesn't
support multiple values per key.

Common implementations like grpc-c++, grpc-go or grpc-java provide this
and we should do it aswell.

Ref: https://grpc.io/docs/what-is-grpc/core-concepts/#metadata
Ref: https://github.com/grpc/grpc-go/blob/master/Documentation/grpc-metadata.md#constructing-metadata

Use a base class to implement common functionality for the options
classes. Also use a new common class in the tests.

The QMultiHash overload is selected when the 'QtGrpc::MultiValue'
argument is used in 'metadata' calls. We update the documentation
accordingly.

Deprecation is scheduled for Qt 6.13

Users with a custom Qt build - those who care - should be rewarded with
minimal traces of this "accident" and should not suffer from potential
performance/storage overhead. Therefore we deprecate QtGrpc::MultiValue
for those builds, effectively providing Qt 7 behavior.

[ChangeLog][Deprecation Notice]
Deprecate the metadata()/setMetadata() methods on QGrpcCallOptions and
QGrpcChannelOptions that use QHash in favor of the new overloads that
use QMultiHash. This is more in line with the gRPC specification.

Fixes: QTBUG-136471
Change-Id: I58d14d2c304c06de269c99ba5383beee86d12f77
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-05-16 14:42:11 +02:00
Qt Submodule Update Bot 9a1cc11111 Update dependencies on 'dev' in qt/qtgrpc
Change-Id: I50fd31e223bb75aa8294195faa62034cf9aa4bd6
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-05-13 16:09:16 +00:00
Qt Submodule Update Bot 9f74f49992 Update dependencies on 'dev' in qt/qtgrpc
Change-Id: Idb29fc5e62a4b51b2003c6bbd4317eda8d9de07f
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-05-08 15:24:38 +00:00
Qt Submodule Update Bot abbe99c0d0 Update dependencies on 'dev' in qt/qtgrpc
Change-Id: I4c32faf64cce6cbd50afec2c9bfd818e2b4b8e46
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-05-03 02:19:22 +00:00
Qt Submodule Update Bot 391e98f4ac Update dependencies on 'dev' in qt/qtgrpc
Change-Id: Ib62c1fb3607068b61d1bc8abe6dfe7b7c84938aa
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-05-01 08:58:10 +00:00
Qt Submodule Update Bot a9d4a09bef Update dependencies on 'dev' in qt/qtgrpc
Change-Id: I43aab9cff23ff466af8f3959380c7dba6e87fb40
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-04-29 11:44:05 +00:00
Dennis Oberst 6ffaa636c7 Grpc benchmarks: add qelapsedtimer include to shared header
It was missing for the grpc reference client. It's used in both clients
so simply add it to the shared header

Pick-to: 6.8 6.9
Change-Id: I568aa92f50c7b4c7a94d0226a7d4e4672863fac8
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-04-24 17:33:45 +02:00
Qt Submodule Update Bot 55fb00bbe1 Update dependencies on 'dev' in qt/qtgrpc
Change-Id: Ibcb7d5beaf48416ad7d7dc76904759df0b8fe49c
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-04-24 09:35:11 +00:00
Qt Submodule Update Bot 55a7035b66 Update dependencies on 'dev' in qt/qtgrpc
Change-Id: Ic89be0824af25e69b5ea3710c032989ad0473e33
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-04-22 14:05:18 +00:00
Qt Submodule Update Bot e2e856ed1c Update dependencies on 'dev' in qt/qtgrpc
Change-Id: Ibece72a39a2dc28ee4480d462c79890416d04d5b
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-04-15 11:31:18 +00:00
Dennis Oberst 3645862635 qtgrpc: mark security critical source files
Reviewed and marked all security critical files in the qtgrpc/src
directory.

More information: https://contribute.qt-project.org/quips/23

Fixes: QTBUG-135455
Change-Id: Iad313dfe4b5b168d56954e58ab30e0e411ab6de5
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-04-11 10:49:10 +02:00
Qt Submodule Update Bot 0951e2dd00 Update dependencies on 'dev' in qt/qtgrpc
Change-Id: Ie541feb0567ea6f1774397cf8955107029a7ce84
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-04-09 23:56:19 +00:00
Andreas Eliasson 094f5f54d5 Doc: Add missing \title to GRPC client guide example
Pick-to: 6.8 6.9
Change-Id: I8bf7f2e5b578b58f67816c02fd4c2b2f00aba798
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2025-04-08 07:51:39 +00:00
Alexey Edelev 08e170bec9 Require the 'scope' descriptor in produceProperyMap functions
The scope is mandatory there, since we read the containing class
name from it. Assert if the scope is nullptr.

Coverity-Id: 479426
Pick-to: 6.8 6.9
Change-Id: Iad3acba25083fde89b70b9c6dcacd4e2cafc3cae
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
2025-04-04 17:45:31 +02:00
Alexey Edelev cc5f89d5a4 Move assign the serialized buffer in QProtobufSerializerImpl::serializeMessageFieldEnd
Small optimization bits.

Coverity-Id: 479440
Pickt-to: 6.8 6.9
Change-Id: I302a98564e77eaf3810e7e85457fc768a26f4c18
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
2025-04-04 17:45:26 +02:00