diff options
author | Karsten Heimrich <karsten.heimrich@qt.io> | 2021-02-09 16:26:28 +0100 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@qt.io> | 2021-02-10 09:49:46 +0100 |
commit | 1aaaa4997f0deb69af76793620443218ab0459f3 (patch) | |
tree | c742415e5347dda1fb81100d503a0023e9414caf /src | |
parent | e655ed23511e22306a17c901370ad9ab8e435694 (diff) |
Qt SerialPort: update documentation
Fixes: QTBUG-89883
Change-Id: Ifd3e77c80aca1102800cce853c359179310b558d
Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/serialport/doc/src/index.qdoc | 12 | ||||
-rw-r--r-- | src/serialport/doc/src/qt6-changes.qdoc | 50 | ||||
-rw-r--r-- | src/serialport/doc/src/qtserialport-module-use.qdocinc | 39 | ||||
-rw-r--r-- | src/serialport/doc/src/qtserialport-module.qdoc | 12 |
4 files changed, 103 insertions, 10 deletions
diff --git a/src/serialport/doc/src/index.qdoc b/src/serialport/doc/src/index.qdoc index 041188e0..0a1804bf 100644 --- a/src/serialport/doc/src/index.qdoc +++ b/src/serialport/doc/src/index.qdoc @@ -29,6 +29,7 @@ \page qtserialport-index.html \since 5.1 \title Qt Serial Port + \qtcmakepackage SerialPort \brief Provides an API to make serial programming simple and portable. Qt Serial Port provides the basic functionality, which includes @@ -57,12 +58,13 @@ #include <QSerialPortInfo> \endcode - To link against the module, add this line to your \l qmake \c - .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 qtserialport-module-use.qdocinc cmakebuild - \code - QT += serialport - \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 qtserialport-module-use.qdocinc qmakebuild \section1 Related Information \list diff --git a/src/serialport/doc/src/qt6-changes.qdoc b/src/serialport/doc/src/qt6-changes.qdoc new file mode 100644 index 00000000..aaab6bfb --- /dev/null +++ b/src/serialport/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 SerialPort + \ingroup changes-qt-5-to-6 + \brief Migrate Qt SerialPort 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 SerialPort module, and + provide guidance to handle them. + + \section1 Changes overview + The Qt SerialPort 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 Qt6 in general, the Qt SerialPort module has cmake support in + addition to qmake. +*/ diff --git a/src/serialport/doc/src/qtserialport-module-use.qdocinc b/src/serialport/doc/src/qtserialport-module-use.qdocinc new file mode 100644 index 00000000..47c5b24b --- /dev/null +++ b/src/serialport/doc/src/qtserialport-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 SerialPort REQUIRED) + target_link_libraries(mytarget PRIVATE Qt6::SerialPort) + \endcode +//! [cmakebuild] + +//! [qmakebuild] + \code + QT += serialport + \endcode +//! [qmakebuild] diff --git a/src/serialport/doc/src/qtserialport-module.qdoc b/src/serialport/doc/src/qtserialport-module.qdoc index 6c153a00..2496df25 100644 --- a/src/serialport/doc/src/qtserialport-module.qdoc +++ b/src/serialport/doc/src/qtserialport-module.qdoc @@ -30,6 +30,7 @@ \title Qt Serial Port C++ Classes \ingroup modules \qtvariable serialport + \qtcmakepackage SerialPort \brief List of C++ classes that enable access to a serial port. To use QSerialPort in your application, add the following include @@ -45,10 +46,11 @@ #include <QSerialPortInfo> \endcode - To link against the module, add this line to your \l qmake \c - .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 qtserialport-module-use.qdocinc cmakebuild - \code - QT += serialport - \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 qtserialport-module-use.qdocinc qmakebuild */ |