1// Copyright (C) 2016 Robin Burchell <robin.burchell@viroteck.net>
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 "qwaylanddecorationfactory_p.h"
5#include "qwaylanddecorationplugin_p.h"
6
7#include <QtCore/private/qfactoryloader_p.h>
8#include <QtCore/QCoreApplication>
9#include <QtCore/QDir>
10
11QT_BEGIN_NAMESPACE
12
13namespace QtWaylandClient {
14
15Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, qwdfiLoader,
16 (QWaylandDecorationFactoryInterface_iid, QLatin1String("/wayland-decoration-client"), Qt::CaseInsensitive))
17
18QStringList QWaylandDecorationFactory::keys()
19{
20 return qwdfiLoader->keyMap().values();
21}
22
23QWaylandAbstractDecoration *QWaylandDecorationFactory::create(const QString &name, const QStringList &args)
24{
25 return qLoadPlugin<QWaylandAbstractDecoration, QWaylandDecorationPlugin>(loader: qwdfiLoader(), key: name, args);
26}
27
28}
29
30QT_END_NAMESPACE
31

source code of qtwayland/src/client/qwaylanddecorationfactory.cpp