summaryrefslogtreecommitdiffstats
path: root/src/render/frontend
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2021-11-04 19:41:56 -0700
committerThiago Macieira <thiago.macieira@intel.com>2021-11-23 11:31:57 -0700
commit0158a3ddfb1ad367c0b969ffa72caa18cee322fd (patch)
treebbd35489ab6b874e12ef3334c4f1e70588d39d35 /src/render/frontend
parenta262506bdb2d7fbc7e24ce5049d1593f2d6940fb (diff)
Q*FActory: remove unused path arguments
Cargo-culted from somewhere but not used in any of these classes. This just made the code bigger for no reason. Task-number: QTBUG-97950 Pick-to: 6.2 Change-Id: Ice04365c72984d07a64dfffd16b48632888ed664 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render/frontend')
-rw-r--r--src/render/frontend/qrenderpluginfactory.cpp35
-rw-r--r--src/render/frontend/qrenderpluginfactory_p.h5
2 files changed, 4 insertions, 36 deletions
diff --git a/src/render/frontend/qrenderpluginfactory.cpp b/src/render/frontend/qrenderpluginfactory.cpp
index f842e651d..25c97cd23 100644
--- a/src/render/frontend/qrenderpluginfactory.cpp
+++ b/src/render/frontend/qrenderpluginfactory.cpp
@@ -52,45 +52,14 @@ namespace Qt3DRender {
namespace Render {
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, (QRenderPluginFactoryInterface_iid, QLatin1String("/renderplugins"), Qt::CaseInsensitive))
-#if QT_CONFIG(library)
-Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader, (QRenderPluginFactoryInterface_iid, QLatin1String(""), Qt::CaseInsensitive))
-#endif
-QStringList QRenderPluginFactory::keys(const QString &pluginPath)
+QStringList QRenderPluginFactory::keys()
{
-#if QT_CONFIG(library)
- QStringList list;
- if (!pluginPath.isEmpty()) {
- QCoreApplication::addLibraryPath(pluginPath);
- list = directLoader()->keyMap().values();
- if (!list.isEmpty()) {
- const QString postFix = QLatin1String(" (from ")
- + QDir::toNativeSeparators(pluginPath)
- + QLatin1Char(')');
- const QStringList::iterator end = list.end();
- for (QStringList::iterator it = list.begin(); it != end; ++it)
- (*it).append(postFix);
- }
- }
- list.append(loader()->keyMap().values());
- return list;
-#else
return loader()->keyMap().values();
-#endif
}
-QRenderPlugin *QRenderPluginFactory::create(const QString &name, const QStringList &args,
- const QString &pluginPath)
+QRenderPlugin *QRenderPluginFactory::create(const QString &name, const QStringList &args)
{
-#if QT_CONFIG(library)
- if (!pluginPath.isEmpty()) {
- QCoreApplication::addLibraryPath(pluginPath);
- if (QRenderPlugin *ret
- = qLoadPlugin<QRenderPlugin, QRenderPluginFactoryIf>(directLoader(), name, args)) {
- return ret;
- }
- }
-#endif
return qLoadPlugin<QRenderPlugin, QRenderPluginFactoryIf>(loader(), name, args);
}
diff --git a/src/render/frontend/qrenderpluginfactory_p.h b/src/render/frontend/qrenderpluginfactory_p.h
index 3f56be8ae..20f965012 100644
--- a/src/render/frontend/qrenderpluginfactory_p.h
+++ b/src/render/frontend/qrenderpluginfactory_p.h
@@ -65,9 +65,8 @@ class QRenderPlugin;
class Q_3DRENDERSHARED_PRIVATE_EXPORT QRenderPluginFactory
{
public:
- static QStringList keys(const QString &pluginPath = QString());
- static QRenderPlugin *create(const QString &name, const QStringList &args,
- const QString &pluginPath = QString());
+ static QStringList keys();
+ static QRenderPlugin *create(const QString &name, const QStringList &args);
};
} // namespace Render