From f7e37c7189c50d32e89d2a445ab9b2bc9ab4a24d Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Wed, 15 Mar 2023 17:43:14 +0100 Subject: doc: Add the QtPDF Licenses and Attributions section Fixes: QTBUG-88482 Change-Id: If58a8443afb38f372ca3dc7372472db888586dba Reviewed-by: Michal Klocek (cherry picked from commit fd13a951a75913bac18f7aeba89dfff56258beb0) Reviewed-by: Allan Sandfeld Jensen --- src/pdf/CMakeLists.txt | 13 +++++++++++++ src/pdf/doc/about_credits.tmpl | 1 + src/pdf/doc/about_credits_entry.tmpl | 13 +++++++++++++ src/pdf/doc/src/qtpdf-index.qdoc | 8 ++++++++ src/pdf/doc/src/qtpdf-licensing.qdoc | 18 ++++++++++++++++++ 5 files changed, 53 insertions(+) create mode 100644 src/pdf/doc/about_credits.tmpl create mode 100644 src/pdf/doc/about_credits_entry.tmpl create mode 100644 src/pdf/doc/src/qtpdf-licensing.qdoc (limited to 'src') diff --git a/src/pdf/CMakeLists.txt b/src/pdf/CMakeLists.txt index 7ca252e29..d7aea23cd 100644 --- a/src/pdf/CMakeLists.txt +++ b/src/pdf/CMakeLists.txt @@ -43,6 +43,10 @@ qt_internal_add_module(Pdf add_subdirectory(plugins/imageformats/pdf) +get_install_config(config) +get_architectures(archs) +list(GET archs 0 arch) + ## # PDF DOCS ## @@ -51,6 +55,15 @@ qt_internal_add_docs(Pdf doc/qtpdf.qdocconf ) +add_code_attributions_target( + TARGET generate_pdf_attributions + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pdf_attributions.qdoc + GN_TARGET :QtPdf + FILE_TEMPLATE doc/about_credits.tmpl + ENTRY_TEMPLATE doc/about_credits_entry.tmpl + BUILDDIR ${buildDir}/${config}/${arch} +) +add_dependencies(docs generate_pdf_attributions) ## # TOOLCHAIN SETUP diff --git a/src/pdf/doc/about_credits.tmpl b/src/pdf/doc/about_credits.tmpl new file mode 100644 index 000000000..57fae9e78 --- /dev/null +++ b/src/pdf/doc/about_credits.tmpl @@ -0,0 +1 @@ +{{entries}} diff --git a/src/pdf/doc/about_credits_entry.tmpl b/src/pdf/doc/about_credits_entry.tmpl new file mode 100644 index 000000000..294198709 --- /dev/null +++ b/src/pdf/doc/about_credits_entry.tmpl @@ -0,0 +1,13 @@ +/*! +\page qtpdf-3rdparty-{{name-sanitized}}.html +\attribution +\ingroup qtpdf-licensing +\brief {{license-type}} +\title {{name}} + +\l{{{url}}}{Project Homepage} + +\badcode +{{license}} +\endcode +*/ diff --git a/src/pdf/doc/src/qtpdf-index.qdoc b/src/pdf/doc/src/qtpdf-index.qdoc index 07c151f47..fb44eb5fa 100644 --- a/src/pdf/doc/src/qtpdf-index.qdoc +++ b/src/pdf/doc/src/qtpdf-index.qdoc @@ -64,4 +64,12 @@ \li \l{Qt PDF C++ Classes} \li \l{Qt Quick PDF QML Types} \endlist + + \section1 Licenses and Attributions + + Qt PDF is available under commercial licenses from \l{The Qt Company}. + In addition, it is available under the + \l{GNU Lesser General Public License, version 3}, or + the \l{GNU General Public License, version 2}. + See \l{Qt PDF Licensing} for further details about this module. */ diff --git a/src/pdf/doc/src/qtpdf-licensing.qdoc b/src/pdf/doc/src/qtpdf-licensing.qdoc new file mode 100644 index 000000000..190ee8331 --- /dev/null +++ b/src/pdf/doc/src/qtpdf-licensing.qdoc @@ -0,0 +1,18 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only + +/*! + \group qtpdf-licensing + \title Qt PDF Licensing + + Qt PDF is available under commercial licenses from \l{The Qt Company}. + In addition, it is available under the + \l{GNU Lesser General Public License, version 3}, or + the \l{GNU General Public License, version 2}. + See \l{Qt Licensing} for further details. + + The module includes a snapshot of PDFium. As such, users need to respect + the licenses of PDFium and third-party code included in it. + + Third party licenses included in the sources are: +*/ -- cgit v1.2.1