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
main.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
// Qt-Security score:significant reason:default
4
5
#
include
<
qpa
/
qplatformintegrationplugin
.
h
>
6
#
include
<
QtWaylandClient
/
private
/
qwaylandintegration_p
.
h
>
7
#
include
<
QtWaylandClient
/
private
/
qtwaylandclientglobal_p
.
h
>
8
9
QT_BEGIN_NAMESPACE
10
11
namespace
QtWaylandClient
{
12
13
class
QWaylandIntegrationPlugin
:
public
QPlatformIntegrationPlugin
14
{
15
Q_OBJECT
16
Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE
"qwayland.json"
)
17
public
:
18
QPlatformIntegration
*
create
(
const
QString
&,
const
QStringList
&)
override
;
19
};
20
21
QPlatformIntegration *
QWaylandIntegrationPlugin
::create(
const
QString& system,
const
QStringList& paramList)
22
{
23
Q_UNUSED(paramList)
24
#
if
!
QT_CONFIG
(
wayland_egl
)
25
if
(system ==
"wayland-egl"
)
26
return
nullptr
;
27
#
endif
28
#
if
!
QT_CONFIG
(
wayland_brcm
)
29
if
(system ==
"wayland-brcm"
)
30
return
nullptr
;
31
#
endif
32
auto
*integration =
new
QWaylandIntegration(system);
33
34
if
(!integration->init()) {
35
delete
integration;
36
integration =
nullptr
;
37
}
38
39
return
integration;
40
}
41
42
}
// namespace QtWaylandClient
43
44
QT_END_NAMESPACE
45
46
#
include
"main.moc"
QtWaylandClient::QWaylandIntegrationPlugin
Definition
main.cpp:14
QtWaylandClient
Definition
qwaylandclientextension.h:16
qtbase
src
plugins
platforms
wayland
main.cpp
Generated on
for Qt by
1.16.1