diff options
Diffstat (limited to 'src/qml/qml')
-rw-r--r-- | src/qml/qml/qqmlobjectcreator.cpp | 4 | ||||
-rw-r--r-- | src/qml/qml/qqmlobjectcreator_p.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp index d2e9d36d55..dfcab6181d 100644 --- a/src/qml/qml/qqmlobjectcreator.cpp +++ b/src/qml/qml/qqmlobjectcreator.cpp @@ -82,7 +82,6 @@ QQmlObjectCreator::QQmlObjectCreator(QQmlContextData *parentContext, const QQmlR , propertyCaches(&compilationUnit->propertyCaches) , sharedState(new QQmlObjectCreatorSharedState) , topLevelCreator(true) - , hadRequiredProperties(false) , incubator(incubator) { init(parentContext); @@ -94,6 +93,7 @@ QQmlObjectCreator::QQmlObjectCreator(QQmlContextData *parentContext, const QQmlR sharedState->allJavaScriptObjects = nullptr; sharedState->creationContext = creationContext; sharedState->rootContext = nullptr; + sharedState->hadRequiredProperties = false; if (auto profiler = QQmlEnginePrivate::get(engine)->profiler) { Q_QML_PROFILE_IF_ENABLED(QQmlProfilerDefinitions::ProfileCreating, profiler, @@ -1524,7 +1524,7 @@ bool QQmlObjectCreator::populateInstance(int index, QObject *instance, QObject * const QV4::CompiledData::Property* property = _compiledObject->propertiesBegin() + propertyIndex; QQmlPropertyData *propertyData = _propertyCache->property(_propertyCache->propertyOffset() + propertyIndex); if (property->isRequired) { - hadRequiredProperties = true; + sharedState->hadRequiredProperties = true; sharedState->requiredProperties.insert(propertyData, RequiredPropertyInfo {compilationUnit->stringAt(property->nameIndex), compilationUnit->finalUrl(), property->location, {}}); } diff --git a/src/qml/qml/qqmlobjectcreator_p.h b/src/qml/qml/qqmlobjectcreator_p.h index c302660799..59e236c855 100644 --- a/src/qml/qml/qqmlobjectcreator_p.h +++ b/src/qml/qml/qqmlobjectcreator_p.h @@ -101,6 +101,7 @@ struct QQmlObjectCreatorSharedState : public QSharedData QQmlVmeProfiler profiler; QRecursionNode recursionNode; RequiredProperties requiredProperties; + bool hadRequiredProperties; }; class Q_QML_PRIVATE_EXPORT QQmlObjectCreator @@ -126,7 +127,7 @@ public: QFiniteStack<QPointer<QObject> > &allCreatedObjects() { return sharedState->allCreatedObjects; } RequiredProperties &requiredProperties() {return sharedState->requiredProperties;} - bool componentHadRequiredProperties() const {return hadRequiredProperties;} + bool componentHadRequiredProperties() const {return sharedState->hadRequiredProperties;} private: QQmlObjectCreator(QQmlContextData *contextData, const QQmlRefPointer<QV4::ExecutableCompilationUnit> &compilationUnit, QQmlObjectCreatorSharedState *inheritedSharedState); @@ -173,7 +174,6 @@ private: const QQmlPropertyCacheVector *propertyCaches; QExplicitlySharedDataPointer<QQmlObjectCreatorSharedState> sharedState; bool topLevelCreator; - bool hadRequiredProperties; QQmlIncubatorPrivate *incubator; QObject *_qobject; |