summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qplatformintegrationfactory.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2015-06-22 18:14:43 +0200
committerUlf Hermann <ulf.hermann@theqtcompany.com>2015-09-21 12:27:52 +0000
commit16cd053331d21bb1db9197bcbae783f28a1e0c9b (patch)
tree3e8c2e4e0c733be94fe0f9b587cd0ead36357c85 /src/gui/kernel/qplatformintegrationfactory.cpp
parent8f68d15789c78c97a4cf1a2c85ec1753a2536032 (diff)
Allow loading of static platform plugins with QT_NO_LIBRARY
As most of QFactoryLoader is now available with QT_NO_LIBRARY, we can use it to load static platform plugins. Task-number: QTBUG-3045 Change-Id: Idaf2d62fe43774c12d8777f2cf4afaa099833801 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/kernel/qplatformintegrationfactory.cpp')
-rw-r--r--src/gui/kernel/qplatformintegrationfactory.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/gui/kernel/qplatformintegrationfactory.cpp b/src/gui/kernel/qplatformintegrationfactory.cpp
index 5a1fb3ca83..d109ceb2f0 100644
--- a/src/gui/kernel/qplatformintegrationfactory.cpp
+++ b/src/gui/kernel/qplatformintegrationfactory.cpp
@@ -42,11 +42,13 @@
QT_BEGIN_NAMESPACE
-#ifndef QT_NO_LIBRARY
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QPlatformIntegrationFactoryInterface_iid, QLatin1String("/platforms"), Qt::CaseInsensitive))
+
+#ifndef QT_NO_LIBRARY
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
(QPlatformIntegrationFactoryInterface_iid, QLatin1String(""), Qt::CaseInsensitive))
+#endif // !QT_NO_LIBRARY
static inline QPlatformIntegration *loadIntegration(QFactoryLoader *loader, const QString &key, const QStringList &parameters, int &argc, char ** argv)
{
@@ -59,8 +61,6 @@ static inline QPlatformIntegration *loadIntegration(QFactoryLoader *loader, cons
return 0;
}
-#endif // !QT_NO_LIBRARY
-
QPlatformIntegration *QPlatformIntegrationFactory::create(const QString &platform, const QStringList &paramList, int &argc, char **argv, const QString &platformPluginPath)
{
#ifndef QT_NO_LIBRARY
@@ -70,16 +70,10 @@ QPlatformIntegration *QPlatformIntegrationFactory::create(const QString &platfor
if (QPlatformIntegration *ret = loadIntegration(directLoader(), platform, paramList, argc, argv))
return ret;
}
- if (QPlatformIntegration *ret = loadIntegration(loader(), platform, paramList, argc, argv))
- return ret;
#else
- Q_UNUSED(platform);
- Q_UNUSED(paramList);
- Q_UNUSED(argc);
- Q_UNUSED(argv);
Q_UNUSED(platformPluginPath);
#endif
- return 0;
+ return loadIntegration(loader(), platform, paramList, argc, argv);
}
/*!