Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
osdetection_p.h
Go to the documentation of this file.
1// Copyright (C) 2025 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef OSDETECTION_P_H
5#define OSDETECTION_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtCore/qsystemdetection.h>
19#include <QtCore/qtconfigmacros.h>
20
22
23constexpr bool isLinux =
24#ifdef Q_OS_LINUX
25 true;
26#else
27 false;
28#endif
29
30constexpr bool isMacOS =
31#ifdef Q_OS_MACOS
32 true;
33#else
34 false;
35#endif
36
37constexpr bool isWindows =
38#ifdef Q_OS_WINDOWS
39 true;
40#else
41 false;
42#endif
43
44constexpr bool isAndroid =
45#ifdef Q_OS_ANDROID
46 true;
47#else
48 false;
49#endif
50
51constexpr bool isArm =
52#ifdef Q_PROCESSOR_ARM
53 true;
54#else
55 false;
56#endif
57
58
59QT_END_NAMESPACE
60
61#endif
constexpr bool isMacOS
constexpr bool isAndroid
constexpr bool isWindows
constexpr bool isArm
QT_BEGIN_NAMESPACE constexpr bool isLinux