From f6cb85bee143268ea1b7cf9edf9528abdca06c1d Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Thu, 27 Jan 2022 10:34:58 +0100 Subject: [PATCH] QtMqtt documentation cleanup - Updated the overview documentation with details on how to link against QtMqtt with CMake - Added \qtcmakepackage command, to include CMake instructions in class/namespace docs - Removed the note about the module being part of Qt for Automation Change-Id: Iac01f6e467915f6aedfc6324cf5faab104f768bf Reviewed-by: Maurice Kalinowski Reviewed-by: Paul Wicking Reviewed-by: Kai Koehne (cherry picked from commit ad8fe2f99920450b6a70f414713bf47b2054b405) Reviewed-by: Qt Cherry-pick Bot --- src/mqtt/doc/qtmqtt.qdocconf | 2 +- src/mqtt/doc/src/index.qdoc | 15 ++++++--------- src/mqtt/doc/src/module.qdoc | 14 ++------------ 3 files changed, 9 insertions(+), 22 deletions(-) diff --git a/src/mqtt/doc/qtmqtt.qdocconf b/src/mqtt/doc/qtmqtt.qdocconf index 90b9152..d80a604 100644 --- a/src/mqtt/doc/qtmqtt.qdocconf +++ b/src/mqtt/doc/qtmqtt.qdocconf @@ -35,7 +35,7 @@ excludedirs += ../qt4support Cpp.ignoretokens += Q_MQTT_EXPORT -depends += qtcore qtdoc qtnetwork qmake qtwebsockets +depends += qtcore qtdoc qtnetwork qmake qtwebsockets qtcmake #add generic thumbnail images for example documentation that does not have an image. manifestmeta.thumbnail.names += "QtMqtt/WebSockets MQTT Subscription*" diff --git a/src/mqtt/doc/src/index.qdoc b/src/mqtt/doc/src/index.qdoc index 3145b22..ef0d2ad 100644 --- a/src/mqtt/doc/src/index.qdoc +++ b/src/mqtt/doc/src/index.qdoc @@ -44,19 +44,16 @@ and devices to publish telemetry data. The supported versions are MQTT 3.1, MQTT 3.1.1, and MQTT 5.0. - \note Qt MQTT is part of the Qt for Automation offering and not Qt. For further - details please see \l {Qt for Automation}. - - \section1 Getting Started - - To include the definitions of the module's classes, use the following - directive: + \include module-use.qdocinc using qt module \code - #include + find_package(Qt6 REQUIRED COMPONENTS Mqtt) + target_link_libraries(mytarget PRIVATE Qt6::Mqtt) \endcode - To link against the module, add this line to your \l qmake \c .pro file: + See also the \l {Build with CMake} overview. + + \include module-use.qdocinc building with qmake \code QT += mqtt diff --git a/src/mqtt/doc/src/module.qdoc b/src/mqtt/doc/src/module.qdoc index 457e02d..669010f 100644 --- a/src/mqtt/doc/src/module.qdoc +++ b/src/mqtt/doc/src/module.qdoc @@ -30,19 +30,9 @@ \module QtMqtt \title Qt MQTT C++ Classes \ingroup modules + \qtcmakepackage Mqtt \qtvariable mqtt \brief Provides classes that enable sending messages via the MQTT protocol. - To use these classes in your application, use the following include - statement: - - \code - #include - \endcode - - To link against the module, add this line to your \l qmake \c .pro file: - - \code - QT += mqtt - \endcode + The \l{Qt MQTT} page contains information about how to use the module. */