diff options
author | Karsten Heimrich <karsten.heimrich@qt.io> | 2021-03-15 15:25:25 +0100 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@qt.io> | 2021-03-17 09:18:43 +0100 |
commit | a694455b3a3c0e7028c9715bd1568a9a43faa1a0 (patch) | |
tree | 675ada82535e4a54797adb29f9e436063e59081b /src | |
parent | 3fbc608576a1a72b84e8122ebf5ee1cd9f1b31e6 (diff) |
Adapt, improve and verify documentation
Fixes: QTBUG-91211
Change-Id: I38dc720402f0b1a9806ce39c31dbbd52f7d66aa6
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/serialbus/doc/src/passthrucan.qdoc | 2 | ||||
-rw-r--r-- | src/serialbus/doc/src/qt6-changes.qdoc | 50 | ||||
-rw-r--r-- | src/serialbus/doc/src/qtmodbus-backends.qdoc | 7 | ||||
-rw-r--r-- | src/serialbus/doc/src/qtserialbus-index.qdoc | 11 | ||||
-rw-r--r-- | src/serialbus/doc/src/qtserialbus-module-cpp.qdoc | 11 | ||||
-rw-r--r-- | src/serialbus/doc/src/qtserialbus-module-use.qdocinc | 39 |
6 files changed, 106 insertions, 14 deletions
diff --git a/src/serialbus/doc/src/passthrucan.qdoc b/src/serialbus/doc/src/passthrucan.qdoc index eff2ef7..2515b67 100644 --- a/src/serialbus/doc/src/passthrucan.qdoc +++ b/src/serialbus/doc/src/passthrucan.qdoc @@ -31,7 +31,7 @@ \brief Overview of how to use the J2534 Pass-Thru CAN plugin. The Pass-Thru CAN plugin accesses CAN adapters via the SAE J2534 Pass-Thru API. - SAE J2534 is a standard for accessing vehicle busses from an x86 Windows PC. + SAE J2534 is a standard for accessing vehicle buses from an x86 Windows PC. Although the API is specified only for 32-bit Windows, some vendors also provide implementations for 64-bit Windows and other operating systems such as Linux. diff --git a/src/serialbus/doc/src/qt6-changes.qdoc b/src/serialbus/doc/src/qt6-changes.qdoc new file mode 100644 index 0000000..f089f66 --- /dev/null +++ b/src/serialbus/doc/src/qt6-changes.qdoc @@ -0,0 +1,50 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ +/*! + \page qtserialport-changes-qt6.html + + \title Changes to Qt SerialBus + \ingroup changes-qt-5-to-6 + \brief Migrate Qt SerialBus to Qt 6. + + Qt 6 is a result of the conscious effort to make the framework more + efficient and easy to use. + We try to maintain binary and source compatibility for all the public + APIs in each release. But some changes were inevitable in an effort to + make Qt a better framework. + In this topic, we summarize those changes in Qt SerialBus module and + provide guidance to handle them. + + \section1 Changes overview + The Qt SerialBus module is generally speaking source compatible with the + Qt5 version and users of the library should be able to continue with no or + minor changes to their project. + + \section1 Build system + As with Qt 6 in general, the Qt SerialBus module has CMake support in + addition to qmake. +*/ diff --git a/src/serialbus/doc/src/qtmodbus-backends.qdoc b/src/serialbus/doc/src/qtmodbus-backends.qdoc index 4b3b3d5..ad5cc9e 100644 --- a/src/serialbus/doc/src/qtmodbus-backends.qdoc +++ b/src/serialbus/doc/src/qtmodbus-backends.qdoc @@ -30,10 +30,9 @@ \brief Implemented Qt Modbus. - Modbus is a request/reply protocol that has one Modbus client in its network and may have many - Modbus servers. Servers can control only their own internal states and clients can read and write - data in them. Modbus is not restricted by the network type, in theory it can use any - QIODevice. However, not every plugin supports all classes derived from QIODevice. + Modbus is a request/reply protocol that has one Modbus client in its + network and may have many Modbus servers. Servers can control only + their own internal states, and clients can read and write data in them. Each Modbus server has four tables in which it can store data. diff --git a/src/serialbus/doc/src/qtserialbus-index.qdoc b/src/serialbus/doc/src/qtserialbus-index.qdoc index ca2c54d..85b0c00 100644 --- a/src/serialbus/doc/src/qtserialbus-index.qdoc +++ b/src/serialbus/doc/src/qtserialbus-index.qdoc @@ -43,11 +43,13 @@ #include <QtSerialBus> \endcode - To link against the module, add this line to your qmake .pro file: + To use the module with CMake, use the \c{find_package()} command to locate + the needed module components in the \c{Qt6} package: + \include qtserialbus-module-use.qdocinc cmakebuild - \code - QT += serialbus - \endcode + To use the module for building with qmake, add the module as a value of the + \c QT variable in the project's .pro file: + \include qtserialbus-module-use.qdocinc qmakebuild \section1 Supported Buses and Protocols @@ -106,5 +108,6 @@ \li \l {CAN Bus Example} \li \l {Modbus Client example} \li \l {Modbus Server example} + \li \l {Modbus Custom command example} \endlist */ diff --git a/src/serialbus/doc/src/qtserialbus-module-cpp.qdoc b/src/serialbus/doc/src/qtserialbus-module-cpp.qdoc index 57c81ea..cf591cf 100644 --- a/src/serialbus/doc/src/qtserialbus-module-cpp.qdoc +++ b/src/serialbus/doc/src/qtserialbus-module-cpp.qdoc @@ -44,12 +44,13 @@ #include <QCanBusDevice> \endcode - The .pro file should have the \e serialbus keyword added - - \code - QT += serialbus - \endcode + To use the module with CMake, use the \c{find_package()} command to locate + the needed module components in the \c{Qt6} package: + \include qtserialbus-module-use.qdocinc cmakebuild + To use the module for building with qmake, add the module as a value of the + \c QT variable in the project's .pro file: + \include qtserialbus-module-use.qdocinc qmakebuild See more in the \l {Qt Serial Bus} {Qt Serial Bus Overview}. */ diff --git a/src/serialbus/doc/src/qtserialbus-module-use.qdocinc b/src/serialbus/doc/src/qtserialbus-module-use.qdocinc new file mode 100644 index 0000000..d69b65e --- /dev/null +++ b/src/serialbus/doc/src/qtserialbus-module-use.qdocinc @@ -0,0 +1,39 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [cmakebuild] + \code + find_package(Qt6 COMPONENTS SerialBus REQUIRED) + target_link_libraries(mytarget PRIVATE Qt6::SerialBus) + \endcode +//! [cmakebuild] + +//! [qmakebuild] + \code + QT += serialbus + \endcode +//! [qmakebuild] |