1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\headerfile <QtDeprecationMarkers>
\inmodule QtCore
\title Qt Deprecation Macros
\brief The <QtDeprecationMarkers> header file contains deprecation helper macros.
The header file declares several macros for disabling deprecated Qt APIs
and enabling/disabling compiler warnings when they are used.
*/
/*!
\macro QT_DISABLE_DEPRECATED_BEFORE
\relates <QtDeprecationMarkers>
\deprecated [6.5] Use QT_DISABLE_DEPRECATED_UP_TO instead
\sa QT_DISABLE_DEPRECATED_UP_TO
*/
/*!
\macro QT_DISABLE_DEPRECATED_UP_TO
\relates <QtDeprecationMarkers>
This macro can be defined in the project file to disable functions
deprecated in a specified version of Qt or any earlier version. The default
version number is 5.0, meaning that functions deprecated in or before
Qt 5.0 will not be included.
For instance, when preparing to upgrade to Qt 6.3, after eliminating all
deprecation warnings, you can set \c{QT_DISABLE_DEPRECATED_UP_TO=0x060300}
to exclude from your builds the Qt APIs you no longer use. In your own
project's build configuration, this will ensure that anyone adding new calls
to the deprecated APIs will know about it right away. If you also build Qt
for yourself, including this define in your build configuration for Qt will
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_WARN_DEPRECATED_UP_TO
*/
/*!
\macro QT_WARN_DEPRECATED_UP_TO
\relates <QtDeprecationMarkers>
This macro can be defined in the project file to disable deprecation
warnings introduced in Qt versions higher than the specified version.
For instance, when preparing to upgrade to Qt 6.10, if you are not
ready to deal with every single deprecation warnings, you can set
\c{QT_WARN_DEPRECATED_UP_TO=0x060900} to limit the deprecation
warnings to those in 6.9 and earlier.
\sa QT_DISABLE_DEPRECATED_UP_TO, QT_NO_DEPRECATED_WARNINGS
*/
/*!
\macro QT_DEPRECATED_WARNINGS
\relates <QtDeprecationMarkers>
Since Qt 5.13, this macro has no effect. In Qt 5.12 and before, if this macro
is defined, the compiler will generate warnings if any API declared as
deprecated by Qt is used.
\sa QT_DISABLE_DEPRECATED_UP_TO, QT_NO_DEPRECATED_WARNINGS, QT_WARN_DEPRECATED_UP_TO
*/
/*!
\macro QT_NO_DEPRECATED_WARNINGS
\relates <QtDeprecationMarkers>
\since 5.13
This macro can be used to suppress deprecation warnings that would otherwise
be generated when using deprecated APIs.
\sa QT_DISABLE_DEPRECATED_UP_TO, QT_WARN_DEPRECATED_UP_TO
*/
|