Commit Graph

27 Commits

Author SHA1 Message Date
Jerome Pasion 334b0be3c7 Doc: Add security considerations page
-A list of basic security topics when implementing gRPC
-Add links to other modules and relevant pages.

Task-number: QTBUG-138812
Pick-to: 6.9
Change-Id: I523f07cb516641771eb1457091f381a2e09b0026
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
(cherry picked from commit c6cd23770d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-09-01 16:29:02 +00:00
Topi Reinio 3691055700 Doc: Enable automatic linking to sources on code.qt.io
Since 6.10, QDoc is capable of generating links to the declaration in
the source code for each documented C++ API entity in their `Detailed
description`.

Add the required configuration to enable this feature for modules in
qtgrpc.

Change-Id: I09020881035bde71470ccb8c77d7905321f56251
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2025-05-27 12:16:31 +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
Topi Reinio bd3cfe2c76 Revert "Docs: enforce zero warning policy"
This reverts commit ec8afcaca5.

Explicitly enabling the warning limit causes situations
where the entire top-level documentation build fails when
a submodule documentation has warnings.

Let the CI documentation testing step enable the warning limit
instead.

Pick-to: 6.9 6.8
Fixes: QTBUG-132954
Change-Id: I8969e54073a34c3cde7059d5d5d736bfe4e509f7
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-01-21 08:19:36 +00:00
Dennis Oberst 6ab4321ccc Docs: create and distribute the \gRPC macro for adding trademarks
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>
2024-12-17 11:08:01 +01:00
Dennis Oberst ec8afcaca5 Docs: enforce zero warning policy
Task-number: QTBUG-125406
Pick-to: 6.9 6.8
Change-Id: Iefd0140f24ec9be66ff3655f8817ffa02ccd8dc3
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2024-12-17 11:07:55 +01:00
Jaime Resano c7f646780e Remove outdated path from qtgrpc doc file
Since the documentation has been moved to the example folder, the path
is no longer valid

Task-number: QTBUG-129571
Pick-to: 6.8
Change-Id: Ia299de0801b89f98d13bbb9714e7ce597af90ac5
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2024-11-13 15:47:02 +02:00
Dennis Oberst 20eeace9ab Docs: reorder extra documentation to be module bound
Slim down the many unneeded extra files / dirs we've had. It only adds
to the confusion having every tiny thing separated into a specific file
or extra subfolder.

All non-main modules (extras) now take simply doc/ without src/

Task-number: QTBUG-125406
Pick-to: 6.8
Change-Id: If3e5206a486726f43f8a38285b7dd0f1fff81a88
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-09-04 10:27:22 +02:00
Alexei Cazacov 14653ecb59 Docs: Organize topics in the qtgrpc repo
This commit organizes the articles, so they:
- have a reasonable tree structure
- can be navigated through the topic tree in the Qt Creator help viewer

Task-number: QTBUG-127125
Change-Id: I20c42160a7bc2c6d369c75015c4086225ba898a0
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2024-07-26 08:03:45 +00:00
Alexey Edelev aa609fc1cb Move documentation for generator tools to separate directories
Sharing documentation directory between two modules make documentation
from these directory generated twice. Also links are not produced correctly.

Pick-to: 6.5 6.6 6.7
Change-Id: I2720515312a55407b6b52e28721f10ecc977ca46
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-01-16 13:50:52 +01:00
Alexey Edelev 5a855fb853 Merge QtGrpc and QtGrpcQuick documentation configs
Merge qdocconf files of the QtGrpc and QtGrpcQuick, this provides
better indexing in .qch docs and is aligned with the common Qt rules
for QML modules.

Task-number: QTBUG-118152
Pick-to: 6.6
Change-Id: I47b381f79a50afbbf5379d355abdf4407d4b46f0
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
2023-11-17 19:38:17 +01:00
Kai Köhne 220e09d445 Doc: Highlight examples for Networking category
Task-number: QTBUG-117222
Pick-to: 6.5 6.6
Change-Id: Idbd5f54b013cb2230b4c62b09ebd3a498cee175a
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-10-18 13:37:45 +02:00
Topi Reinio 9cbb5e8b29 Doc: Fix function parameter docs, linking to identified QML modules
Fixes
    * warning: No such parameter 'StreamType' in
      QAbstractGrpcClient::startStream()
    * warning: Can't link to 'qtqml-modules-identifiedmodules.html'

Change-Id: If67516c77eb4b43a4a3c5b38b69b59efe66f3ffc
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-09-08 07:22:00 +00:00
Topi Reinio f18ec2ca9a Doc: Fix documentation issues in Qt Protobuf Well-known Types
* Remove/replace incorrect values in qtprotobufwellknowntypes.qdocconf.

* Add a dependency to qtdoc to get top-level navigation working.

* Add a \keyword for the module page to make it a linkable target
  for 'Qt Protobuf Well-known Types', as the module has no separate
  landing page.

* Fix linking to qtprotobufgen tool.

Mark all documentation modules in the repository as free of warnings.

Pick-to: 6.5 6.6
Change-Id: I22487d3b32deb837ee0226e298de34b2cfca4db8
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-09-08 07:21:49 +00:00
Tatiana Borisova 6f0aea81fa Re-organize main page
- add QML API section
- add C++ API section
- Add Building with CMake

Change-Id: I12ab90bfc1d10bf1ba7efda84e8653f68dd7166d
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-08-30 12:01:50 +02:00
Topi Reinio 11f764369c Doc: Remove warninglimit .qdocconf variable
The most common limit for the maximum number of allowed documentation
warnings is zero. As all Qt module docs include() a common configuration
from qtbase, it's better to control the base warninglimit from a central
location in qtbase/doc/global.

This allows for a temporary increase of the limit across all modules as
needed - for example, when updating the QDoc binary that the CI
provisions to a version that introduces new types of documentation
warnings.

Task-number: QTBUG-113326
Change-Id: I89821d9188a804c75d2d4876d707ee1e2aa0c7be
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-06-27 10:42:59 +00:00
Paul Wicking 6de02aef24 Doc: Update configuration for Qt GRPC/Protobuf examples
Due to infrastructure issues (specifically, missing replication of
repositories to code.qt.io), Qt GRPC and Qt Protobuf relied on falling
back to QDoc's built-in generation of lists of files that comprise an
example rather than a link to code.qt.io, the latter of which is the
preferred option for examples in Qt. Said list limits its output to
files identified by the `examples.fileextensions` QDoc configuration
variable. However, the `.proto` file extension was not added to the
documentation configuration for these modules.

Since the module released, repository replication issues have been
resolved. Thus, it is now possible to link to code.qt.io, as preferred.

This change adds the `.proto` file extension to the configuration,
and sets the `url.examples` configuration variable such that QDoc will
generate a link to code.qt.io. The file extension change is still
considered relevant, in case the fallback is required in the future,
and `.proto` is not part of the default set of file extensions for Qt's
examples.

Fixes: QTBUG-112754
Pick-to: 6.5
Change-Id: I61fcc1fac0aa11a4dcf278deabbd7c12c091d894
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2023-04-13 11:48:13 +02: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 8d44cb36bd Remove url.examples key from QtGRPC and QtProtobuf .qdocconf files
Remove url.examples key from QtGRPC and QtProtobuf .qdocconf files,
because qtgrpc repository doesn't exist in code.qt.io/cgit/qt.
This patch can be reverted once the qtgrpc.git is available there.

Pick-to: 6.5 6.5.0
Change-Id: Ifa77a42373cd03c2faf6fc36e9b494e0af87a431
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-03-15 13:20:47 +01:00
Konrad Kujawa 04861d217d Fix qdoc warnings with missing module header files
Fix qdoc warnings with missing module header, for example QtGrpcDoc,
by removing moduleheader variable from the .qdocconf files.
Initially that was resolving issues when building documentation on macOS.
Fix the root cause of the problem by changing capitalization of the project
from QtGRPC, to QtGrpc (inspired by the QtNfc module).

Pick-to: 6.5
Change-Id: I3b9cc408235b191bbf1350a18bdd91ae45327e41
Reviewed-by: Luca Di Sera <luca.disera@qt.io>
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-03-13 16:45:07 +01:00
Konrad Kujawa 4eea5b1b06 Add moduleheader field to QtGRPC and QtProtobuf qdocconf files
Workaround QDoc macOS only issue, resulting in clang not being able
to find symbols for methods defined in header files and signals.

Task-number: QTBUG-103235
Pick-to: 6.5
Change-Id: Id95eca33bf34929e9358a5156e8c4c90c42e985d
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-02-22 13:37:58 +01:00
Tatiana Borisova 681d104f0d The example of Qt gRPC-Client part with qml based UI
Pick-to: 6.5
Task-number: QTBUG-109598
Change-Id: I670f779fb9a85d02ad69a54dc6adaa50f52a7a71
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-02-21 21:30:32 +01:00
Kai Köhne 78a54912ee Doc: Fix links in Qt GRPC
Fixes the warnings

  qt5/qtgrpc/examples/protobuf/sensors/doc/sensors.qdoc:4: (qdoc) warning: Can't link to 'QLineEdit'
  qt5/qtgrpc/src/grpc/doc/qtgrpc-index.qdoc:3: (qdoc) warning: Can't link to 'Qt Protobuf'
  qt5/qtgrpc/src/grpc/doc/src/cmake-commands.qdoc:4: (qdoc) warning: Can't link to 'CMake Commands in Qt6 Protobuf'

Pick-to: 6.5
Change-Id: I5f5181455a57c868d85773888d1121c02a0fc5bf
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
2023-02-20 12:25:30 +01:00
Kai Köhne c8ae58ed14 Doc: Fix link to landing page
The separate overview was removed in 79dc1b71. This fixes qdoc warnings like

  qt5/qtgrpc/src/grpc/qgrpccredentials.cpp:9: (qdoc) warning: Can't link to 'Qt GRPC Overview'

Pick-to: 6.5
Change-Id: I1f577d456f3186d120824e8bea81c55462650ca6
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-01-31 10:36:35 +01:00
Konrad Kujawa 79dc1b71ef Update links to the QtGrpc documentation
Add QtGrpc index and classes documentation pages.
Fix missing links to QtGrpc documentation.
The modules are now consistently named 'Qt GRPC', 'Qt Protobuf'.

Pick-to: 6.5
Change-Id: Iabd91336c871e43c97c49712a52f3aa82f7e75a5
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-01-26 15:08:44 +01:00
Topi Reinio 26c9b1ca83 Doc: Fix documentation issues
Qt gRPC:

  * Add dependencies to qtdoc, qtcmake to get working navigation links.
  * Add C++ module page.
  * Move \since command to the \module page to have since information
    for classes.
  * Add a \qtcmakepackage for the \module.
  * Comment out navigation information for QML types as those don't
    exist.

Qt Protobuf:

  * Create a preliminary landing page and move information from the
    module page to it.
  * Add dependencies to qtdoc, qtcmake docs.
  * Add \since, \brief information for the module page.
  * Fix issues in internal class documentation.
  * Comment out navigation information for QML types.

Set both modules to 'Technical Preview' state.

Pick-to: 6.5
Task-number: QTBUG-109503
Change-Id: Iab99ad3df373373d6f15c4d71d42df71d2d5ab62
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
2022-12-22 23:43:59 +00:00
Konrad Kujawa 0d56724387 Introduce QtGrpc
QtGrpc provides support for serializing and deserializing
gRPC services using Qt.

The tool was originally written by Alexey Edelev, along with various
contributors, on GitHub. Originally under MIT license, but major
contributors have agreed to relicense the code under GPL/commercial for
inclusion in tools for Qt. Their copyright notice is retained and
the original source code, still licensed as MIT, can be found in its
original repository[0].

[0]: https://github.com/semlanik/qtprotobuf

Change-Id: Id29e70df1249e9369fbfaa2c543f3ff29efbdbea
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-12-09 15:00:04 +01:00