Doc: Exclude licensing header when including a .qdocinc

The \include command includes the source in its entirety when the
second parameter is omitted. This pulled in also the license header
which was visible in the generated documentation.

Add snippet tags and use them to extract only the content we need.

Pick-to: 6.5
Fixes: QTBUG-113138
Change-Id: Ie3fe2fede1e81d08201ec4353352ef069aebc388
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
Topi Reinio 2023-04-24 10:06:14 +00:00 committed by Leena Miettinen
parent e1818d9e9c
commit 4fc3f0c159
3 changed files with 4 additions and 2 deletions

View File

@ -110,5 +110,5 @@ for finalizing the target by adding the \c{MANUAL_FINALIZATION} keyword.
\snippet cmake-macros/examples.cmake qt_add_executable_deferred
\include cmake-android-qt-finalize-project-warning.qdocinc
\include cmake-android-qt-finalize-project-warning.qdocinc warning
*/

View File

@ -38,7 +38,7 @@ With CMake version 3.19 or later, you don't need to call this command since
it consists of sub-commands that are ordinarily invoked at the end of
\c CMAKE_SOURCE_DIR directory scope processing.
\include cmake-android-qt-finalize-project-warning.qdocinc
\include cmake-android-qt-finalize-project-warning.qdocinc warning
\section2 Examples

View File

@ -1,6 +1,8 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
//! [warning]
\warning If your \e Android project is built using a CMake version lower than
3.19, make sure that you call \l{qt_finalize_project}{qt6_finalize_project()} at
the end of a top-level CMakeLists.txt.
//! [warning]