1 | // Copyright (C) 2017 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 "qrenderpluginfactory_p.h" |
5 | #include "qrenderpluginfactoryif_p.h" |
6 | #include "qrenderplugin_p.h" |
7 | |
8 | #include <QtCore/qcoreapplication.h> |
9 | #include <QtCore/qdir.h> |
10 | |
11 | #include <private/qfactoryloader_p.h> |
12 | |
13 | QT_BEGIN_NAMESPACE |
14 | |
15 | namespace Qt3DRender { |
16 | namespace Render { |
17 | |
18 | Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, (QRenderPluginFactoryInterface_iid, QLatin1String("/renderplugins"), Qt::CaseInsensitive)) |
19 | |
20 | QStringList QRenderPluginFactory::keys() |
21 | { |
22 | return loader()->keyMap().values(); |
23 | } |
24 | |
25 | QRenderPlugin *QRenderPluginFactory::create(const QString &name, const QStringList &args) |
26 | { |
27 | return qLoadPlugin<QRenderPlugin, QRenderPluginFactoryIf>(loader: loader(), key: name, args); |
28 | } |
29 | |
30 | } // namespace Render |
31 | } // namespace Qt3DRender |
32 | |
33 | QT_END_NAMESPACE |
34 |