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
qqmlplatform.cpp
Go to the documentation of this file.
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
// ### Qt7: Consider implementing in terms of QSysInfo
26
27
#
if
defined
(
Q_OS_ANDROID
)
28
return
QStringLiteral(
"android"
);
29
#
elif
defined
(
Q_OS_IOS
)
30
return
QStringLiteral(
"ios"
);
31
#
elif
defined
(
Q_OS_TVOS
)
32
return
QStringLiteral(
"tvos"
);
33
#
elif
defined
(
Q_OS_VISIONOS
)
34
return
QStringLiteral(
"visionos"
);
35
#
elif
defined
(
Q_OS_MACOS
)
36
// ### Qt7: Replace with "macos"
37
return
QStringLiteral(
"osx"
);
38
#
elif
defined
(
Q_OS_WIN
)
39
return
QStringLiteral(
"windows"
);
40
#
elif
defined
(
Q_OS_LINUX
)
41
return
QStringLiteral(
"linux"
);
42
#
elif
defined
(
Q_OS_QNX
)
43
return
QStringLiteral(
"qnx"
);
44
#
elif
defined
(
Q_OS_WASM
)
45
return
QStringLiteral(
"wasm"
);
46
#
elif
defined
(
Q_OS_UNIX
)
47
return
QStringLiteral(
"unix"
);
48
#
else
49
return
QStringLiteral(
"unknown"
);
50
#
endif
51
}
52
53
QString QQmlPlatform::pluginName()
const
54
{
55
return
QQml_guiProvider()->pluginName();
56
}
57
58
QT_END_NAMESPACE
59
60
#
include
"moc_qqmlplatform_p.cpp"
QPlatformGraphicsBufferHelper
\inmodule QtGui
qtdeclarative
src
qml
qml
qqmlplatform.cpp
Generated on
for Qt by
1.14.0