Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qsystemdetection.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 <QtSystemDetection>
6 \inmodule QtCore
7 \title Platform-specific Macro Definitions
8 \ingroup funclists
9
10 \brief The <QtSystemDetection> header file includes various
11 platfrom-specific macros.
12
13 The <QtSystemDetection> header file declares a range of macros (Q_OS_*)
14 that are defined for the specified platforms. For example, Q_OS_UNIX which
15 is defined for Unix-based systems.
16
17 The purpose of these macros is to enable programmers to add
18 platform-specific code to their application.
19*/
20
21/*!
22 \macro Q_OS_DARWIN
23 \relates <QtSystemDetection>
24
25 Defined on Darwin-based operating systems such as \macos, iOS, watchOS, and tvOS.
26
27 \note Unless you are dealing with code specific to the Darwin kernel,
28 prefer Q_OS_APPLE to refer to the family of Apple operating systems.
29*/
30
31/*!
32 \macro Q_OS_APPLE
33 \relates <QtSystemDetection>
34
35 Defined on Apple operating systems such as \macos, iOS, watchOS, and tvOS.
36*/
37
38/*!
39 \macro Q_OS_MAC
40 \relates <QtSystemDetection>
41
42 Deprecated synonym for \c Q_OS_DARWIN. Do not use.
43*/
44
45/*!
46 \macro Q_OS_OSX
47 \relates <QtSystemDetection>
48
49 Deprecated synonym for \c Q_OS_MACOS. Do not use.
50*/
51
52/*!
53 \macro Q_OS_MACOS
54 \relates <QtSystemDetection>
55
56 Defined on \macos.
57*/
58
59/*!
60 \macro Q_OS_IOS
61 \relates <QtSystemDetection>
62
63 Defined on iOS.
64*/
65
66/*!
67 \macro Q_OS_WATCHOS
68 \relates <QtSystemDetection>
69
70 Defined on watchOS.
71*/
72
73/*!
74 \macro Q_OS_TVOS
75 \relates <QtSystemDetection>
76
77 Defined on tvOS.
78*/
79
80/*!
81 \macro Q_OS_WIN
82 \relates <QtSystemDetection>
83
84 Defined on all supported versions of Windows. That is, if
85 \l Q_OS_WIN32 or \l Q_OS_WIN64 is defined.
86*/
87
88/*!
89 \macro Q_OS_WINDOWS
90 \relates <QtSystemDetection>
91
92 This is a synonym for Q_OS_WIN.
93*/
94
95/*!
96 \macro Q_OS_WIN32
97 \relates <QtSystemDetection>
98
99 Defined on 32-bit and 64-bit versions of Windows.
100*/
101
102/*!
103 \macro Q_OS_WIN64
104 \relates <QtSystemDetection>
105
106 Defined on 64-bit versions of Windows.
107*/
108
109/*!
110 \macro Q_OS_CYGWIN
111 \relates <QtSystemDetection>
112
113 Defined on Cygwin.
114*/
115
116/*!
117 \macro Q_OS_SOLARIS
118 \relates <QtSystemDetection>
119
120 Defined on Sun Solaris.
121*/
122
123/*!
124 \macro Q_OS_HPUX
125 \relates <QtSystemDetection>
126
127 Defined on HP-UX.
128*/
129
130/*!
131 \macro Q_OS_LINUX
132 \relates <QtSystemDetection>
133
134 Defined on Linux.
135*/
136
137/*!
138 \macro Q_OS_ANDROID
139 \relates <QtSystemDetection>
140
141 Defined on Android.
142*/
143
144/*!
145 \macro Q_OS_FREEBSD
146 \relates <QtSystemDetection>
147
148 Defined on FreeBSD.
149*/
150
151/*!
152 \macro Q_OS_NETBSD
153 \relates <QtSystemDetection>
154
155 Defined on NetBSD.
156*/
157
158/*!
159 \macro Q_OS_OPENBSD
160 \relates <QtSystemDetection>
161
162 Defined on OpenBSD.
163*/
164
165/*!
166 \macro Q_OS_AIX
167 \relates <QtSystemDetection>
168
169 Defined on AIX.
170*/
171
172/*!
173 \macro Q_OS_HURD
174 \relates <QtSystemDetection>
175
176 Defined on GNU Hurd.
177*/
178
179/*!
180 \macro Q_OS_QNX
181 \relates <QtSystemDetection>
182
183 Defined on QNX Neutrino.
184*/
185
186/*!
187 \macro Q_OS_LYNX
188 \relates <QtSystemDetection>
189
190 Defined on LynxOS.
191*/
192
193/*!
194 \macro Q_OS_BSD4
195 \relates <QtSystemDetection>
196
197 Defined on any BSD 4.4 system.
198*/
199
200/*!
201 \macro Q_OS_UNIX
202 \relates <QtSystemDetection>
203
204 Defined on any UNIX BSD/SYSV system.
205*/
206
207/*!
208 \macro Q_OS_WASM
209 \relates <QtSystemDetection>
210
211 Defined on Web Assembly.
212*/