1// Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies).
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 "qsceneimportfactory_p.h"
5#include "qsceneimportplugin_p.h"
6#include "qsceneimporter_p.h"
7
8#include <QtCore/private/qfactoryloader_p.h>
9#include <QtCore/QCoreApplication>
10#include <QtCore/QDir>
11
12QT_BEGIN_NAMESPACE
13
14namespace Qt3DRender {
15
16Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, (QSceneImportFactoryInterface_iid, QLatin1String("/sceneparsers"), Qt::CaseInsensitive))
17
18QStringList QSceneImportFactory::keys()
19{
20 return loader->keyMap().values();
21}
22
23QSceneImporter *QSceneImportFactory::create(const QString &name, const QStringList &args)
24{
25 return qLoadPlugin<QSceneImporter, QSceneImportPlugin>(loader: loader(), key: name, args);
26}
27
28} // namespace Qt3DRender
29
30QT_END_NAMESPACE
31

source code of qt3d/src/render/io/qsceneimportfactory.cpp