From ce40ac9ed7255c36acdee69b06a7832e492c3fc8 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 22 Oct 2019 11:22:11 +0200 Subject: 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 --- src/qml/qml/qqmltypeloader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/qml/qml/qqmltypeloader.cpp') 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; -- cgit v1.2.3