Commit Graph

1477 Commits

Author SHA1 Message Date
Qt Submodule Update Bot 878c67dce3 Update dependencies on 'dev' in qt/qtgrpc
Change-Id: I9ccef3f593339a2612ba959bd5fa24faf3802268
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-03-29 16:10:18 +00:00
Qt Submodule Update Bot eda9ac0443 Update dependencies on 'dev' in qt/qtgrpc
Change-Id: I18908f560cad1cd8ca3848e098a521793463b0e2
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-03-19 17:33:54 +00:00
Alexey Edelev 514769d1bd Adapt the generator code to be compatible with protobuf >= 30
The newer protobuf version uses string_views as the return value.
Wrap the respecitive API with constructing std::string and update
some of the util functions to accept std::string_view arguments
but not plain std::string.

Fixes: QTBUG-134885
Pick-to: 6.8 6.9
Change-Id: I8bc06c46167a8b1bc0dca36242249e672ffcccd3
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2025-03-19 15:15:37 +01:00
Alexey Edelev 12cb9d24e7 Add the missing copyrights to QtProtobufProperties.cmake.in
Pick-to: 6.8 6.9
Change-Id: I4831e7f993a01aeb75af1fd96a3295e4cb42e7c7
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2025-03-19 13:12:30 +01:00
Alexey Edelev b8b8dd9fe2 Avoid storing absolute paths to protobuf module includes
Sanitize proto includes to ensure the generated
<Module>ProtobufProperties.cmake is fully relocatable.

Drive-by, ensure that includes do not contain duplicates.

Task-number: QTBUG-130113
Change-Id: I64f56d497d412705f174a027f711b90ad7614abf
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-03-19 11:35:45 +01:00
Alexey Edelev 53f2963d56 Avoid storing proto_files-NOTFOUND in _qt_internal_proto_files
Ensure we store values correct way.

Pick-to: 6.8 6.9
Change-Id: I89ec10e41969a001d34a73a0fdd77a661b7c9506
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-03-19 10:47:50 +01:00
Alexey Edelev 252c5467de Add the hint to find the host grpc_cpp_plugin when crosscompiling
gRPC doesn't provide the smart tool lookup when crosscompiling.
So gRPC lookup is unable to find the grpc_cpp_plugin plugin when
crosscompiling examples. Use find_program to find the plugin in
host paths.

Pick-to: 6.8 6.9
Fixes: QTBUG-134647
Change-Id: I961b180b348dee4f1b2f2523be225d3003847e4c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2025-03-18 18:08:13 +01:00
Alexey Edelev 428e3d07b9 Fix the cmdLineInvalidExportMacro
The test was faulty positive because of invalid command line.
The input file name was missing there, so protoc was failing to
generate code, but didn't test the actual invalid EXPORT_MACRO name.

Pick-to: 6.8 6.9
Change-Id: Ib57235fb22c740dc30aec58076833c8f6de4a250
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2025-03-18 15:30:10 +01:00
Lucie Gérard 2bc78bfb7d Update licensing of files with infrastructure type
A QUIP 18[1] update sets git files, REUSE.toml and licenseRule.json
as infrastructure type files. They are licensed with:
LicenseRef-Qt-Commercial OR BSD-3-Clause

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.9 6.8
Change-Id: Ib3bbda05a9b150dc9f7da564cd3bdc2691a749cc
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2025-03-13 15:14:53 +01:00
Dennis Oberst c0496671be qtgrpc_chat_server: Compile certificates into the application
The previous approach was error-prone, as using TARGET_FILE_DIR
hard-coded the path to the build directory and ignored install locations
entirely.

Fix this by using a more reliable approach: embedding the certificate
strings directly into the application.

Pick-to: 6.9 6.9.0 6.8 6.8.3
Change-Id: Ifb883891fd55bb023e7f9828f9c422ea3e5d1c3e
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-03-13 13:11:23 +01:00
Alexey Edelev 662dac4244 Fix the spamming with DATA/HEADER frames before the SETTINGS negotiation
Ensure that we received the connection SETTINGS from server before
sending the very first HEADER/DATA frame using the stream.

It's the expected flow for HTTP/2 communication, we are lucky that gRPC
servers accept us.

Drive-by change the way we handle the missing HTTP/2 connection. It's
the exceptional situation, when we failed to acquire the connection
using QHttp2Connection::createDirectConnection call, so make assertion
at this point.

Dive-by fix the "dead" Http2Handlers in m_activeHandlers, which were
eaten by "expired" pointer state(Users declined to keep QGrpcOperation
pointers alive).

Task-number: QTBUG-133254
Pick-to: 6.8 6.9 6.9.0
Change-Id: Icb19d12c54662a3b13e080da5cece5885fd767d9
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2025-03-12 11:00:57 +01:00
Alexey Edelev 33492a97a1 Add the missing include of q20utility.h
Ammends 56eee95a7c

Pick-to: 6.9 6.9.0 6.8
Change-Id: I35a4cd089a066b96d1f1ef4c10f0437092f9f4fb
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2025-03-10 09:25:58 +01:00
Matti Paaso 232a9b4021 Fix Axivion analysis configuration for protobuf
Library file name corrected and missing library added.

Task-number: QTQAINFRA-6969
Change-Id: Ibee0e0061e35ec7d14c38ad8a3a79994621428b4
Reviewed-by: Toni Saario <toni.saario@qt.io>
2025-03-10 08:47:43 +02:00
Alexey Edelev d8cfe543c4 Encourage to use vcpkg when building Vehicle example
Pick-to: 6.9
Task-number: QTBUG-132738
Change-Id: Ia154527e3dd337d8637deca0f04afecd23b02d2c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-03-07 11:11:06 +01:00
Alexey Edelev 019240aae0 Add vcpkg.json for the QtGRPC Vehicle example
Use the vcpkg manifest to configure and build QtGRPC the example.
This allows to automate the dependency installation using vcpkg.

Pick-to: 6.9
Task-number: QTBUG-132738
Change-Id: I7ba9d5a2c1186d1a70f3dc3a39117d86f2269271
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-03-07 11:11:02 +01:00
Alexey Edelev 30d983f27b Encourage to use vcpkg when building magic8ball example
Pick-to: 6.9
Task-number: QTBUG-132738
Change-Id: Ib13a5cfc82b64570a76ec9494d9bdb1a3b773695
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-03-07 11:10:58 +01:00
Alexey Edelev 413cc7c831 Add vcpkg.json for the QtGRPC chat example
Use the vcpkg manifest to configure and build QtGRPC chat example.
This allows automating the dependency installation using vcpkg.

Pick-to: 6.9
Task-number: QTBUG-132738
Change-Id: Iafcb8e144d51f1af0d775869550f003c997d106a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-03-07 11:10:54 +01:00
Alexey Edelev 0925534e6c Add vcpkg.json for the QtProtobuf sensors example
Use the vcpkg manifest to configure and build QtProtobuf sensors
example. This allows automating the dependency installation using
vcpkg.

Pick-to: 6.9
Task-number: QTBUG-132738
Change-Id: Icae7acf46d97d834a064d7663623757a7ec35742
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-03-07 11:10:50 +01:00
Alexey Edelev 9c03a6b0a7 Add vcpkg.json for the QtGRPC Magic 8 Ball example
Use the vcpkg manifest to configure and build QtGRPC Magic 8 Ball
example. This allows automating the dependency installation using
vcpkg.

Pick-to: 6.9
Task-number: QTBUG-132738
Change-Id: Idaf8ee948a0a304633e1fe9f63327391adec96d8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-03-07 11:10:47 +01:00
Alexey Edelev 39f2692655 Remove the explicit setting of the accept-encoding header
QHttp2 implementation will make this favor for us, in general the
header is not mandatory for communication with gRPC server, but can
be used by other members of the network communication. Anyway it's
not the level of the gRPC channel where the header should be defined.

Pick-to: 6.9.0 6.9 6.8 6.8.3
Change-Id: I73fe3c780bfa373a724255dd26accf37f8a8ff50
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2025-03-06 16:43:49 +01:00
Dennis Oberst 81bc13aec3 Docs: Add transportation info for QGrpcHttp2Channel (unix-abstract)
We should be clearer about what transportation is used and when.
Otherwise, our users are left in the dark.

Task-number: QTBUG-134273
Change-Id: Ice58e2cd496fad472761bdb9022f0fd3280c265c
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-03-06 16:43:49 +01:00
Dennis Oberst 2f970bc3c2 Docs: Add transportation info for QGrpcHttp2Channel
We should be clearer about what transportation is used and when.
Otherwise, our users are left in the dark.

Task-number: QTBUG-134273
Pick-to: 6.9 6.9.0 6.8 6.8.3
Change-Id: I6d1da9236447521a53b197808c55c89c49fbd4c2
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-03-06 16:43:49 +01:00
Dennis Oberst 6a9810ed7f QGrpcHttp2Channel: Add QLocalSocket abstract namespace support
QLocalSocket supports abstract namespaces. Grpc also supports it. Simply
make it available through the 'unix-abstract' scheme.

Ref: https://grpc.github.io/grpc/core/md_doc_naming.html
Ref: https://doc.qt.io/qt-6/qlocalsocket.html#SocketOption-enum

[ChangeLog][GRPC][QGrpcHttp2Channel] Added abstract namespace support
for QLocalSocket communication through the "unix-abstract" scheme.

Fixes: QTBUG-134273
Change-Id: Iea2b608478e00504d7cdbdff735fcbfb618529d7
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-03-06 16:43:49 +01:00
Dennis Oberst 65358c24f6 QGrpcHttp2Channel: Add user-agent header
The protocol does not require a user-agent, but it is recommended to
provide a structured user-agent string. This helps diagnose issues more
effectively in heterogeneous environments.

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

[ChangeLog][GRPC][QGrpcHttp2Channel] Added a structured user-agent
string to the request headers.

Task-number: QTBUG-133254
Change-Id: Ic312f2a3754108798bb7acc70e2d8bed4a891401
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-03-06 16:43:49 +01:00
Dennis Oberst 684e96caa3 QGrpcHttp2Channel: Use QByteArray directly for constructing headers
It doesn't make sense to use a view in this context. This would also be
more performant since it enables implicit sharing for the headers.

As a drive-by fix the Literals namespace usage to align what current
documentation says.

Pick-to: 6.9 6.9.0 6.8 6.8.3
Task-number: QTBUG-133254
Change-Id: I89be231de4b902d56d65d1729816681ce84ce90e
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-03-06 16:43:49 +01:00
Dennis Oberst 46238888f6 grpc benchmarks: miscellaneous improvements
* grpc async client now properly drains the completion queue upon
    finishing
  * server and clients now use the 'transport' option for setting up the
    communication. The server now supports multiple listening addresses.
  * Fix a "off by one" mismatch for the client RPC calls

Task-number: QTBUG-133254
Pick-to: 6.9 6.8
Change-Id: Iccbec72f77adb374f144c7cc1b9a8072fef00b5e
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-03-06 16:43:49 +01:00
Alexey Edelev 921212c1f7 Force the QAbstractSocket::LowDelayOption for Http2 channel
Reference gRPC channel does this, to disable the Nagle's algorithm
and reduce the latency for the small flow control frames like
WINDOW_UPDATE and PING.

TODO: We should probably allow to opt out this behavior using
QGrpcChannelOptions. See QTBUG-134428.

Task-number: QTBUG-134428
Task-number: QTBUG-133254
Pick-to: 6.8 6.8.3 6.9 6.9.0
Change-Id: I96efac97077c7e527198bae9ca00500629bd4800
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2025-03-06 16:43:49 +01:00
Rami Potinkara 56eee95a7c Fix Q_ASSERT comparison on x86 Android build
This patch fixes Q_ASSERT comparison between unsigned
integer and integer types on Android x86 build by using
C++20 compare function.

Fixes: QTBUG-134439
Pick-to: 6.9 6.9.0 6.8
Change-Id: I89e9a7384aad0fe908f4dd12680d3bf4770e6915
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-03-06 15:43:49 +00:00
Samuli Piippo 54837023ab qtgrpc chat example: don't deploy static lib
Remove deployment of the now static proto lib.

Amends 9437a1f2bd

Pick-to: 6.9
Change-Id: I5bdda6157842c665165ae9b14255778ce2ac0bc9
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2025-03-06 10:56:51 +02:00
Rami Potinkara dcc569f220 QGrpcHttp2Channel: Add HttpsScheme behind ssl config
This patch adds HttpsScheme variable definition behind
same ssl config where it is used in the source. This
fixes compile error on developer build for Android.

Fixes: QTBUG-134309
Pick-to: 6.9 6.9.0
Change-Id: I4d4425baa63f33724aff14b144339fb171e741d7
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2025-03-05 12:21:55 +00:00
Dennis Oberst 9437a1f2bd qtgrpc chat example: fix deployment
The deployment was incomplete. Fix it by:
 * Building the dependent qtgrpc_chat_client_proto library as
a static library
 * Add the server directory path for reading credentials universally

Amends: cb35d20adb.

Fixes: QTBUG-134266
Pick-to: 6.9.0 6.9 6.8.3 6.8
Change-Id: I0666c445fbce159436c5b084ffd77d4191e04213
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-03-05 07:58:29 +00:00
Topi Reinio fb72130351 Doc: Remove incorrect \fn comments
Remove \fn comments for QAbstractProtobufSerializer::(de)serializeObject().
These functions were dropped in 8ec55cb0cf.

Remove \fn for non-existent QProtobufRepeaterIterator constructor.

Remove unnecessary \fn commands from QAbstractProtobufSerializer, let QDoc
auto-tie the documentation instead.

Pick-to: 6.9 6.8
Task-number: QTBUG-134250
Change-Id: If49049a33a307a522b3275b114e879442432e4c4
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2025-03-04 10:56:22 +00:00
Qt Submodule Update Bot bcee79d647 Update dependencies on 'dev' in qt/qtgrpc
Change-Id: Id8c604d0c697514ac7bbd8f28c6679ae1566a546
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-02-28 08:32:27 +00:00
Lucie Gérard 914723699e Make module ready for source SBOM checking
This includes:
- turning VERIFY_SOURCE_SBOM ON
- adding rules to the licenseRule.json files
- correcting the licensing given via REUSE.toml files

A lot of files are skipped during the license test,
but all are present in the source SBOM.
This is why corrections are needed before turning the
source SBOM check on.

Task-number: QTBUG-131434
Pick-to: 6.9 6.8
Change-Id: I3a411c77c671d045b296cdacee1e90ec64307b6e
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-02-27 09:15:50 +01:00
Dennis Oberst 92520e45b8 QGrpcHttp2Channel: Prevent infinite error handling in error state
If the channel is in error state the socket could be non writable which
would result in an error loop if reconnections are steadily happening
since the logic would never reach m_reconnectFunction().

Add a safety check for the state to be Connected to protect against this
condition.

Pick-to: 6.9 6.8
Fixes: QTBUG-133937
Change-Id: Ie6c4858623ee8d7cc89a57d9bb14e4735fa64117
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2025-02-26 19:24:41 +01:00
Dennis Oberst 84f39aacaf QGrpcHttp2Channel: detect operations coming from within socket errors
Detect the situation where processOperation is called from within the
Q*Socket::errorOccurred, as it would be the case for immediate
reconnects.

The socket may not be ready for a immediate reconnect attempt and in
such a case the connectTo* function may return without signaling an
error. This would put the RPC in a dangling state, where its not able to
recover and no finished() signal will be emitted.

Solve this by adding a bool that we set during the
Q*Socket::errorOccurred and check during processOperation() calls and do
the asynchronous for our users. Print a warning to remind them about
this, as it's still preferred that users delay their reconnect attempts
on their own.

Ref: https://doc.qt.io/qt-6/qabstractsocket.html#errorOccurred

Pick-to: 6.9 6.8
Task-number: QTBUG-133937
Change-Id: Ic51f661ad576a24716f5790f5e6e2c96a19acbc4
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2025-02-26 19:24:30 +01:00
Paul Wicking 00f1f6c795 Add .gitreview file
`git-review` is a command line tool for interacting with Gerrit.
Some IDEs offer support for this tool, either natively or through
plugins. The tool relies on a configuration file, .gitreview. Adding
this configuration file to our repositories simplifies initial setup
for contributors that use the tool directly or through their IDE of
choice.

The configuration file adds a remote called 'gerrit'. This is the
default for the tool, and also the name set for
codereview.qt-project.org by Qt's `init-repository` script. Thus,
the configuration should work seamlessly alongside other repository
helpers.

As the file format doesn't seem to be designed with comments in mind,
add it to the other version control system exemptions in REUSE.toml.

Task-number: QTBUG-132604
Pick-to: 6.9 6.8
Change-Id: I5b3fd33b6c43d28c9268ad2cc3f43214d812d8c7
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2025-02-25 15:39:48 +01:00
Alexey Edelev 34293b9090 Point to 'protoc' installation guide when WrapProtoc is not found
Task-number: QTBUG-132738
Pick-to: 6.8 6.9
Change-Id: I166feb4697178c3a8969ce12dcfc6951f480fb9a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-02-25 11:10:11 +01:00
Alexey Edelev 5470136c6b Adjust the server time format with the client one in ClientGuide
Server and client request/responce time format differs, since
std::chrono::time_point::time_since_epoch() output contains
undeterminated units. Make the explicit conversion to milliseconds,
to align the time format between server and client.

Pick-to: 6.8 6.9
Change-Id: I5914221d3b3b8043721f4d97705ccb54c679be9c
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2025-02-25 11:08:51 +01:00
Dennis Oberst cb35d20adb Rewrite the qtgrpc chat example
The previous chat example was created many moons ago and much has
happened since then. These are the key improvements for the new qtchat:

- Server uses the Callback API
- Added support for Registering (stored in plain text on server side)
- Use long-lived bidirectional streaming for the ChatRoom method
- Any files can now be shared in any size with all chat users
- Use the Grpc client from a dedicated worker thread to have lag-free
  UIs
- Use the generated protobuf QML-library declaratively in the app
- stylistic improvements
- Use SSL for safe communication
- Automatic reconnections

This is an advanced example showcasing many features of this module.

Pick-to: 6.9 6.8
Fixes: QTBUG-121871
Fixes: QTBUG-122625
Change-Id: I71114375fe91ffb20a235859b6ab51f7b3ab07a3
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-02-24 10:41:22 +01:00
Dennis Oberst 5a9fdaf294 Docs: add QT_PROTO_INCLUDES note for ProtobufQt{Core,Gui}Types
This was missing before and is a crucial information.

Pick-to: 6.9 6.8
Change-Id: I16c99c4d6482a0b94a9a39af360638ec438873e6
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
2025-02-21 14:28:31 +01:00
Qt Submodule Update Bot 8a08574435 Update dependencies on 'dev' in qt/qtgrpc
Change-Id: I07d5c46797da0120c2fc9a346a049f3a1684a40d
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-02-20 09:27:32 +00:00
Alexey Edelev 35daea820d Add the missing linking of CorePrivate to GrpcQuick module
It worked previously since Qt::Quick->Qt::Qml linking propagated
it as private interface.

Change-Id: I2a28483e0baae728a6bbbf18df2c27a57230054a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-02-19 19:47:39 +01:00
Qt Submodule Update Bot bb7b227b11 Update dependencies on 'dev' in qt/qtgrpc
Change-Id: Idc6fe4663f987059f82da445379290fb5cef9db0
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2025-02-19 04:36:44 +00:00
Alexey Edelev 40f4791994 Fall back to the default scheme declarations
If user doesn't specify the scheme or uses the unsupported one
fall back to the default one for the selected communication method.

Pick-to: 6.8 6.9
Change-Id: Ibe33cda464d4ef161c69d4f16862e543603b943e
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2025-02-12 12:05:25 +01:00
Topi Reinio 430cbdc191 Doc: Fix incorrect QML property type
QDoc now warns about C++ types in QML property documentation.
This change fixes existing documentation to prevent warnings.

Pick-to: 6.8 6.9
Change-Id: I293360f775cb3fd3472f57c73bc8f066f15b9fce
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-02-07 16:04:46 +00:00
Alexey Edelev 82426debe4 Ensure that the :authority header contains properly encoded data
The :authority HTTP/2 header should contain the compatible ASCII
characters only. We should ensure that UTF-8 URIs are properly encoded.

Pick-to: 6.8 6.9
Change-Id: I2f18480e55ad86e32cfd190e198e73d14feba467
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2025-02-05 10:40:59 +00:00
Alexey Edelev ee3326e298 Use double lookup for protobuf/Protobuf packages
find_package with NAMES argument forces the CONFIG mode look up.
We accidentally looked for Protobuf uppercase in MODULE mode in
configure.cmake which allowed Protobuf targets be found for tests
and tools. Make this double lookup procedure explicit. All efforts
to support ubuntu/debian platforms, that decline to deliver protobuf
Config files.

Drive-by, use the correct variable to check that Protobuf is found
in golang grpc test server.

Pick-to: 6.9
Change-Id: I50d17aec72540a472bff30782d83e4555c51604a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-01-31 15:43:29 +01:00
Alexey Edelev 073429bfb1 Cache the :scheme HTTP/2 header
It's not mutable during QGrpcHttp2ChannelPrivate lifetime, so we
may cache it.

Pick-to: 6.8 6.9
Change-Id: I2b84a4ec46acfca488d00d527e180a6e3fc430f1
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2025-01-30 20:06:39 +01:00
Alexey Edelev 7d939f6e2e Change QGrpcHttp2ChannelPrivate::contentType return type
QByteArrayView doesn't have any pros comparing to the cref. But causes
the deep copy each time we create HTTP/2 headers.

Pick-to: 6.8 6.9
Change-Id: Iddb44912c2eafa555e9dd2a19eae503a34be535b
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2025-01-30 20:06:39 +01:00