Commit Graph

51 Commits

Author SHA1 Message Date
Alexandru Croitor 9968b84cf7 CMake: Make grpc chat example build as external project with qemu CI
Make sure to look for the ProtobufTools and GrpcTools packages
explicitly, for the grpc 'chat' example, to ensure the public
CMake API is available when the example is built as an external
project.

The Tools packages are not looked up automatically because the target
sysroot is missing protobuf tools dependencies, and thus we never
record a dependency from the target library packages to the tools
packages.

Augments 68b2e1db08
Adapts to 63b9cc81df

Pick-to: 6.8
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Task-number: QTBUG-110849
Change-Id: I036a37e0fb9c81de325a33ab6ae7322d14ae0cbc
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-08-19 21:50:15 +02:00
Dennis Oberst 14984ad3a7 QGrpcHttp2Channel: update IWYU and favor fwd declarations
The header includes were not up-to-date.

Task-number: QTBUG-123625
Pick-to: 6.8
Change-Id: Id2a3d21925a0bf2ec6c8dfcb44617db3a8d5059c
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-08-06 09:05:44 +02:00
Alexey Edelev f5ab28f909 Properly guard the gRPC examples
All examples now depend on ProtobufQuick module. Guard them properly.

Fixes: QTBUG-126126
Pick-to: 6.8
Change-Id: I49d631558da70b0d531c3b0c1e56b1d2d7890b8c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-08-01 12:47:25 +02:00
Dennis Oberst f30945b7f5 QGrpcMetadata: use QHash instead of std::unordered_multimap <QBA, QBA>
There is likely already an instantiation available for it. Prefer the
usage of QHash to stay within the (Qt) lib boundary.

Remove qgrpcdefs.h as it's now obsolete. Update all occurrences of
QGrpcMetadata.

Task-number: QTBUG-123625
Pick-to: 6.8
Change-Id: Ida7bcd851c2d4b247c1b7a8dccddc3d518e0b5ae
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-07-29 09:21:18 +02:00
Dennis Oberst 5479292128 QGrpcStatus: drag 'StatusCode' enum into the qtgrpc namespace
This will make it easier to re-use it. This enum has a high chance of
being reused in the future.

Task-number: QTBUG-123625
Pick-to: 6.8
Change-Id: I587a2ae41e85b03539bc6213f53851ac37a415df
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-07-29 09:20:30 +02:00
Alexandru Croitor 5edd77f14b CMake: Add explicit lookup of ProtobufQuick package for magic8ball
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>
2024-07-15 13:11:12 +02:00
Tatiana Borisova fe51e73865 Fix magic8ball QML example
- 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>
2024-06-12 16:01:33 +02:00
Alexey Edelev ec8a3fec71 Remove errorOccurred interface signal from grpc operations
The signal is the redundant attempt to make Qt-style primitives. It
increases the usage complexity without any visible advantages. The
finished signal should instead accept the QGrpcStatus code and allow
users to make the descisions about the success of the operation in a
single call stack.

[ChangeLog][GRPC] The QGrpcOperation::errorOccurred and
QGrpcChannelOperation::errorOccurred signals are removed.

[ChangeLog][GRPC] The QGrpcOperation::finished and
QGrpcChannelOperation::finished signals now have QGrpcStatus argument
that indicates the status received from the server-side for the
operation.

Task-number: QTBUG-123625
Change-Id: I87669e0921c41cef0ff9d408bed1b057ba5198f2
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-05-30 12:37:19 +02:00
Alexey Edelev 2625537aee Move host URI option to QGrpcHttp2Channel
The host URI is not an optional property of the QGrpcHttp2Channel and
has not relations to QGrpcChannelOptions. We should move it to the
QGrpcHttp2Channel and use it there directly instead of making the
assumption that any channel should be created using the host URI. This
also removes the requirement of having the options as mandatory
argument to construct the gRPC channels.

Task-number: QTBUG-123625
Change-Id: I6cd64bad6c379f8875dcd6794a95bf68b46da605
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-05-29 16:27:43 +02:00
Dennis Oberst 584a971d35 QGrpc{Channel, Call}Options: prefer 'set~()' over 'with~()'
It was concluded that we will use the 'set~()' syntax in our options but
still return a reference to allow chaining.

Task-number: QTBUG-123625
Change-Id: I00838465b485d096b4b7bd3d691d24385543d662
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-05-28 10:54:19 +02:00
Alexey Edelev d69bc69750 Remove the 'stream' prefix from all streaming methods
There are no particular reasons for these prefixes. Remove them.

[ChangeLog][GRPC] The 'stream' prefix is removed for all generated
streaming methods.

Task-number: QTBUG-123625
Change-Id: Ie1e63a6c559e259956aa3b4b72aa3ef380df4f44
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-05-15 11:51:01 +02:00
Alexey Edelev fb9158fb9d Add the missing linking of protobuf backing QML library to magic8ball
Fixes the missing QML import in macOS.

Fixes: QTBUG-124917
Pick-to: 6.7
Change-Id: I8cdafa4d8e49e5a674555a95f1924f3d0415e915
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-05-03 15:09:20 +02:00
Dennis Oberst 57b875c33b QGrpcOperation: handle failed deserialization directly
Originally motivated by Axivion(SV3), which nagged about the const
errorOccurred signal; this patch removes signal emission for failed
deserialization in the read() functions. Immediately handling this can
lead to better user code as an fallback mechanism can avoid further
execution of unneeded logic.

This patch makes the errorOcurred signal non-const and changes the
signature of the read methods to either return an optional or bool to
signal failure immediately.

Users can then retrieve the error through 'deserializationError()' or
'deserializationErrorString()'. This can be seen in the generated QML
integration code, which uses those to still emit the 'errorOcurred'
signal on deserialization failure.

Change-Id: Ie6761753145536a42d5dd5bf1eac18afa555581a
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-04-18 11:14:09 +02:00
Lucie Gérard 4b21c9ef0d Correct license for example files
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>
2024-03-15 14:28:25 +01:00
Samuli Piippo 1c985e5bfe CMake: install vehiclelib example library
Amend 84f941cec0 and install vehiclelib
as well.

Change-Id: Ia301101601a0e7f52f94c3fde2ae329080e0c6ae
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-03-11 10:59:55 +02:00
Alexandru Croitor 68b2e1db08 CMake: Make examples build as external projects
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>
2024-03-06 17:14:45 +01:00
Tatiana Borisova 84f941cec0 Multi-thread clients usage example
Since the Qt gRPC module does not ensure thread safety at the channel
level, we can include an example demonstrating multiple
QAbstractGrpcClients can communicate asynchronously.

Task-number: QTBUG-117370
Change-Id: I829a9000b405b2d2832cba496b21ec0082273ee2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-03-04 08:47:44 +01:00
Alexey Edelev b9519412ae Move all registration functionality to a separate unit
Move functionality related to the registration of the protobuf messages
to a separate header/source files.

Task-number: QTBUG-120931
Change-Id: I6076b41139d43982148e46f5f315808509c4db65
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
2024-01-26 20:51:01 +01:00
Tatiana Borisova 28323b583b Fix magic8ball example
- qtgrpcgen uses different naming rules for Grpc Clients now

Pick-to: 6.7
Change-Id: I54974e8143331c71b490a1c6df2d07aefc52d0a9
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-01-25 20:02:32 +01:00
Tatiana Borisova e17d28e0d0 qRegisterProtobufTypes() should be called for applications implicitly
- Delete manual qRegisterProtobufTypes() call in QML auto-tests
- Add auto-generation line into qtprotobufgen
*_protobuftyperegistrations.cpp file. Now registration is happening via
static variable.

Pick-to: 6.7 6.6
Task-number: QTBUG-117643
Change-Id: Ic9c7e299fd2cd157ff4f2705d34bc4606a83ddbe
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-01-24 11:40:14 +01:00
Alexey Edelev 11bd27f1a6 Adjust the licensing across the repo
Pick-to: 6.7 6.6
Fixes: QTBUG-117783
Change-Id: I85d73a876f911383b31821ba6f7de2a07dcc9f3c
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
2024-01-12 09:54:57 +01:00
Tatiana Borisova 34bd21d7d5 Add minimum_required version into MagicServerRunner CMake-project file
- also add Copyright into magic8ball example

Pick-to: 6.6 6.7
Change-Id: I0a2c9aa10b197fe225fbeccf27ddc650b805c518
Reviewed-by: 🌴 Alexey Edelev 🌴 <alexey.edelev@qt.io>
2023-12-14 16:32:19 +01:00
Alexey Edelev 5dfa8a431f Add the network error handling to the chat example
Make the error from the gRPC channel visible to user.

Pick-to: 6.6
Change-Id: I0c41228612beb5c1c665f79f60d14c607f5739f8
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
2023-11-17 13:44:07 +00:00
Alexey Edelev ef916940f7 Rename QML URI of the QtGrpcQuick module
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>
2023-11-14 16:14:49 +01:00
Alexey Edelev 1cfd2d8e16 Add upper level project definition for gRPC chat example
Fixes the warning when building server and client at once.

Task-number: QTBUG-118180
Pick-to: 6.6 6.5
Change-Id: Idb52857d9d858edbecc029f3199f20fce86f40a9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-11-01 09:59:28 +01:00
Tatiana Borisova cff4e95f6a GRPC Chat example fails to build for QNX
- Platforms with QT_NO_CLIPBOARD should skip GRPC Chat example

Fixes: QTBUG-118321
Change-Id: Ia5f4c67867633460a73a3cdeb935f2e4ab4d9877
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
2023-10-26 14:57:40 +02:00
Alexey Edelev f3aa84d05b Rename QGrpcStream to QGrpcServerStream
Rename QGrpcStream and all related functionality to QGrpcServerStream
and corresponding names. The stream only implements server-side
streaming, and should be named accordingly.

Task-number: QTBUG-105494
Change-Id: I6b94452a447609186b1aa68ff8795293eef9dc28
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
2023-08-28 13:36:38 +02:00
Tatiana Borisova 06ea668e0b Provide QtGrpcQuick plugin documentation
- Update qt grpc tool with QML key description
- Document QGrpcMetadata typealias
- Update Chat example links to QGrpcMetadata

Task-number: QTBUG-115923
Change-Id: Id71cba0add3f36d1cbb6fd2c202fc9b1d3c888cc
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-08-26 16:22:36 +02:00
Tatiana Borisova a8e8078f91 Fix source code references in grpc examples
Fixes: QTBUG-116258
Change-Id: I80c90ac0d8b3047fd8df5dc82af3cd391dc5c654
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-08-23 16:12:24 +00:00
Alexey Edelev 36a64710a9 Format the .proto files according to the clang-format rules
Pick-to: 6.6 6.5
Change-Id: Iedc563ab8689779960dc6a2cc0b5817a874374e0
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
2023-08-23 10:02:50 +02:00
Alexey Edelev b089a773e9 Move enums to the nested namespace out of class
Protobuf allows the following construction:
  message A {
      enum AEnum {
        AVal0 = 0;
      }
      B.BEnum val = 1;
  }
  message B {
      enum BEnum {
          BVal0 = 0;
      }
      A.AEnum val = 1;
  }

This requires forward declaration of nested enums, that is not possible
in C++. To solve this problem we may do the same trick that we do
for nested messages already.
This patch moves the nested enum type out of class to the
_QtProtobufNested namespace. The solution require the enum name
specification when using enums from this moment, since the owning
messages only contain type aliases now. So from example above to access
the AVal0 you need to use the full qualifier:
  A::AEnum::AVal0

The new generated code structure registrates Qml types using the built-in
macros, that unlocks direct linking of backing library without the need
of Qml plugin usage.

[ChangeLog][Protobuf] Nested enums moved out of message classes to the
nested namespace, same as the nested messages.

[ChangeLog][Protobuf][Qml] The geneated protobuf Qml modules do not
require the use of Qml plugins.

Fixes: QTBUG-115800
Change-Id: Ia67fcbecf492c3fd41350eada4d62fc9e5ea4dab
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-08-18 19:01:25 +02:00
Dennis Oberst 5f75a40f92 chat example: fix unused string usage in server
We try to print this string but it is never assigned. Lets show
the users who registered.

Pick-to: 6.6 6.5
Change-Id: I0e384a2591aae0e39c567b1ccab694bdeddee920
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-08-09 15:58:01 +00:00
Alexandru Croitor 98c145e001 CMake: Look for GrpcQuick package for the magic8ball example
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>
2023-08-03 18:24:42 +02:00
Tatiana Borisova 3b74fdff66 magic8ball example: extend QML support
Update magic8ball example using enabled QtGrpc API in QMl.

Task-number: QTBUG-114893
Change-Id: I055d20354d8260480af1b8b0d741077734117e75
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-07-28 17:50:03 +02:00
Alexey Edelev f08446cd8b Migrate to implictily shared lists
It doesn't make sense to store messages in repeated fields using
shared_ptr, especially because all protobuf messages implemented
using implicit sharing. This also allow using repeated fields from
QML without the need for extra registrations and conversion.

Task-number: QTBUG-113688
Change-Id: I0a2bf2bb79a26a1e8017cccb5d3a06b867c15c79
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-06-01 15:51:55 +02:00
Konrad Kujawa d5803c0918 Update QtGRPC chat example to new options and QGrpcMetadata changes
Use QGrpcChannelOptions and QGrpcMetadata to set up user-password
authentication for SimpleChatEngine.

Task-number: QTBUG-111037
Change-Id: I2e7dea87d542b4f7585b0724a45c1398fa2047b5
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-05-23 13:34:34 +02:00
Konrad Kujawa 4235684288 Introduce QGrpcMetadata
Introduce alias to std::multimap names QGrpcMetadata, to represent
additional HTTP headers, that can be added to channel and call options.
Then channel implementations can use QGrpcMetadata and append all
metadata do each call (TODO).

Task-number: QTBUG-111037
Change-Id: Ie16e658407a57a5f44bc1a0ff54dcb3ca8b06fe1
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-05-23 13:34:34 +02:00
Konrad Kujawa 3b8b24c7e5 Introduce QGrpcCallOptions and QGrpcChannelOptions
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>
2023-05-23 13:34:34 +02:00
Alexey Edelev 30104d3c72 Fix warning related to the deprecated AUTORESOURCE_PREFIX argument
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>
2023-05-15 13:01:56 +02:00
Topi Reinio b519fe95fd Doc: Use the \examplecategory macro to tag examples
The '\meta category' command was used for tagging examples with a
specific category, used in Qt Creators Welcome mode.

As we want to also generate lists of examples belonging to a category
elsewhere in the documentation, replace the command with a macro that
expands to the original \meta command and also adds the example to
a group using the \ingroup command. This way, the category names can
be used as arguments to the \generatelist or \annotatedlist commands.

Pick-to: 6.5
Task-number: QTBUG-112731
Change-Id: I38b38c524b35ad4c0049f2978f5fc65d03c6a1cd
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-04-11 13:34:44 +00:00
Tatiana Borisova 24a3216dfb Update Qt GRPC documentation
* Split descriptions into Overview and Usage parts
* Add qt_add_grpc procedure page
* Add qtgrpcgen page
* Move qgrpc example into qdoc include header file
* Enable examples

Task-number: QTBUG-103235
Pick-to: 6.5 6.5.0
Change-Id: Ia2810e93ec2cf673c249f33ded101018259f06f2
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-03-15 19:51:12 +01:00
Konrad Kujawa 147d8a606d Fix links to CMake commands in magic 8 ball documentation
Pick-to: 6.5 6.5.0
Change-Id: I7071cfaabdd0983ff584d8b043cbf3f409fd8784
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-03-15 12:08:35 +01:00
Alexey Edelev 1e07202376 Revert "Disable -fPIE for the qtgrpc/qtprotobuf executables"
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>
2023-03-09 08:32:38 +00:00
Alexey Edelev 4502bb0e76 Require c++17 for grpcchat server
The example server uses the c++17 standard but doesn't require it in
CMake. Add the missing requirement.

Amends fdd1d0339f

Pick-to: 6.5
Change-Id: I84f10ec22198cb50a8f393036382021ad5bf39e0
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
2023-03-07 11:52:58 +01:00
Alexey Edelev 3b10bf74b2 Add the missing copyright and license headers to the .proto files
Pick-to: 6.5 6.5.0
Change-Id: Id3d75385f251e77aebe0b56a82549e19fd0fbf84
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-03-06 11:20:05 +01:00
Tatiana Borisova fb47ac8040 Window Material theme should be always light for magic8ball app
Plus, make clientserver code more readable

Pick-to: 6.5
Task-number: QTBUG-109598
Change-Id: If8f5c6779a8114308fcc02cf517ce602050a4f68
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-03-02 21:36:17 +01:00
Alexey Edelev 4c52dcca60 Fix qml warnings in the chat example
Amends fdd1d0339f

Task-number: QTBUG-109598
Pick-to: 6.5
Change-Id: Ied1bb64f5b70e087c8028a6c88d3bd29fc310aee
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-03-01 17:29:11 +01:00
Alexey Edelev 272957831e Disable -fPIE for the qtgrpc/qtprotobuf executables
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>
2023-02-24 13:47:33 +01:00
Alexey Edelev fdd1d0339f Backport the simple chat example
Backport the simple chat example. The application implements a simple
messenger using Qt GRPC. It shows how to utilize the server-side
streaming and use the call-based user/password credentials.

Task-number: QTBUG-109598
Pick-to: 6.5
Change-Id: I4ca3695780a9cc9991c92c4423e3af9d8e0eaf35
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-02-23 18:29:39 +01:00
Alexey Edelev aed766a6e6 Remove redundant records from magic8ball example
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>
2023-02-23 11:27:10 +00:00