Commit Graph

6 Commits

Author SHA1 Message Date
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
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
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
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
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
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