aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-10-21 13:39:43 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-10-22 13:11:27 +0200
commitc0063f73e5472f770133602ea2a7c6fe77f5a1b3 (patch)
tree1c756a84849ba8fca1a7ba2b6fc812643518e55d /src/qml/qml
parentebef555f49628c247cdb1fde22ddec560c7fb852 (diff)
QmlIR: Make sure that all objects receive a location
For grouped properties, this is the location of binding now. Change-Id: I7148ba92150e3569d47c382ef78794bfa3b75fce Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml')
-rw-r--r--src/qml/qml/qqmlirloader.cpp4
-rw-r--r--src/qml/qml/qqmltypecompiler.cpp6
2 files changed, 6 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlirloader.cpp b/src/qml/qml/qqmlirloader.cpp
index fc1a3f9d91..121ac25ced 100644
--- a/src/qml/qml/qqmlirloader.cpp
+++ b/src/qml/qml/qqmlirloader.cpp
@@ -91,14 +91,14 @@ private:
QmlIR::Object *QQmlIRLoader::loadObject(const QV4::CompiledData::Object *serializedObject)
{
QmlIR::Object *object = pool->New<QmlIR::Object>();
- object->init(pool, serializedObject->inheritedTypeNameIndex, serializedObject->idNameIndex);
+ object->init(pool, serializedObject->inheritedTypeNameIndex, serializedObject->idNameIndex,
+ serializedObject->location);
object->indexOfDefaultPropertyOrAlias = serializedObject->indexOfDefaultPropertyOrAlias;
object->defaultPropertyIsAlias = serializedObject->defaultPropertyIsAlias;
object->isInlineComponent = serializedObject->flags & QV4::CompiledData::Object::IsInlineComponentRoot;
object->flags = serializedObject->flags;
object->id = serializedObject->id;
- object->location = serializedObject->location;
object->locationOfIdProperty = serializedObject->locationOfIdProperty;
QVector<int> functionIndices;
diff --git a/src/qml/qml/qqmltypecompiler.cpp b/src/qml/qml/qqmltypecompiler.cpp
index eb3b0e43ac..b885cae79c 100644
--- a/src/qml/qml/qqmltypecompiler.cpp
+++ b/src/qml/qml/qqmltypecompiler.cpp
@@ -871,8 +871,10 @@ void QQmlComponentAndAliasResolver::findAndRegisterImplicitComponents(const QmlI
compiler->addImport(componentType.module(), qualifier, componentType.version());
QmlIR::Object *syntheticComponent = pool->New<QmlIR::Object>();
- syntheticComponent->init(pool, compiler->registerString(qualifier + QLatin1Char('.') + componentType.elementName()), compiler->registerString(QString()));
- syntheticComponent->location = binding->valueLocation;
+ syntheticComponent->init(
+ pool,
+ compiler->registerString(qualifier + QLatin1Char('.') + componentType.elementName()),
+ compiler->registerString(QString()), binding->valueLocation);
syntheticComponent->flags |= QV4::CompiledData::Object::IsComponent;
if (!containsResolvedType(syntheticComponent->inheritedTypeNameIndex)) {