From 024186e7d428bcd8823cf77bd51682669d73533d Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Sun, 29 Dec 2019 20:15:19 +0100 Subject: Defer loading of local qmldir files when intercepted to remote ones The qqmltypeloader test checks this case. As long as the types are actually loaded by the plugin it worked as we didn't register the module before. When the types are loaded by static type registrations in QtQuick we need to detect whether we still need to wait for a remote qmldir file to appear in order to load color providers etc. Change-Id: I7aa10903c6c23d1c9be01ee7ddafbdc696975407 Reviewed-by: Fabian Kosmale Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlimport_p.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/qml/qml/qqmlimport_p.h') diff --git a/src/qml/qml/qqmlimport_p.h b/src/qml/qml/qqmlimport_p.h index 7cf1ae61b9..1f44b22deb 100644 --- a/src/qml/qml/qqmlimport_p.h +++ b/src/qml/qml/qqmlimport_p.h @@ -163,9 +163,15 @@ public: const QString &uri, const QString &prefix, const QString &qmldirIdentifier, const QString &qmldirUrl, QList *errors); - bool locateQmldir(QQmlImportDatabase *, - const QString &uri, int vmaj, int vmin, - QString *qmldirFilePath, QString *url); + enum LocalQmldirResult { + QmldirFound, + QmldirNotFound, + QmldirInterceptedToRemote + }; + + LocalQmldirResult locateLocalQmldir( + QQmlImportDatabase *, const QString &uri, int vmaj, int vmin, + QString *qmldirFilePath, QString *url); void populateCache(QQmlTypeNameCache *cache) const; -- cgit v1.2.3