Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qtdeprecationmarkers.qdoc
Go to the documentation of this file.
1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4/*!
5 \headerfile <QtDeprecationMarkers>
6 \inmodule QtCore
7 \title Qt Deprecation Macros
8
9 \brief The <QtDeprecationMarkers> header file contains deprecation helper macros.
10
11 The header file declares several macros for disabling deprecated Qt APIs
12 and enabling/disabling compiler warnings when they are used.
13*/
14
15/*!
16 \macro QT_DISABLE_DEPRECATED_BEFORE
17 \relates <QtDeprecationMarkers>
18 \deprecated [6.5] Use QT_DISABLE_DEPRECATED_UP_TO instead
19
20 \sa QT_DISABLE_DEPRECATED_UP_TO
21*/
22
23/*!
24 \macro QT_DISABLE_DEPRECATED_UP_TO
25 \relates <QtDeprecationMarkers>
26
27 This macro can be defined in the project file to disable functions
28 deprecated in a specified version of Qt or any earlier version. The default
29 version number is 5.0, meaning that functions deprecated in or before
30 Qt 5.0 will not be included.
31
32 For instance, when preparing to upgrade to Qt 6.3, after eliminating all
33 deprecation warnings, you can set \c{QT_DISABLE_DEPRECATED_UP_TO=0x060300}
34 to exclude from your builds the Qt APIs you no longer use. In your own
35 project's build configuration, this will ensure that anyone adding new calls
36 to the deprecated APIs will know about it right away. If you also build Qt
37 for yourself, including this define in your build configuration for Qt will
38 make your binaries smaller by leaving out even the implementation of the
39 deprecated APIs.
40
41 \sa QT_DEPRECATED_WARNINGS, QT_DISABLE_DEPRECATED_UP_TO
42*/
43
44/*!
45 \macro QT_DEPRECATED_WARNINGS
46 \relates <QtDeprecationMarkers>
47
48 Since Qt 5.13, this macro has no effect. In Qt 5.12 and before, if this macro
49 is defined, the compiler will generate warnings if any API declared as
50 deprecated by Qt is used.
51
52 \sa QT_DISABLE_DEPRECATED_UP_TO, QT_NO_DEPRECATED_WARNINGS
53*/
54
55/*!
56 \macro QT_NO_DEPRECATED_WARNINGS
57 \relates <QtDeprecationMarkers>
58 \since 5.13
59
60 This macro can be used to suppress deprecation warnings that would otherwise
61 be generated when using deprecated APIs.
62
63 \sa QT_DISABLE_DEPRECATED_UP_TO
64*/