diff options
author | Richard Moe Gustavsen <richard.gustavsen@digia.com> | 2014-03-11 12:51:15 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-13 10:21:42 +0100 |
commit | 6e1851de9595d7e7abe9acdc8c473e792d24c4c2 (patch) | |
tree | 9c5e4d2b6b36208b52e2bf7219c870d1c156fcee /src/qml/qml/qqmlimport_p.h | |
parent | b244fc002d4fb97abb8647ed07f6e927cf3de789 (diff) |
Static plugins: support loading static plugins from several engines
When loading dynamic plugins, we register them as loaded so that
we don't try to register their types several times if using several
engines. The same was not done for static plugins. This patch
will ensure that we follow the same logic also for static
plugins.
Task-number: QTBUG-36532
Change-Id: Icc1e089ae5d682c38b2d36bf4808f1c753c122a4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlimport_p.h')
-rw-r--r-- | src/qml/qml/qqmlimport_p.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlimport_p.h b/src/qml/qml/qqmlimport_p.h index f19f5d4f34..b19e777852 100644 --- a/src/qml/qml/qqmlimport_p.h +++ b/src/qml/qml/qqmlimport_p.h @@ -151,7 +151,7 @@ public: QQmlImportDatabase(QQmlEngine *); ~QQmlImportDatabase(); - bool importPlugin(const QString &filePath, const QString &uri, const QString &importNamespace, QList<QQmlError> *errors); + bool importDynamicPlugin(const QString &filePath, const QString &uri, const QString &importNamespace, QList<QQmlError> *errors); QStringList importPathList(PathType type = LocalOrRemote) const; void setImportPathList(const QStringList &paths); @@ -170,8 +170,10 @@ private: QString resolvePlugin(QQmlTypeLoader *typeLoader, const QString &qmldirPath, const QString &qmldirPluginPath, const QString &baseName); - bool importPlugin(QObject *instance, const QString &basePath, const QString &uri, - const QString &typeNamespace, bool initEngine, QList<QQmlError> *errors); + bool importStaticPlugin(QObject *instance, const QString &basePath, const QString &uri, + const QString &typeNamespace, QList<QQmlError> *errors); + bool registerPluginTypes(QObject *instance, const QString &basePath, + const QString &uri, const QString &typeNamespace, QList<QQmlError> *errors); struct QmldirCache { int versionMajor; |