Commit Graph

1597 Commits

Author SHA1 Message Date
Alexey Edelev e09bbcbeba Revert "Enable the use of VCPKG for qtgrpc"
This reverts commit b2e6f889c0.

Reason for revert: Missing vcpkg environment for tests

Change-Id: I8c03167e82ca4e2d617fd884eebfeff9c0b07aec
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-07-15 14:48:30 +00:00
Alexey Edelev ae42ac9b1b Work around missing protobuf::libprotoc include paths
In some reference libprotobuf/libprotoc installations the include
paths of the protobuf::libprotoc target are missing.

Force using protobuf::libprotobuf as the dependency for the
libprotoc compile test.

Change-Id: I56bb84910bc178063d42292f04d7e75c04e9ca4d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-07-15 15:28:16 +02:00
Lucie Gérard a9240736d1 Remove year from Qt Copyright in REUSE.toml
Change-Id: Id16e452045ce2bea9381a0609a7d6cd64f852d55
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2025-07-14 09:47:17 +02:00
Alexey Edelev cbab241c75 UnTP the CMake protobuf API
Remove the technical preview markers from CMake API. Leftovers
from TP phase.

Pick-to: 6.8 6.9 6.10
Change-Id: Ic1c363638f2848467845f41e3f20b97c5ed9bfb4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-07-10 16:10:27 +00:00
Alexey Edelev b2e6f889c0 Enable the use of VCPKG for qtgrpc
Change-Id: Ieecc545d074aedc77be420ef2784d83ef67a828a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-07-10 17:06:04 +02:00
Alexey Edelev 342694b2d3 Use common::iterateMessageFields in MessageDeclarationPrinter::printProperties
Deduplicate code.

Pick-to: 6.8 6.9 6.10
Change-Id: Ieb50b0e41787fb3988f85ca83024069d161c872a
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2025-07-09 11:25:36 +00:00
Qt Submodule Update Bot 0aea589f93 Update dependencies on 'dev' in qt/qtgrpc
Change-Id: Ic1187113e0b7277dd0e722ef768315b09eabd192
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-07-07 10:37:00 +00:00
Marc Mutz 944aa03dea 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.10 6.9 6.8
Change-Id: I114f58d1d443164eb419dab98623d06044419a81
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-07-04 11:38:52 +02:00
Dennis Oberst e81b5d59ad 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.10 6.9 6.8
Change-Id: I4eb7f6fbc1474508af2a88a3313cf94325a63657
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-07-03 19:45:55 +02:00
Qt Submodule Update Bot 6a78b34045 Update dependencies on 'dev' in qt/qtgrpc
Change-Id: Iffb0f2321421e84cb391974fcc40ec811de16c37
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-07-03 15:33:51 +00:00
Alexei Cazacov 837145416f 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.10 6.9
Change-Id: I7d0491684af8c651cafb988acfac311f148a71b6
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2025-07-03 15:40:08 +03:00
Kai Köhne 64ac47ae96 Doc: Fix rendering of \gRPC macro
The \c prevents the macro to resolve. Anyhow, \c should be used only
for command tools etc, not for generic product names. Just drop it.

Fixes: QTBUG-138179
Change-Id: Id5f10242ff0218fb6bc3cc4771fab722bdbc07e2
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-07-03 08:28:29 +02:00
Qt Submodule Update Bot 0c2a6067a5 Update dependencies on 'dev' in qt/qtgrpc
Change-Id: Ie8df79d1a702876b040097bae350fb16bb92f610
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-07-01 22:39:11 +00:00
Dennis Oberst 7bac7883b7 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.10 6.9 6.8
Change-Id: I9416de25169fbaaa1657db7120987754699e4c00
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2025-07-01 15:32:42 +02:00
Qt Submodule Update Bot 6a4ef54cb7 Update dependencies on 'dev' in qt/qtgrpc
Change-Id: I796243e6ea6e3105723c4e4c1395eaa915a8670e
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-06-30 14:25:44 +00:00
Qt Submodule Update Bot 3558be9ae4 Update dependencies on 'dev' in qt/qtgrpc
Change-Id: I84b0d41b3dc279d33207905c61f6d3f0b067d18e
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-06-27 15:42:18 +00:00
Qt Submodule Update Bot dd178056d8 Update dependencies on 'dev' in qt/qtgrpc
Change-Id: I49e80bfae283cc9164435f57faac67e79e15b09f
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-06-25 21:08:31 +00:00
Cristian Le 8974c1c558 Use `_qt_internal_set_source_file_generated`
Migrate implementations that set `GENERATED` source property

Task-number: QTBUG-125077
Pick-to: 6.9 6.10
Change-Id: Idb0b7e5fe5efe9996ba3a8a097f3da746b131bac
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-06-24 11:44:57 +02:00
Dennis Oberst be37926280 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

Pick-to: 6.10
Task-number: QTBUG-135456
Change-Id: I1328431d24aa330a40e95824fdcdbb34e6cf53cd
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-06-20 15:34:32 +02:00
Dennis Oberst 9e9196380c 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
Pick-to: 6.10
Change-Id: I9cc05039ca5830d04816ada978ec193ece154732
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-06-20 15:34:28 +02:00
Dennis Oberst 6670aafd85 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.

Pick-to: 6.10
Change-Id: I78bc123cf4db034ce12f62a5a4576c8e0d0d64f3
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-06-20 15:34:25 +02:00
Qt Submodule Update Bot 74bf4bb33e Update dependencies on 'dev' in qt/qtgrpc
Change-Id: I7ac30f83b3d46d1a7c005aeaa71d5546a1cd0bd6
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-06-18 02:32:33 +00:00
Dennis Oberst 390e1b9a06 docs: Add internal documentation for QGrpcCommonOptions
... to avoid qdoc warnings about it being undocumented.

Pick-to: 6.10
Change-Id: Ic092c26d7e43dd9a51646cc6edf6f418bc8857ec
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-06-17 12:28:02 +02:00
Alexey Edelev deea825f7a 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.

Pick-to: 6.10
Change-Id: Id75cb7e06a54139116595c60ec09f3810313f26b
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2025-06-16 17:33:41 +02:00
Jani Heikkinen 3f24083f35 Bump version to 6.11.0
Change-Id: I3cea5becbfdf4d3583136189b56949288b2ff44c
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-06-14 08:02:18 +01:00
Qt Submodule Update Bot 169b99deed Update dependencies on 'dev' in qt/qtgrpc
Change-Id: Ic146f60002fdeb7fe00919f2a35038e9ab07ed13
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-06-14 07:02:17 +00:00
Alexey Edelev 9e4b2ec356 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.8 6.9 6.10
Change-Id: I1e907e7be26048174899855efc6a9ed661a1e4d0
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
2025-06-12 14:48:26 +02:00
Alexandru Croitor bd86e2f91b 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.5 6.8 6.9 6.10
Fixes: QTBUG-137264
Task-number: QTBUG-129602
Change-Id: Ied50c009c8208ab576e5432586c99cb0e8ba84b4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2025-06-04 14:03:57 +02: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