summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2023-03-15 17:43:14 +0100
committerMichal Klocek <michal.klocek@qt.io>2023-04-05 06:55:48 +0000
commitf7e37c7189c50d32e89d2a445ab9b2bc9ab4a24d (patch)
tree6b54340baa0ad51d2d87a548293872f51afa6357
parent7c280452dee4efc3367d85721680f888d37f46fc (diff)
downloadqtwebengine-f7e37c7189c50d32e89d2a445ab9b2bc9ab4a24d.tar.gz
doc: Add the QtPDF Licenses and Attributions section
Fixes: QTBUG-88482 Change-Id: If58a8443afb38f372ca3dc7372472db888586dba Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit fd13a951a75913bac18f7aeba89dfff56258beb0) Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--src/pdf/CMakeLists.txt13
-rw-r--r--src/pdf/doc/about_credits.tmpl1
-rw-r--r--src/pdf/doc/about_credits_entry.tmpl13
-rw-r--r--src/pdf/doc/src/qtpdf-index.qdoc8
-rw-r--r--src/pdf/doc/src/qtpdf-licensing.qdoc18
5 files changed, 53 insertions, 0 deletions
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:
+*/