From a2b94167ab19450f0691b3209817e32ede5836ac Mon Sep 17 00:00:00 2001 From: Ivan Solovev Date: Wed, 21 Aug 2024 14:13:07 +0200 Subject: [PATCH] Clarify QT_DISABLE_DEPRECATED_UP_TO usage in static builds Explicitly mention that in static builds Qt itself needs to be built with the same deprecation version as the user code. Fixes: QTBUG-125975 Pick-to: 6.7 6.5 Change-Id: I51b1e8b4ecd1731d3ff2320e758a52c5ef2c7cd9 Reviewed-by: Volker Hilsheimer Reviewed-by: Edward Welbourne (cherry picked from commit 47ff7d99a06321559d7ab1682869732ea6e08359) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/global/qtdeprecationmarkers.qdoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/corelib/global/qtdeprecationmarkers.qdoc b/src/corelib/global/qtdeprecationmarkers.qdoc index 2dd572533e..5d7517f75e 100644 --- a/src/corelib/global/qtdeprecationmarkers.qdoc +++ b/src/corelib/global/qtdeprecationmarkers.qdoc @@ -38,6 +38,12 @@ make your binaries smaller by leaving out even the implementation of the deprecated APIs. + \note In order to avoid linker errors, the same deprecation level should be + used consistently in the entire binary. This means that in static builds + the Qt libraries should also be built with \c {QT_DISABLE_DEPRECATED_UP_TO} + set to the same version as in the user code. That is because in static + build the Qt libraries also become a part of the binary. + \sa QT_DEPRECATED_WARNINGS, QT_DISABLE_DEPRECATED_UP_TO */