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.
Task-number: QTBUG-134250
Change-Id: If49049a33a307a522b3275b114e879442432e4c4
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit fb72130351)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 3ae4616baa)
Reviewed-by: Antti Kokko <antti.kokko@qt.io>
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.
Change-Id: Ifb883891fd55bb023e7f9828f9c422ea3e5d1c3e
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit c0496671be)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 695ebda007)
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: I6d1da9236447521a53b197808c55c89c49fbd4c2
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 2f970bc3c2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 1c49d882b8)
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
Change-Id: I96efac97077c7e527198bae9ca00500629bd4800
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
(cherry picked from commit 921212c1f7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 3d5eaa101d)
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
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.
Task-number: QTBUG-133254
Change-Id: I89be231de4b902d56d65d1729816681ce84ce90e
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 684e96caa3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 473b9f22f9)
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
Change-Id: I89e9a7384aad0fe908f4dd12680d3bf4770e6915
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 56eee95a7c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit eb60c36657)
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
Change-Id: I4d4425baa63f33724aff14b144339fb171e741d7
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
(cherry picked from commit dcc569f220)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit e52b13fe7d)
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
Change-Id: I0666c445fbce159436c5b084ffd77d4191e04213
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 9437a1f2bd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit d77dc3d147)
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.8
Change-Id: I3a411c77c671d045b296cdacee1e90ec64307b6e
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 914723699e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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.8
Fixes: QTBUG-133937
Change-Id: Ie6c4858623ee8d7cc89a57d9bb14e4735fa64117
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 92520e45b8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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.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>
(cherry picked from commit 84f39aacaf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
`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.8
Change-Id: I5b3fd33b6c43d28c9268ad2cc3f43214d812d8c7
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
(cherry picked from commit 00f1f6c795)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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
Change-Id: I5914221d3b3b8043721f4d97705ccb54c679be9c
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
(cherry picked from commit 5470136c6b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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.8
Fixes: QTBUG-121871
Fixes: QTBUG-122625
Change-Id: I71114375fe91ffb20a235859b6ab51f7b3ab07a3
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit cb35d20adb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This was missing before and is a crucial information.
Pick-to: 6.8
Change-Id: I16c99c4d6482a0b94a9a39af360638ec438873e6
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
(cherry picked from commit 5a9fdaf294)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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
Change-Id: Ibe33cda464d4ef161c69d4f16862e543603b943e
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 40f4791994)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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
Change-Id: I2f18480e55ad86e32cfd190e198e73d14feba467
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
(cherry picked from commit 82426debe4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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.
Change-Id: I50d17aec72540a472bff30782d83e4555c51604a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit ee3326e298)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It's not mutable during QGrpcHttp2ChannelPrivate lifetime, so we
may cache it.
Pick-to: 6.8
Change-Id: I2b84a4ec46acfca488d00d527e180a6e3fc430f1
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 073429bfb1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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
Change-Id: Iddb44912c2eafa555e9dd2a19eae503a34be535b
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 7d939f6e2e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
As it's defined as [[nodiscard]].
Pick-to: 6.8
Change-Id: I849922ed7bd64a4f67e6da0e11b1d6b4ad38deb7
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
(cherry picked from commit dfc3306e1a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
According to RFC :authority header should include host name and
port if it's not the default one. In current implementation we
ignore this requirement, which is incorrect. Also we cannot use
QUrl::authority, since RFC explicitly states:
The authority MUST NOT include the deprecated userinfo
subcomponent for http or https schemed URIs.
https://www.rfc-editor.org/rfc/rfc7540.html#section-8.1.2.3
Pick-to: 6.8
Change-Id: I69428f7c013a44a47f36443a82819233e4cb852e
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
(cherry picked from commit 8bcd951804)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It's not necessary that the server executable is located and named
always the same. We may try to hijack this using various CMake
OUTPUT tricks, but it's easier to utilize the actual file path in
the client executable using definition.
Amends dedd3edd3f
Pick-to: 6.8
Task-number: QTBUG-125406
Change-Id: Ice60e22caa6c5c14024f57fe133f2268ad96f574
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
(cherry picked from commit c3ee8ef3a6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends 00a86d9d2c.
qprotobufwellknowntypesjsonserializers.cpp:37:69: error: incomplete type
‘QTimeZone’ used in nested name specifier
Pick-to: 6.8
Change-Id: Ie6dbe21b4790239c8379fffdb5ccf0743f7f3e00
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit f0effd46c2)
We should aim to have the attributions as close as possible to the
actual sources. The old 'combined' attribution also did mix up the
in-source copy of some protobuf files, compared to the dependency
that is provided by provisioning.
This also fixes an issue in our documentation infrastructure, where
we remove tests/ directory before building the Qt Framework
attributions. This generated a warning so far:
File ./qtgrpc/qt_attribution.json: Directory '/home/vagrant/qt-everywhere-src-6.8.1/qtgrpc/tests/auto/protobuf/conformance/data' does not exist.
Pick-to: 6.8
Change-Id: I26c8483737ab6a6e863b3ee4a683c77cb9af5c0a
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit a379d0c185)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If preparsing of the .proto schemes doesn't detect the definitions
that can be processed by our generators, make the early return
from qt6_add_<protobuf|grpc> with the respective warning message.
We require that provided .proto files contain either message/enum
for protobuf generator or services for the grpc generator.
The warning can be suppressed by setting the
QT_SKIP_PROTOBUF_MISSING_DEFINITIONS_WARNING variable to TRUE.
[ChangeLog][CMake] The qt6_add_protobuf and qt6_add_grpc functions
do not generate CMake targets if provided in PROTO_FILES argument
protobuf schemes do not contain the corresponding for the generator
definitions. qtprotobufgen requires messages or enums, qtgrpcgen
requires services. Functions now make early return and warn about the
missing definitions. Previosly the functions generated unclear
FATAL_ERROR. The QT_SKIP_PROTOBUF_MISSING_DEFINITIONS_WARNING CMake
variable suppresses the warning.
Pick-to: 6.8
Fixes: QTBUG-132848
Change-Id: I620c2b5bab719a61510c5cbc2ae8224e3df70fcf
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 77fd311761)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The Null value is acceptable value for JSON fields. We should
use QJson::Type::Undefined as the default value when we want
invalidate the QJsonValue or point to its emptiness.
Pick-to: 6.8
Change-Id: Id590013aeafe9cce26aec873ddabb66ad3f6542c
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
(cherry picked from commit 7a813b0bd2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use shorter protobuf registration file name.
Rename '_protobuftyperegistrations' suffix to '_qtprotoreg'. It helps
to bypass windows long path issues.
Pick-to: 6.8
Change-Id: Ide40ad2942135c08a06097269ef2f2a4718b1e09
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
(cherry picked from commit b8651f1b87)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Shorten the name of the internal protobuf registration targets, so
it help to bypass the wellknown windows long paths issue.
Rename the target suffix from '_protobuf_registration' to
'_qtprotoreg'.
Pick-to: 6.8
Change-Id: I138265f51fb4c02e3199c7b1cd11794a65868053
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
(cherry picked from commit ff65131190)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Consider that some well-known repeated types should be encoded as
atomic JSON types in array too.
Task-number: QTBUG-120214
Pick-to: 6.8
Change-Id: I57d98bb8584183f98882db64ab5612315887397d
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
(cherry picked from commit c7b78a5cbd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Consider that well-known repeated Value types may be encoded as
atomic JSON types in array too.
Task-number: QTBUG-120214
Pick-to: 6.8
Change-Id: I9fa332571728089788ed5acc5f0b62fc9ec6f306
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
(cherry picked from commit c289974e2c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add the support for the optional deserializers of the well-known
Value types.
Generalize the approach so Timestamp, Duration, and BoolValue have
the common implementation.
Task-number: QTBUG-120214
Pick-to: 6.8
Change-Id: I0e835e6f0be3e45b525b310e2fb38dfec60911f3
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
(cherry picked from commit 79919ad77b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Validate the integer values that are packed to string when
deserializing numbers from JSON.
Task-number: QTBUG-120214
Pick-to: 6.8
Change-Id: I6324caa0e3c75cb96c89a523db478229d59958fe
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
(cherry picked from commit 148145a1a3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>