Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qtp0006.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2026 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
\page qt-cmake-policy-qtp0006.html
6
\ingroup qt-cmake-policies
7
\since 6.12
8
\title QTP0006
9
\keyword qt_cmake_policy_qtp0006
10
11
\summary {Enables \c{PRIVATE_CODE} as the default for Wayland protocol source generation.}
12
13
This policy was introduced in Qt 6.12. The policy affects the behavior of
14
\l{qt_generate_wayland_protocol_client_sources} and
15
\l{qt_generate_wayland_protocol_server_sources} when called without
16
\c{PRIVATE_CODE} or \c{PUBLIC_CODE}.
17
18
If the policy is set to \c OLD, and neither \c{PUBLIC_CODE} nor \c{PRIVATE_CODE}
19
is passed, the function behaves as if \c{PUBLIC_CODE} was passed and a
20
deprecation warning is emitted.
21
22
If the policy is set to \c NEW, and neither \c{PUBLIC_CODE} nor \c{PRIVATE_CODE}
23
is passed, the function behaves as if \c{PRIVATE_CODE} was passed and no
24
deprecation warning is emitted.
25
26
When the policy is not set, and neither \c{PUBLIC_CODE} nor \c{PRIVATE_CODE} is
27
passed, an \c{AUTHOR_WARNING} is emitted and the function behaves as if
28
\c{PUBLIC_CODE} was passed for backwards compatibility.
29
30
For example, the following code does not pass \c{PUBLIC_CODE} or \c{PRIVATE_CODE}.
31
Because QTP0006 is not set, an \c{AUTHOR_WARNING} is emitted:
32
\badcode
33
# QTP0006 not set — AUTHOR_WARNING is emitted
34
qt_generate_wayland_protocol_client_sources(MyTarget
35
FILES myprotocol.xml
36
)
37
\endcode
38
39
If you set QTP0006 to \c NEW before the call, the function behaves as if
40
\c{PRIVATE_CODE} was passed and no warning is emitted:
41
\badcode
42
qt_policy(SET QTP0006 NEW)
43
qt_generate_wayland_protocol_client_sources(MyTarget
44
FILES myprotocol.xml
45
)
46
\endcode
47
48
The same policy behaviour applies to \l{qt_generate_wayland_protocol_server_sources}.
49
50
\qtpolicydeprecatedbehavior
51
52
\sa qt_policy, {Qt CMake policies}, qt_generate_wayland_protocol_client_sources,
53
qt_generate_wayland_protocol_server_sources
54
55
*/
qtbase
src
corelib
doc
src
cmake
policy
qtp0006.qdoc
Generated on
for Qt by
1.16.1