diff options
author | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-06-19 13:29:55 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-08-18 19:59:46 +0000 |
commit | 6c76fdc7616ac3b62c5750600bd6d5985dbceb20 (patch) | |
tree | 5f8ec6d8b0b444d07d9fe3780acf77996157c890 /src/corelib/plugin/qpluginloader.h | |
parent | 1f437e7540cbdfca8adcad0b69ae26237846ab23 (diff) |
Allow loading of static plugins if QT_NO_LIBRARY is set.
We keep two symbols from QPluginLoader defined, even if QT_NO_LIBRARY
is set in order to be able to locate static plugins. This doesn't
constitute any loading of shared libraries or plugins from external
files at runtime.
Using these symbols we can enable most of QFactoryLoader even if
QT_NO_LIBRARY is set. Only update(), refreshAll(), library() and
the dtor make no sense then. This way QGenericPlugin also becomes
useful with QT_NO_LIBRARY.
Task-number: QTBUG-3045
Change-Id: Ib7842ce5799e8e2caa46431d95fddd1adda0fc41
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/plugin/qpluginloader.h')
-rw-r--r-- | src/corelib/plugin/qpluginloader.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/corelib/plugin/qpluginloader.h b/src/corelib/plugin/qpluginloader.h index 0ab25bbb07..5dc7d1b66c 100644 --- a/src/corelib/plugin/qpluginloader.h +++ b/src/corelib/plugin/qpluginloader.h @@ -37,10 +37,10 @@ #include <QtCore/qlibrary.h> #include <QtCore/qplugin.h> -#ifndef QT_NO_LIBRARY - QT_BEGIN_NAMESPACE +#ifndef QT_NO_LIBRARY + class QLibraryPrivate; class QJsonObject; @@ -78,8 +78,17 @@ private: Q_DISABLE_COPY(QPluginLoader) }; -QT_END_NAMESPACE +#else + +class Q_CORE_EXPORT QPluginLoader +{ +public: + static QObjectList staticInstances(); + static QVector<QStaticPlugin> staticPlugins(); +}; #endif // QT_NO_LIBRARY +QT_END_NAMESPACE + #endif //QPLUGINLOADER_H |