1// Copyright (C) 2019 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#include "qssgassetimporterfactory_p.h"
5#include "qssgassetimporterplugin_p.h"
6#include "qssgassetimporter_p.h"
7
8#include <QtCore/qdebug.h>
9#include <QtCore/private/qfactoryloader_p.h>
10#include <QtCore/QCoreApplication>
11#include <QtCore/QDir>
12
13QT_BEGIN_NAMESPACE
14
15Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, (QSSGAssetImporterFactoryInterface_iid, QLatin1String("/assetimporters"), Qt::CaseInsensitive))
16
17QStringList QSSGAssetImporterFactory::keys()
18{
19 return loader->keyMap().values();
20}
21
22QSSGAssetImporter *QSSGAssetImporterFactory::create(const QString &name, const QStringList &args)
23{
24 return qLoadPlugin<QSSGAssetImporter, QSSGAssetImporterPlugin>(loader: loader(), key: name, args);
25}
26
27QT_END_NAMESPACE
28

source code of qtquick3d/src/assetimport/qssgassetimporterfactory.cpp