summaryrefslogtreecommitdiffstats
path: root/src/render/frontend
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2019-04-02 15:08:50 +0200
committerPaul Lemire <paul.lemire@kdab.com>2019-04-02 15:25:12 +0200
commitf3259300bde381b10cb737735fe19b039c969782 (patch)
tree43c70cfe34cbf08947752653e98ccb777c1c9521 /src/render/frontend
parent6f7ac29268df048b5f23ad26c47efcbfdfdb3585 (diff)
parent59d26d3e9411150c7ed0fb0cf68d48988c8dbf59 (diff)
Merge branch '5.12' into 5.13
Diffstat (limited to 'src/render/frontend')
-rw-r--r--src/render/frontend/qrenderpluginfactory.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/render/frontend/qrenderpluginfactory.cpp b/src/render/frontend/qrenderpluginfactory.cpp
index 51fa068c6..548fa90e0 100644
--- a/src/render/frontend/qrenderpluginfactory.cpp
+++ b/src/render/frontend/qrenderpluginfactory.cpp
@@ -48,14 +48,14 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
namespace Render {
-#ifndef QT_NO_LIBRARY
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)
{
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
QStringList list;
if (!pluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(pluginPath);
@@ -72,14 +72,14 @@ QStringList QRenderPluginFactory::keys(const QString &pluginPath)
list.append(loader()->keyMap().values());
return list;
#else
- return QStringList();
+ return loader()->keyMap().values();
#endif
}
QRenderPlugin *QRenderPluginFactory::create(const QString &name, const QStringList &args,
const QString &pluginPath)
{
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
if (!pluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(pluginPath);
if (QRenderPlugin *ret
@@ -87,10 +87,8 @@ QRenderPlugin *QRenderPluginFactory::create(const QString &name, const QStringLi
return ret;
}
}
- if (QRenderPlugin *ret = qLoadPlugin<QRenderPlugin, QRenderPluginFactoryIf>(loader(), name, args))
- return ret;
#endif
- return nullptr;
+ return qLoadPlugin<QRenderPlugin, QRenderPluginFactoryIf>(loader(), name, args);
}
} // namespace Render