aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlproperty.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2024-01-05 14:08:32 +0100
committerUlf Hermann <ulf.hermann@qt.io>2024-01-11 00:42:17 +0100
commit7a9a778604a03473b6c4ef8a481ba3cc06d48265 (patch)
tree52ba86a5f11a8dab39e194439f743f294d0ffc6f /src/qml/qml/qqmlproperty.cpp
parent5eba4080511a006d10fc86d141d3f0f5abf0b8f8 (diff)
QtQml: Remove QQmlTypeLoader from QQmlImport
The type loader belongs to the engine and we must not store it in engine-independent data structures. We do want the import cache to be stored in the type registry, though (in a separate change). Change-Id: I2828f5098b27bf1fc96852fc2bd160db44b109e7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlproperty.cpp')
-rw-r--r--src/qml/qml/qqmlproperty.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp
index bed1d951c4..bdeb478a9b 100644
--- a/src/qml/qml/qqmlproperty.cpp
+++ b/src/qml/qml/qqmlproperty.cpp
@@ -247,10 +247,11 @@ void QQmlPropertyPrivate::initProperty(QObject *obj, const QString &name,
// Types must begin with an uppercase letter (see checkRegistration()
// in qqmlmetatype.cpp for the enforcement of this).
if (typeNameCache && !pathName.isEmpty() && pathName.at(0).isUpper()) {
- QQmlTypeNameCache::Result r = typeNameCache->query(pathName);
+ QQmlEnginePrivate *enginePrivate = QQmlEnginePrivate::get(engine);
+ QQmlTypeLoader *typeLoader = QQmlTypeLoader::get(enginePrivate);
+ QQmlTypeNameCache::Result r = typeNameCache->query(pathName, typeLoader);
if (r.isValid()) {
if (r.type.isValid()) {
- QQmlEnginePrivate *enginePrivate = QQmlEnginePrivate::get(engine);
QQmlAttachedPropertiesFunc func = r.type.attachedPropertiesFunction(enginePrivate);
if (!func) return; // Not an attachable type
@@ -262,12 +263,11 @@ void QQmlPropertyPrivate::initProperty(QObject *obj, const QString &name,
// TODO: Do we really _not_ want to query the namespaced types here?
r = typeNameCache->query<QQmlTypeNameCache::QueryNamespaced::No>(
- path.at(ii), r.importNamespace);
+ path.at(ii), r.importNamespace, typeLoader);
if (!r.type.isValid())
return; // Invalid type in namespace
- QQmlEnginePrivate *enginePrivate = QQmlEnginePrivate::get(engine);
QQmlAttachedPropertiesFunc func = r.type.attachedPropertiesFunction(enginePrivate);
if (!func)
return; // Not an attachable type