diff options
author | Kai Koehne <kai.koehne@qt.io> | 2020-11-30 13:09:09 +0100 |
---|---|---|
committer | Kai Koehne <kai.koehne@qt.io> | 2020-11-30 15:55:36 +0000 |
commit | ebbc98cd3f53767b90d138e49e79c61f8a3fa322 (patch) | |
tree | 050c0e78f4d94636e34d724bdb66afe39ddd13ec | |
parent | 1906e5f955778717f267078ae90c07a9181493a8 (diff) | |
download | qtdoc-ebbc98cd3f53767b90d138e49e79c61f8a3fa322.tar.gz |
Fix description of QT_DISABLE_DEPRECATED_BEFORE in porting guide
Pick-to: 6.0 dev
Change-Id: Ie56023484422b8d8f05e4681192b23581a42de52
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
-rw-r--r-- | doc/src/porting.qdoc | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/doc/src/porting.qdoc b/doc/src/porting.qdoc index c00c6998..daeb0dce 100644 --- a/doc/src/porting.qdoc +++ b/doc/src/porting.qdoc @@ -40,16 +40,23 @@ removed for the Qt 6.0 release. Here are things you should check if you are porting your Qt 5 applications into Qt 6. +\section1 Disable use of C++ API deprecated in Qt 5.15 -\section1 Enable Warnings for Deprecated APIs - -To check if your application uses deprecated functions, set the -\l{QT_DISABLE_DEPRECATED_BEFORE} macro in your project file. This macro enables -compile-time warnings if your application uses deprecated APIs. +Usage of API deprecated in Qt will typically show up in the form of a compiler +warning. You can also make the use an error by defining the +\l{QT_DISABLE_DEPRECATED_BEFORE} C++ macro in your build system. To disable +any API deprecated in 5.15 or older Qt versions, define the macro to +\c{0x050F00}, which is '5.15.0' encoded as a hexadecimal number. For example, in a qmake project file, define the macro with: \code -DEFINES += QT_DISABLE_DEPRECATED_BEFORE +DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x050F00 +\endcode + +In CMake, you can use add_compile_definitions: + +\code +add_compile_definitions(QT_DISABLE_DEPRECATED_BEFORE=0x050F00) \endcode \list |