From 5a9fdaf2943e84281a5a46f4bd51c75e2437f7bb Mon Sep 17 00:00:00 2001 From: Dennis Oberst Date: Thu, 20 Feb 2025 17:46:01 +0100 Subject: [PATCH] Docs: add QT_PROTO_INCLUDES note for ProtobufQt{Core,Gui}Types This was missing before and is a crucial information. Pick-to: 6.9 6.8 Change-Id: I16c99c4d6482a0b94a9a39af360638ec438873e6 Reviewed-by: Alexey Edelev Reviewed-by: Tatiana Borisova --- src/protobufqttypes/doc/protobufqtcoretypes.qdoc | 11 +++++++++++ src/protobufqttypes/doc/protobufqtguitypes.qdoc | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/src/protobufqttypes/doc/protobufqtcoretypes.qdoc b/src/protobufqttypes/doc/protobufqtcoretypes.qdoc index eda61fbb..fde05375 100644 --- a/src/protobufqttypes/doc/protobufqtcoretypes.qdoc +++ b/src/protobufqttypes/doc/protobufqtcoretypes.qdoc @@ -75,4 +75,15 @@ The Qt Protobuf generator detects Qt Core types, supplied by the ProtobufQtCoreTypes package, and uses them directly. This gives you the flexibility to use these types without additional conversion. + + In CMake, you can extract the proto include path from the library using the + \c{QT_PROTO_INCLUDES} target property: + \badcode + qt_add_protobuf(MyProtoLib + PROTO_FILES + MyQtCoreTypesUsage.proto + PROTO_INCLUDES + $ + ) + \endcode */ diff --git a/src/protobufqttypes/doc/protobufqtguitypes.qdoc b/src/protobufqttypes/doc/protobufqtguitypes.qdoc index f01339fd..fdcdb13a 100644 --- a/src/protobufqttypes/doc/protobufqtguitypes.qdoc +++ b/src/protobufqttypes/doc/protobufqtguitypes.qdoc @@ -69,6 +69,17 @@ ProtobufQtGuiTypes package, and uses them directly. This gives you the flexibility to use these types without additional conversion. + In CMake, you can extract the proto include path from the library using the + \c{QT_PROTO_INCLUDES} target property: + \badcode + qt_add_protobuf(MyProtoLib + PROTO_FILES + MyQtGuiTypesUsage.proto + PROTO_INCLUDES + $ + ) + \endcode + \section2 QImage serialization The ProtobufQtGuiTypes library provides the possibility to work with the QImage class. Usually, the library converts all QImage objects in