1 | // Copyright (C) 2016 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #include "qqmlplatform_p.h" |
5 | #include "qqmlglobal_p.h" |
6 | |
7 | QT_BEGIN_NAMESPACE |
8 | |
9 | /* |
10 | This object and its properties are documented as part of the Qt object, |
11 | in qqmlengine.cpp |
12 | */ |
13 | |
14 | QQmlPlatform::QQmlPlatform(QObject *parent) |
15 | : QObject(parent) |
16 | { |
17 | } |
18 | |
19 | QQmlPlatform::~QQmlPlatform() |
20 | { |
21 | } |
22 | |
23 | QString QQmlPlatform::os() |
24 | { |
25 | #if defined(Q_OS_ANDROID) |
26 | return QStringLiteral("android" ); |
27 | #elif defined(Q_OS_IOS) |
28 | return QStringLiteral("ios" ); |
29 | #elif defined(Q_OS_TVOS) |
30 | return QStringLiteral("tvos" ); |
31 | #elif defined(Q_OS_MAC) |
32 | return QStringLiteral("osx" ); |
33 | #elif defined(Q_OS_WIN) |
34 | return QStringLiteral("windows" ); |
35 | #elif defined(Q_OS_LINUX) |
36 | return QStringLiteral("linux" ); |
37 | #elif defined(Q_OS_QNX) |
38 | return QStringLiteral("qnx" ); |
39 | #elif defined(Q_OS_WASM) |
40 | return QStringLiteral("wasm" ); |
41 | #elif defined(Q_OS_UNIX) |
42 | return QStringLiteral("unix" ); |
43 | #else |
44 | return QStringLiteral("unknown" ); |
45 | #endif |
46 | } |
47 | |
48 | QString QQmlPlatform::pluginName() const |
49 | { |
50 | return QQml_guiProvider()->pluginName(); |
51 | } |
52 | |
53 | QT_END_NAMESPACE |
54 | |
55 | #include "moc_qqmlplatform_p.cpp" |
56 | |