diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-10-22 11:22:11 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-11-07 16:10:50 +0100 |
commit | ce40ac9ed7255c36acdee69b06a7832e492c3fc8 (patch) | |
tree | dbe398ae0afecc181d9ab7cdabfe1f4d3fd799ef /src/qml/qml/qqmltypeloader.cpp | |
parent | 50bce248ab6ec4d1e39b85029297dc5d5d80f195 (diff) |
Register compiled-in QML types
If we compile the QML types into the main application we cannot depend
on plugin loading for triggering the registration. Rather, we need to
register them immediately.
Change-Id: I910fb13359f8b7524eafd7693c85205cb4ed4cd8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmltypeloader.cpp')
-rw-r--r-- | src/qml/qml/qqmltypeloader.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp index c2870396b0..b164f5873c 100644 --- a/src/qml/qml/qqmltypeloader.cpp +++ b/src/qml/qml/qqmltypeloader.cpp @@ -598,7 +598,8 @@ bool QQmlTypeLoader::Blob::addImport(QQmlTypeLoader::Blob::PendingImportPtr impo } } else { // Is this a module? - if (QQmlMetaType::isAnyModule(import->uri)) { + if (QQmlMetaType::isAnyModule(import->uri) + || QQmlMetaType::qmlRegisterModuleTypes(import->uri, import->majorVersion)) { if (!m_importCache.addLibraryImport(importDatabase, import->uri, import->qualifier, import->majorVersion, import->minorVersion, QString(), QString(), false, errors)) return false; |