OpenCoverage

qqmlobjectcreator_p.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/qml/qqmlobjectcreator_p.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5class QQmlAbstractBinding;-
6struct QQmlTypeCompiler;-
7class QQmlInstantiationInterrupt;-
8class QQmlIncubatorPrivate;-
9-
10struct QQmlObjectCreatorSharedState : public QSharedData-
11{-
12 QQmlContextData *rootContext;-
13 QQmlContextData *creationContext;-
14 QFiniteStack<QQmlAbstractBinding::Ptr> allCreatedBindings;-
15 QFiniteStack<QQmlParserStatus*> allParserStatusCallbacks;-
16 QFiniteStack<QPointer<QObject> > allCreatedObjects;-
17 QV4::Value *allJavaScriptObjects;-
18 QQmlComponentAttached *componentAttached;-
19 QList<QQmlEnginePrivate::FinalizeCallback> finalizeCallbacks;-
20 QQmlVmeProfiler profiler;-
21 QRecursionNode recursionNode;-
22};-
23-
24class __attribute__((visibility("default"))) QQmlObjectCreator-
25{-
26 public: static inline QString tr(const char *sourceText, const char *disambiguation = nullptr, int n = -1) { return QCoreApplication::translate("QQmlObjectCreator", sourceText, disambiguation, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *sourceText, const char *disambiguation = nullptr, int n = -1) { return QCoreApplication::translate("QQmlObjectCreator", sourceText, disambiguation, n); } private:-
27public:-
28 QQmlObjectCreator(QQmlContextData *parentContext, const QQmlRefPointer<QV4::CompiledData::CompilationUnit> &compilationUnit, QQmlContextData *creationContext, QQmlIncubatorPrivate *incubator = nullptr);-
29 ~QQmlObjectCreator();-
30-
31 QObject *create(int subComponentIndex = -1, QObject *parent = nullptr, QQmlInstantiationInterrupt *interrupt = nullptr);-
32 bool populateDeferredProperties(QObject *instance, QQmlData::DeferredData *deferredData);-
33 bool populateDeferredBinding(const QQmlProperty &qmlProperty, QQmlData::DeferredData *deferredData, const QV4::CompiledData::Binding *binding);-
34 QQmlContextData *finalize(QQmlInstantiationInterrupt &interrupt);-
35 void clear();-
36-
37 QQmlComponentAttached **componentAttachment() const { return
executed 4457 times by 59 tests: return &sharedState->componentAttached;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmoduleplugin
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlstatemachine
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • ...
&sharedState->componentAttached;
executed 4457 times by 59 tests: return &sharedState->componentAttached;
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmoduleplugin
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlstatemachine
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • ...
}
4457
38-
39 QList<QQmlEnginePrivate::FinalizeCallback> *finalizeCallbacks() const { return
never executed: return &sharedState->finalizeCallbacks;
&sharedState->finalizeCallbacks;
never executed: return &sharedState->finalizeCallbacks;
}
0
40-
41 QList<QQmlError> errors;-
42-
43 QQmlContextData *parentContextData() const { return
executed 4577 times by 11 tests: return parentContext.contextData();
Executed by:
  • tst_qqmlcomponent
  • tst_qqmlincubator
  • tst_qqmlinstantiator
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
parentContext.contextData();
executed 4577 times by 11 tests: return parentContext.contextData();
Executed by:
  • tst_qqmlcomponent
  • tst_qqmlincubator
  • tst_qqmlinstantiator
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
}
4577
44 QFiniteStack<QPointer<QObject> > &allCreatedObjects() const { return
executed 4579 times by 11 tests: return sharedState->allCreatedObjects;
Executed by:
  • tst_qqmlcomponent
  • tst_qqmlincubator
  • tst_qqmlinstantiator
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
sharedState->allCreatedObjects;
executed 4579 times by 11 tests: return sharedState->allCreatedObjects;
Executed by:
  • tst_qqmlcomponent
  • tst_qqmlincubator
  • tst_qqmlinstantiator
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
}
4579
45-
46private:-
47 QQmlObjectCreator(QQmlContextData *contextData, const QQmlRefPointer<QV4::CompiledData::CompilationUnit> &compilationUnit, QQmlObjectCreatorSharedState *inheritedSharedState);-
48-
49 void init(QQmlContextData *parentContext);-
50-
51 QObject *createInstance(int index, QObject *parent = nullptr, bool isContextObject = false);-
52-
53 bool populateInstance(int index, QObject *instance,-
54 QObject *bindingTarget, const QQmlPropertyData *valueTypeProperty);-
55-
56 void setupBindings(bool applyDeferredBindings = false);-
57 bool setPropertyBinding(const QQmlPropertyData *property, const QV4::CompiledData::Binding *binding);-
58 void setPropertyValue(const QQmlPropertyData *property, const QV4::CompiledData::Binding *binding);-
59 void setupFunctions();-
60-
61 QString stringAt(int idx) const { return
executed 124052 times by 106 tests: return qmlUnit->stringAt(idx);
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlmoduleplugin
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlstatemachine
  • ...
qmlUnit->stringAt(idx);
executed 124052 times by 106 tests: return qmlUnit->stringAt(idx);
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • tst_qqmlmoduleplugin
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlstatemachine
  • ...
}
124052
62 void recordError(const QV4::CompiledData::Location &location, const QString &description);-
63-
64 void registerObjectWithContextById(const QV4::CompiledData::Object *object, QObject *instance) const;-
65-
66 inline QV4::QmlContext *currentQmlContext();-
67 __attribute__((noinline)) void createQmlContext();-
68-
69 enum Phase {-
70 Startup,-
71 CreatingObjects,-
72 CreatingObjectsPhase2,-
73 ObjectsCreated,-
74 Finalizing,-
75 Done-
76 } phase;-
77-
78 QQmlEngine *engine;-
79 QV4::ExecutionEngine *v4;-
80 QQmlRefPointer<QV4::CompiledData::CompilationUnit> compilationUnit;-
81 const QV4::CompiledData::Unit *qmlUnit;-
82 QQmlGuardedContextData parentContext;-
83 QQmlContextData *context;-
84 const QV4::CompiledData::ResolvedTypeReferenceMap &resolvedTypes;-
85 const QQmlPropertyCacheVector *propertyCaches;-
86 QExplicitlySharedDataPointer<QQmlObjectCreatorSharedState> sharedState;-
87 bool topLevelCreator;-
88 QQmlIncubatorPrivate *incubator;-
89-
90 QObject *_qobject;-
91 QObject *_scopeObject;-
92 QObject *_bindingTarget;-
93-
94 const QQmlPropertyData *_valueTypeProperty;-
95 int _compiledObjectIndex;-
96 const QV4::CompiledData::Object *_compiledObject;-
97 QQmlData *_ddata;-
98 QQmlRefPointer<QQmlPropertyCache> _propertyCache;-
99 QQmlVMEMetaObject *_vmeMetaObject;-
100 QQmlListProperty<void> _currentList;-
101 QV4::QmlContext *_qmlContext;-
102-
103 friend struct QQmlObjectCreatorRecursionWatcher;-
104-
105 typedef std::function<bool(QQmlObjectCreatorSharedState *sharedState)> PendingAliasBinding;-
106 std::vector<PendingAliasBinding> pendingAliasBindings;-
107};-
108-
109struct QQmlObjectCreatorRecursionWatcher-
110{-
111 QQmlObjectCreatorRecursionWatcher(QQmlObjectCreator *creator);-
112-
113 bool hasRecursed() const { return
executed 1042801 times by 135 tests: return watcher.hasRecursed();
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • ...
watcher.hasRecursed();
executed 1042801 times by 135 tests: return watcher.hasRecursed();
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • ...
}
1042801
114-
115private:-
116 QExplicitlySharedDataPointer<QQmlObjectCreatorSharedState> sharedState;-
117 QRecursionWatcher<QQmlObjectCreatorSharedState, &QQmlObjectCreatorSharedState::recursionNode> watcher;-
118};-
119-
120QV4::QmlContext *QQmlObjectCreator::currentQmlContext()-
121{-
122 if (!_qmlContext->isManaged()
!_qmlContext->isManaged()Description
TRUEevaluated 427029 times by 128 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • ...
FALSEevaluated 190539 times by 85 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetatype
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • ...
)
190539-427029
123 _qmlContext->setM(QV4::QmlContext::create(v4->rootContext(), context, _scopeObject));
executed 427029 times by 128 tests: _qmlContext->setM(QV4::QmlContext::create(v4->rootContext(), context, _scopeObject));
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • ...
427029
124-
125 return
executed 617568 times by 128 tests: return _qmlContext;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • ...
_qmlContext;
executed 617568 times by 128 tests: return _qmlContext;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • ...
617568
126}-
127-
128-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0