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
9QT_BEGIN_NAMESPACE
10
11namespace QtWaylandClient {
12
14{
15 Q_OBJECT
16 Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "qwayland.json")
17public:
19};
20
21QPlatformIntegration *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
44QT_END_NAMESPACE
45
46#include "main.moc"