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>
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>
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>
It will add the 'tm' logo to the first occurrence in the document. We
still add it to any mention of it since this will protect against
copy-paste issues when borrowing chunks of the documentation.
Task-number: QTBUG-125406
Pick-to: 6.9 6.8
Change-Id: I099633bcda78a1940c65c379328539190833d6f9
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This will work around the issue in debian-like platforms, where
relatively new protobuf doesn't deliver the proper config files.
The lookup still prefers looking for the config files, but not
the deprecated CMake module.
Change-Id: Ie1d5217e9023022976dd058be9dd7fd1ce37e39f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This is the idiomatic way of providing documentation files for our
examples.
Task-number: QTBUG-129571
Pick-to: 6.8
Change-Id: I3fda6a56d6de0d7378d2339bb8ca3930f06dd6ae
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
These modules are not relevant anymore. After porting Qt::Grpc
relied on native gRPC implementation. But since we migrated to the
fully functional Qt HTTP/2 the need of reference gRPC and protobuf
gone.
Remove the WrapgRPC and WrapProtobuf modules, use the protobuf
gRPC modules directly in tests examples and tools. Since non of
those never add the build-time depdendcy on reference libraries,
we don't need to add the respective dependencies in Qt packages.
The only thing we still wrap is protoc. We either look for executable
but we never propagate it as the reference target, but utilize the
path from there.
Fixes: QTBUG-128809
Change-Id: Id5008f8dd935288cbaa8a9abb88d485824099d46
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
gRPC in examples using the reference grpc++, which depends on abseil.
There is known upstream issue that abseil passes the MSVC only linker
flag that blocks the example compilation with MinGW compiler. The
problem meanwhile is bigger than that, since abseil simply don't have
a proper MinGW support, so we should warn users, that we do not
officially support MinGW in the examples that use the reference gRPC
server implementation.
Pick-to: 6.8 6.7
Fixes: QTBUG-128174
Change-Id: I319c54b5df02dac0be1dee441ec324f54f05ad93
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Otherwise the example fails to configure when building as as an
external project in CI, with the errors:
CMake Error at Qt6ProtobufTools/Qt6ProtobufToolsMacros.cmake:605
(target_link_libraries):
Target "magic8ball_plugin" links to: Qt6::ProtobufQuick but the target
was not found.
Pick-to: 6.8
Change-Id: Iab3a8c6162f885efd149374a73f8599c1f375aed
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
- GrpcChannelOptions doesn't have host property anymore.
- There is a hostUri property in GrpcHttp2Channel {},
that should be used.
- The documentation part for magic8ball is updated accordingly.
Amends 2625537aee
Pick-to: 6.8
Change-Id: I23c35835838e468cf057beddccf2a32590e00e69
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
According to QUIP-18 [1], all example files should be
LicenseRef-Qt-Commercial OR BSD-3-Clause
[1]: https://contribute.qt-project.org/quips/18
Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: If6b8c8eb88c8880e6e277f472dfdd5b380a5c83d
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
A couple of things are needed to ensure examples can be built as
external projects.
Change FindWrapgRPCPlugin to look for a cache var in addition to _ROOT
env var, because we can't easily pass env vars to external projects.
Ensure one of the non-Qt test libraries is built with at least C++17
to avoid compilation errors.
Derive a path to absl_ROOT from gRPC_ROOT assuming they are in the
same parent directory.
Use the new QT_EXAMPLE_CMAKE_VARS_TO_PASS variable introduced in
qtbase to allow passing additional cmake variables to all examples
that are built as external projects.
We need to use it for all 3rd party dependencies that have to be
found by the examples.
Make sure to look for GrpcTools package for magic8ball example, to
ensure the public api is available when cross-compiling, but there
is no target native grpc library available.
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: I4420b7348c6a3b02b5516f34a96b19cceaccc649
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Shorten the URI to follow the naming rule common for Qt QML Modules.
[ChangeLog][GRPC][QML] The QML URI of the QtGrpcQuick module is changed
to QtGrpc. All occurrences of module imports should be changed to
'import QtGrpc'.
Change-Id: I6039fc81e2c47838937729b1524f6112a165ca3a
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Needed when building examples as ExternalProjects, otherwise CMake
complains about not finding the GrpcQuick target.
Amends 3b74fdff66
Change-Id: Ia071884ca3909cf0e76828c490ae923eb7568cb8
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Update magic8ball example using enabled QtGrpc API in QMl.
Task-number: QTBUG-114893
Change-Id: I055d20354d8260480af1b8b0d741077734117e75
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Use the new classes to store call and channel options used to
create gRPC channels and perform gRPC calls.
Add QGrpcCallOptions parameter to call() and startStream() methods.
Change constructor parameter of QGrpcHttp2Channel and QGrpcChannel
to QGrpcChannelOptions that stores previous parameters used to
construct channel. Add additional deadline option to be able to
configure call timeout.
[ChangeLog] Add QGrpcCallOptions to store and process additional
call options.
[ChangeLog] Add QGrpcChannelOptions to store and process channel
options and default call options.
Task-number: QTBUG-111037
Change-Id: Icd92e95c036fb5b4c268907ab912fcf59ef9a69a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Replace the AUTORESOURCE_PREFIX argument with the explicit
RESOURCE_PREFIX.
Pick-to: 6.5
Change-Id: Iac73ba194ed1af07456dde7df9cd95fa55e5e024
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
This reverts commit 272957831e.
Reason for revert: This can be re-enabled since we enabled PIC/PIE in provisioning.
Change-Id: I181ab2b258c0751f8379877584dac03772601240
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
If libprotobuf is not built with -fPIE enabled we cannot link it
to qtprotobufgen. Disable the flag until provisioning got the proper
update.
Do the same trick for all executables and libraries that are linked
to the libgrpc* or libproto* libraries.
TODO: Re-enable PIE once QTBUG-111485 is fixed.
Task-number: QTBUG-111485
Pick-to: 6.5
Change-Id: I8735069c0c0ab61ec5b118ee5c261f77627e3f8c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
libprotobuf is linked implicitly by libgrpc++. WrapgRPC_INCLUDE_PATH
doesn't have any effect, but pollutes the compiler include paths.
This fixes the standalone build of the example.
Pick-to: 6.5
Change-Id: Idaba45eb3232d379c61477d1cb62605692f49414
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>