123 const QQmlRefPointer<QV4::ExecutableCompilationUnit> &compilationUnit,
124 const QQmlRefPointer<QQmlContextData> &creationContext,
134 void beginPopulateDeferred(
const QQmlRefPointer<QQmlContextData> &
context);
135 void populateDeferredBinding(
const QQmlProperty &qmlProperty,
int deferredIndex,
137 void populateDeferredInstance(
QObject *outerObject,
int deferredIndex,
141 void finalizePopulateDeferred();
146 QQmlRefPointer<QQmlContextData>
rootContext()
const {
return sharedState->rootContext; }
153 return parentContext.contextData();
155 QFiniteStack<QQmlGuard<QObject> > &
allCreatedObjects() {
return sharedState->allCreatedObjects; }
163 const QQmlRefPointer<QQmlContextData> &
context);
167 QList<DeferredQPropertyBinding> &pendingBindings = sharedState.data()->allQPropertyBindings;
169 return deferred.properyIndex == propertyIndex && deferred.target ==
target;
175 const QQmlRefPointer<QV4::ExecutableCompilationUnit> &compilationUnit,
177 bool isContextObject);
179 void init(QQmlRefPointer<QQmlContextData> parentContext);
181 QObject *createInstance(
int index,
QObject *parent =
nullptr,
bool isContextObject =
false);
188 void populateDeferred(
QObject *instance,
int deferredIndex);
189 void populateDeferred(
QObject *instance,
int deferredIndex,
195 ApplyImmediate = 0x1,
197 ApplyAll = ApplyImmediate | ApplyDeferred,
201 void setupBindings(BindingSetupFlags
mode = BindingMode::ApplyImmediate);
204 void setupFunctions();
206 QString stringAt(
int idx)
const {
return compilationUnit->stringAt(idx); }
214 return compilationUnit->resolvedType(
id);
220 CreatingObjectsPhase2,
228 QQmlRefPointer<QV4::ExecutableCompilationUnit> compilationUnit;
231 QQmlRefPointer<QQmlContextData>
context;
233 QQmlRefPointer<QQmlObjectCreatorSharedState> sharedState;
234 bool topLevelCreator;
235 bool isContextObject;
243 int _compiledObjectIndex;
248 QQmlListProperty<void> _currentList;
254 std::vector<PendingAliasBinding> pendingAliasBindings;
256 template<
typename Functor>
257 void doPopulateDeferred(
QObject *instance,
int deferredIndex,
Functor f)
264 QObject *bindingTarget = instance;
269 QObject *scopeObject = instance;
273 QScopedValueRollback<ObjectInCreationGCAnchorList> jsObjectGuard(
274 sharedState->allJavaScriptObjects,
285 int objectIndex = deferredIndex;
286 std::swap(_compiledObjectIndex, objectIndex);
300 std::swap(_compiledObjectIndex, objectIndex);
static QT_BEGIN_NAMESPACE void init(QTextBoundaryFinder::BoundaryType type, QStringView str, QCharAttributes *attributes)
static Heap::QmlContext * create(QV4::ExecutionContext *parent, QQmlRefPointer< QQmlContextData > context, QObject *scopeObject)