QTP0006

Wayland 프로토콜 소스 생성의 기본값으로 ` PRIVATE_CODE `를 활성화합니다.

이 정책은 Qt 6.12에서 도입되었습니다. 이 정책은 PRIVATE_CODE 또는 PUBLIC_CODE 매개변수 없이 qt_generate_wayland_protocol_client_sources() 및 qt_generate_wayland_protocol_server_sources() 가 호출될 때 해당 함수의 동작에 영향을 미칩니다.

이 정책이 OLD 로 설정되어 있고, PUBLIC_CODE 나 PRIVATE_CODE 가 모두 전달되지 않은 경우, 해당 함수는 PUBLIC_CODE 가 전달된 것처럼 동작하며 사용 중단 경고가 출력됩니다.

정책이 NEW 로 설정되어 있고, PUBLIC_CODE 나 PRIVATE_CODE 가 모두 전달되지 않은 경우, 이 함수는 PRIVATE_CODE 가 전달된 것처럼 동작하며, 사용 중단 경고는 출력되지 않습니다.

정책이 설정되지 않았고 PUBLIC_CODE 및 PRIVATE_CODE 가 모두 전달되지 않은 경우, 하위 호환성을 위해 PUBLIC_CODE 가 전달된 것처럼 함수가 동작하며 AUTHOR_WARNING 가 발생합니다.

예를 들어, 다음 코드는 PUBLIC_CODE 이나 PRIVATE_CODE 를 전달하지 않습니다. QTP0006이 설정되지 않았기 때문에 AUTHOR_WARNING 이 발생합니다:

# QTP0006 not set — AUTHOR_WARNING is emitted
qt_generate_wayland_protocol_client_sources(MyTarget
    FILES myprotocol.xml
)

호출 전에 QTP0006을 NEW 로 설정하면, 이 함수는 PRIVATE_CODE 가 전달된 것처럼 동작하며 경고가 발생하지 않습니다:

qt_policy(SET QTP0006 NEW)
qt_generate_wayland_protocol_client_sources(MyTarget
    FILES myprotocol.xml
)

동일한 정책 동작이 qt_generate_wayland_protocol_server_sources()에도 적용됩니다.

참고: 정책의 OLD 동작은 더 이상 권장되지 않으며, 향후 제거될 수 있습니다.

qt_policy(), Qt CMake 정책, qt_generate_wayland_protocol_client_sources(), qt_generate_wayland_protocol_server_sources()도 참조하십시오 .

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.