1 | // Copyright (C) 2017 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
3 | |
4 | #include "qwlclientbufferintegrationfactory_p.h" |
5 | #include "qwlclientbufferintegrationplugin_p.h" |
6 | #include "qwlclientbufferintegration_p.h" |
7 | #include <QtCore/private/qfactoryloader_p.h> |
8 | #include <QtCore/QCoreApplication> |
9 | #include <QtCore/QDir> |
10 | |
11 | QT_BEGIN_NAMESPACE |
12 | |
13 | namespace QtWayland { |
14 | |
15 | Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, qwbifiLoader, |
16 | (QtWaylandClientBufferIntegrationFactoryInterface_iid, QLatin1String("/wayland-graphics-integration-server"), Qt::CaseInsensitive)) |
17 | |
18 | QStringList ClientBufferIntegrationFactory::keys() |
19 | { |
20 | return qwbifiLoader->keyMap().values(); |
21 | } |
22 | |
23 | ClientBufferIntegration *ClientBufferIntegrationFactory::create(const QString &name, const QStringList &args) |
24 | { |
25 | return qLoadPlugin<ClientBufferIntegration, ClientBufferIntegrationPlugin>(loader: qwbifiLoader(), key: name, args); |
26 | } |
27 | |
28 | } |
29 | |
30 | QT_END_NAMESPACE |
31 |