OpenCoverage

qqmltypewrapper.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/qml/qqmltypewrapper.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6using namespace QV4;-
7-
8const QV4::VTable QQmlTypeWrapper::static_vtbl = { (std::is_same<QQmlTypeWrapper::SuperClass, Object>::value) ? nullptr : &QQmlTypeWrapper::SuperClass::static_vtbl, (sizeof(QQmlTypeWrapper::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(QQmlTypeWrapper::Data) + (QQmlTypeWrapper::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(QQmlTypeWrapper::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), QQmlTypeWrapper::IsExecutionContext, QQmlTypeWrapper::IsString, QQmlTypeWrapper::IsObject, QQmlTypeWrapper::IsFunctionObject, QQmlTypeWrapper::IsErrorObject, QQmlTypeWrapper::IsArrayData, QQmlTypeWrapper::IsStringOrSymbol, QQmlTypeWrapper::MyType, { 0, 0, 0, 0 }, "QQmlTypeWrapper", QQmlTypeWrapper::virtualDestroy, QQmlTypeWrapper::Data::markObjects, QQmlTypeWrapper::virtualIsEqualTo, QQmlTypeWrapper::virtualGet, QQmlTypeWrapper::virtualPut, QQmlTypeWrapper::virtualDeleteProperty, QQmlTypeWrapper::virtualHasProperty, QQmlTypeWrapper::virtualGetOwnProperty, QQmlTypeWrapper::virtualDefineOwnProperty, QQmlTypeWrapper::virtualIsExtensible, QQmlTypeWrapper::virtualPreventExtensions, QQmlTypeWrapper::virtualGetPrototypeOf, QQmlTypeWrapper::virtualSetPrototypeOf, QQmlTypeWrapper::virtualGetLength, QQmlTypeWrapper::virtualAdvanceIterator, QQmlTypeWrapper::virtualInstanceOf, QQmlTypeWrapper::virtualCall, QQmlTypeWrapper::virtualCallAsConstructor, };-
9const QV4::VTable QQmlScopedEnumWrapper::static_vtbl = { (std::is_same<QQmlScopedEnumWrapper::SuperClass, Object>::value) ? nullptr : &QQmlScopedEnumWrapper::SuperClass::static_vtbl, (sizeof(QQmlScopedEnumWrapper::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(QQmlScopedEnumWrapper::Data) + (QQmlScopedEnumWrapper::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(QQmlScopedEnumWrapper::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), QQmlScopedEnumWrapper::IsExecutionContext, QQmlScopedEnumWrapper::IsString, QQmlScopedEnumWrapper::IsObject, QQmlScopedEnumWrapper::IsFunctionObject, QQmlScopedEnumWrapper::IsErrorObject, QQmlScopedEnumWrapper::IsArrayData, QQmlScopedEnumWrapper::IsStringOrSymbol, QQmlScopedEnumWrapper::MyType, { 0, 0, 0, 0 }, "QQmlScopedEnumWrapper", QQmlScopedEnumWrapper::virtualDestroy, QQmlScopedEnumWrapper::Data::markObjects, QQmlScopedEnumWrapper::virtualIsEqualTo, QQmlScopedEnumWrapper::virtualGet, QQmlScopedEnumWrapper::virtualPut, QQmlScopedEnumWrapper::virtualDeleteProperty, QQmlScopedEnumWrapper::virtualHasProperty, QQmlScopedEnumWrapper::virtualGetOwnProperty, QQmlScopedEnumWrapper::virtualDefineOwnProperty, QQmlScopedEnumWrapper::virtualIsExtensible, QQmlScopedEnumWrapper::virtualPreventExtensions, QQmlScopedEnumWrapper::virtualGetPrototypeOf, QQmlScopedEnumWrapper::virtualSetPrototypeOf, QQmlScopedEnumWrapper::virtualGetLength, QQmlScopedEnumWrapper::virtualAdvanceIterator, QQmlScopedEnumWrapper::virtualInstanceOf, QQmlScopedEnumWrapper::virtualCall, QQmlScopedEnumWrapper::virtualCallAsConstructor, };-
10-
11void Heap::QQmlTypeWrapper::init()-
12{-
13 Object::init();-
14 mode = IncludeEnums;-
15 object.init();-
16}
executed 149836 times by 42 tests: end of block
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlstatemachine
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickflipable
  • tst_qquickgraphicsinfo
  • ...
149836
17-
18void Heap::QQmlTypeWrapper::destroy()-
19{-
20 QQmlType::derefHandle(typePrivate);-
21 typePrivate = nullptr;-
22 if (typeNamespace
typeNamespaceDescription
TRUEevaluated 324 times by 5 tests
Evaluated by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickscreen
FALSEevaluated 149504 times by 42 tests
Evaluated by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlstatemachine
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickflipable
  • tst_qquickgraphicsinfo
  • ...
)
324-149504
23 typeNamespace->release();
executed 324 times by 5 tests: typeNamespace->release();
Executed by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickscreen
324
24 object.destroy();-
25 Object::destroy();-
26}
executed 149828 times by 42 tests: end of block
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlstatemachine
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickflipable
  • tst_qquickgraphicsinfo
  • ...
149828
27-
28QQmlType Heap::QQmlTypeWrapper::type() const-
29{-
30 return
executed 149874 times by 42 tests: return QQmlType(typePrivate);
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlstatemachine
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickflipable
  • tst_qquickgraphicsinfo
  • ...
QQmlType(typePrivate);
executed 149874 times by 42 tests: return QQmlType(typePrivate);
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlstatemachine
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickflipable
  • tst_qquickgraphicsinfo
  • ...
149874
31}-
32-
33bool QQmlTypeWrapper::isSingleton() const-
34{-
35 return
executed 32 times by 2 tests: return d()->type().isSingleton();
Executed by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
d()->type().isSingleton();
executed 32 times by 2 tests: return d()->type().isSingleton();
Executed by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
32
36}-
37-
38QObject* QQmlTypeWrapper::singletonObject() const-
39{-
40 if (!isSingleton()
!isSingleton()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
41 return
never executed: return nullptr;
nullptr;
never executed: return nullptr;
0
42-
43 QQmlEngine *e = engine()->qmlEngine();-
44 QQmlType::SingletonInstanceInfo *siinfo = d()->type().singletonInstanceInfo();-
45 siinfo->init(e);-
46 return
never executed: return siinfo->qobjectApi(e);
siinfo->qobjectApi(e);
never executed: return siinfo->qobjectApi(e);
0
47}-
48-
49QVariant QQmlTypeWrapper::toVariant() const-
50{-
51-
52 if (!isSingleton()
!isSingleton()Description
TRUEnever evaluated
FALSEevaluated 30 times by 2 tests
Evaluated by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
)
0-30
53 return
never executed: return QVariant();
QVariant();
never executed: return QVariant();
0
54-
55 QQmlEngine *e = engine()->qmlEngine();-
56 QQmlType::SingletonInstanceInfo *siinfo = d()->type().singletonInstanceInfo();-
57 siinfo->init(e);-
58 if (QObject *qobjectSingleton = siinfo->qobjectApi(e)
QObject *qobje...>qobjectApi(e)Description
TRUEevaluated 30 times by 2 tests
Evaluated by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
FALSEnever evaluated
)
0-30
59 return
executed 30 times by 2 tests: return QVariant::fromValue<QObject*>(qobjectSingleton);
Executed by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
QVariant::fromValue<QObject*>(qobjectSingleton);
executed 30 times by 2 tests: return QVariant::fromValue<QObject*>(qobjectSingleton);
Executed by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
30
60-
61 return
never executed: return QVariant::fromValue<QJSValue>(siinfo->scriptApi(e));
QVariant::fromValue<QJSValue>(siinfo->scriptApi(e));
never executed: return QVariant::fromValue<QJSValue>(siinfo->scriptApi(e));
0
62}-
63-
64-
65-
66ReturnedValue QQmlTypeWrapper::create(QV4::ExecutionEngine *engine, QObject *o, const QQmlType &t,-
67 Heap::QQmlTypeWrapper::TypeNameMode mode)-
68{-
69 ((t.isValid()) ? static_cast<void>(0) : qt_assert("t.isValid()", __FILE__, 116));-
70 Scope scope(engine);-
71-
72 Scoped<QQmlTypeWrapper> w(scope, engine->memoryManager->allocate<QQmlTypeWrapper>());-
73 w->d()->mode = mode; w->d()->object = o;-
74 w->d()->typePrivate = t.priv();-
75 QQmlType::refHandle(w->d()->typePrivate);-
76 return
executed 149512 times by 42 tests: return w.asReturnedValue();
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlstatemachine
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickflipable
  • tst_qquickgraphicsinfo
  • ...
w.asReturnedValue();
executed 149512 times by 42 tests: return w.asReturnedValue();
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlstatemachine
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickflipable
  • tst_qquickgraphicsinfo
  • ...
149512
77}-
78-
79-
80-
81ReturnedValue QQmlTypeWrapper::create(QV4::ExecutionEngine *engine, QObject *o, const QQmlRefPointer<QQmlTypeNameCache> &t, const QQmlImportRef *importNamespace,-
82 Heap::QQmlTypeWrapper::TypeNameMode mode)-
83{-
84 ((t) ? static_cast<void>(0) : qt_assert("t", __FILE__, 131));-
85 ((importNamespace) ? static_cast<void>(0) : qt_assert("importNamespace", __FILE__, 132));-
86 Scope scope(engine);-
87-
88 Scoped<QQmlTypeWrapper> w(scope, engine->memoryManager->allocate<QQmlTypeWrapper>());-
89 w->d()->mode = mode; w->d()->object = o; w->d()->typeNamespace = t.data(); w->d()->importNamespace = importNamespace;-
90 t->addref();-
91 return
executed 324 times by 5 tests: return w.asReturnedValue();
Executed by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickscreen
w.asReturnedValue();
executed 324 times by 5 tests: return w.asReturnedValue();
Executed by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickscreen
324
92}-
93-
94static int enumForSingleton(QV4::ExecutionEngine *v4, String *name, QObject *qobjectSingleton,-
95 const QQmlType &type, bool *ok)-
96{-
97 ((ok != nullptr) ? static_cast<void>(0) : qt_assert("ok != nullptr", __FILE__, 144));-
98 int value = type.enumValue(QQmlEnginePrivate::get(v4->qmlEngine()), name, ok);-
99 if (*
*okDescription
TRUEevaluated 12 times by 2 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlmetatype
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
ok
*okDescription
TRUEevaluated 12 times by 2 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlmetatype
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
)
4-12
100 return
executed 12 times by 2 tests: return value;
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlmetatype
value;
executed 12 times by 2 tests: return value;
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlmetatype
12
101-
102-
103 QByteArray enumName = name->toQString().toUtf8();-
104 const QMetaObject *metaObject = qobjectSingleton->metaObject();-
105 for (int ii = metaObject->enumeratorCount() - 1; ii >= 0
ii >= 0Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
; --ii) {
4
106 QMetaEnum e = metaObject->enumerator(ii);-
107 value = e.keyToValue(enumName.constData(), ok);-
108 if (*
*okDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
ok
*okDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
)
0-4
109 return
never executed: return value;
value;
never executed: return value;
0
110 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qqmlecmascript
4
111 *ok = false;-
112 return
executed 4 times by 1 test: return -1;
Executed by:
  • tst_qqmlecmascript
-1;
executed 4 times by 1 test: return -1;
Executed by:
  • tst_qqmlecmascript
4
113}-
114-
115static ReturnedValue throwLowercaseEnumError(QV4::ExecutionEngine *v4, String *name, const QQmlType &type)-
116{-
117 const QString message =-
118 ([]() noexcept -> QString { enum { Size = sizeof(u"" "Cannot access enum value '%1' of '%2', enum values need to start with an uppercase letter.")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Cannot access enum value '%1' of '%2', enum values need to start with an uppercase letter." }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())-
119 .arg(name->toQString()).arg(QLatin1String(type.typeName()));-
120 return
never executed: return v4->throwTypeError(message);
v4->throwTypeError(message);
never executed: return v4->throwTypeError(message);
0
121}-
122-
123ReturnedValue QQmlTypeWrapper::virtualGet(const Managed *m, PropertyKey id, const Value *receiver, bool *hasProperty)-
124{-
125 ((m->as<QQmlTypeWrapper>()) ? static_cast<void>(0) : qt_assert("m->as<QQmlTypeWrapper>()", __FILE__, 172));-
126-
127 if (!id.isString()
!id.isString()Description
TRUEevaluated 56 times by 1 test
Evaluated by:
  • tst_qquicklayouts
FALSEevaluated 148572 times by 42 tests
Evaluated by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlstatemachine
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickflipable
  • tst_qquickgraphicsinfo
  • ...
)
56-148572
128 return
executed 56 times by 1 test: return Object::virtualGet(m, id, receiver, hasProperty);
Executed by:
  • tst_qquicklayouts
Object::virtualGet(m, id, receiver, hasProperty);
executed 56 times by 1 test: return Object::virtualGet(m, id, receiver, hasProperty);
Executed by:
  • tst_qquicklayouts
56
129-
130 QV4::ExecutionEngine *v4 = static_cast<const QQmlTypeWrapper *>(m)->engine();-
131 QV4::Scope scope(v4);-
132 ScopedString name(scope, id.asStringOrSymbol());-
133-
134 Scoped<QQmlTypeWrapper> w(scope, static_cast<const QQmlTypeWrapper *>(m));-
135-
136 if (hasProperty
hasPropertyDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEevaluated 148566 times by 42 tests
Evaluated by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlstatemachine
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickflipable
  • tst_qquickgraphicsinfo
  • ...
)
6-148566
137 *
executed 6 times by 1 test: *hasProperty = true;
Executed by:
  • tst_qqmlecmascript
hasProperty = true;
executed 6 times by 1 test: *hasProperty = true;
Executed by:
  • tst_qqmlecmascript
6
138-
139 QQmlContextData *context = v4->callingQmlContext();-
140-
141 QObject *object = w->d()->object;-
142 QQmlType type = w->d()->type();-
143-
144 if (type.isValid()
type.isValid()Description
TRUEevaluated 148248 times by 41 tests
Evaluated by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlstatemachine
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickflipable
  • tst_qquickgraphicsinfo
  • tst_qquickgridview
  • ...
FALSEevaluated 324 times by 5 tests
Evaluated by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickscreen
) {
324-148248
145-
146-
147 if (type.isSingleton()
type.isSingleton()Description
TRUEevaluated 446 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qmldiskcache
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
FALSEevaluated 147802 times by 34 tests
Evaluated by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qqmlstatemachine
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimatedimage
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickflipable
  • tst_qquickgraphicsinfo
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • ...
) {
446-147802
148 QQmlEngine *e = v4->qmlEngine();-
149 QQmlType::SingletonInstanceInfo *siinfo = type.singletonInstanceInfo();-
150 siinfo->init(e);-
151-
152 QObject *qobjectSingleton = siinfo->qobjectApi(e);-
153 if (qobjectSingleton
qobjectSingletonDescription
TRUEevaluated 418 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qmldiskcache
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
) {
28-418
154-
155-
156 const bool includeEnums = w->d()->mode == Heap::QQmlTypeWrapper::IncludeEnums;-
157 if (includeEnums
includeEnumsDescription
TRUEevaluated 418 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qmldiskcache
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
FALSEnever evaluated
&& name->startsWithUpper()
name->startsWithUpper()Description
TRUEevaluated 12 times by 2 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlmetatype
FALSEevaluated 406 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qmldiskcache
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
) {
0-418
158 bool ok = false;-
159 const int value = enumForSingleton(v4, name, qobjectSingleton, type, &ok);-
160 if (ok
okDescription
TRUEevaluated 12 times by 2 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlmetatype
FALSEnever evaluated
)
0-12
161 return
executed 12 times by 2 tests: return QV4::Primitive::fromInt32(value).asReturnedValue();
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlmetatype
QV4::Primitive::fromInt32(value).asReturnedValue();
executed 12 times by 2 tests: return QV4::Primitive::fromInt32(value).asReturnedValue();
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlmetatype
12
162 }
never executed: end of block
0
163-
164-
165 bool ok;-
166 const ReturnedValue result = QV4::QObjectWrapper::getQmlProperty(v4, context, qobjectSingleton, name, QV4::QObjectWrapper::IgnoreRevision, &ok);-
167 if (hasProperty
hasPropertyDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEevaluated 404 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qmldiskcache
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
)
2-404
168 *
executed 2 times by 1 test: *hasProperty = ok;
Executed by:
  • tst_qqmlecmascript
hasProperty = ok;
executed 2 times by 1 test: *hasProperty = ok;
Executed by:
  • tst_qqmlecmascript
2
169-
170-
171 if (!ok
!okDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEevaluated 402 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qmldiskcache
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
&& includeEnums
includeEnumsDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEnever evaluated
&& !name->startsWithUpper()
!name->startsWithUpper()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEnever evaluated
) {
0-402
172 enumForSingleton(v4, name, qobjectSingleton, type, &ok);-
173 if (ok
okDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
)
0-4
174 return
never executed: return throwLowercaseEnumError(v4, name, type);
throwLowercaseEnumError(v4, name, type);
never executed: return throwLowercaseEnumError(v4, name, type);
0
175 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qqmlecmascript
4
176-
177 return
executed 406 times by 12 tests: return result;
Executed by:
  • tst_examples
  • tst_qmldiskcache
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
result;
executed 406 times by 12 tests: return result;
Executed by:
  • tst_examples
  • tst_qmldiskcache
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlmetatype
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmltypeloader
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
406
178 } else if (!siinfo->scriptApi(e).isUndefined()
!siinfo->scrip....isUndefined()Description
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEnever evaluated
) {
0-28
179-
180 QV4::ScopedObject o(scope, QJSValuePrivate::convertedToValue(v4, siinfo->scriptApi(e)));-
181 if (!!o
!!oDescription
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEnever evaluated
)
0-28
182 return
executed 28 times by 1 test: return o->get(name);
Executed by:
  • tst_qqmlecmascript
o->get(name);
executed 28 times by 1 test: return o->get(name);
Executed by:
  • tst_qqmlecmascript
28
183 }
never executed: end of block
0
184-
185-
186-
187 }
never executed: end of block
else {
0
188-
189 if (name->startsWithUpper()
name->startsWithUpper()Description
TRUEevaluated 6166 times by 26 tests
Evaluated by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qqmlstatemachine
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimatedimage
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshadereffect
  • tst_qquicktextinput
  • ...
FALSEevaluated 141636 times by 19 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickanimations
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgraphicsinfo
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickopenglinfo
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_qquickvisualdatamodel
  • tst_scenegraph
) {
6166-141636
190 bool ok = false;-
191 int value = type.enumValue(QQmlEnginePrivate::get(v4->qmlEngine()), name, &ok);-
192 if (ok
okDescription
TRUEevaluated 6158 times by 26 tests
Evaluated by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qqmlstatemachine
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimatedimage
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshadereffect
  • tst_qquicktextinput
  • ...
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
)
8-6158
193 return
executed 6158 times by 26 tests: return QV4::Primitive::fromInt32(value).asReturnedValue();
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qqmlstatemachine
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimatedimage
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshadereffect
  • tst_qquicktextinput
  • ...
QV4::Primitive::fromInt32(value).asReturnedValue();
executed 6158 times by 26 tests: return QV4::Primitive::fromInt32(value).asReturnedValue();
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qqmlstatemachine
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimatedimage
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshadereffect
  • tst_qquicktextinput
  • ...
6158
194-
195 value = type.scopedEnumIndex(QQmlEnginePrivate::get(v4->qmlEngine()), name, &ok);-
196 if (ok
okDescription
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
) {
0-8
197 Scoped<QQmlScopedEnumWrapper> enumWrapper(scope, v4->memoryManager->allocate<QQmlScopedEnumWrapper>());-
198 enumWrapper->d()->typePrivate = type.priv();-
199 QQmlType::refHandle(enumWrapper->d()->typePrivate);-
200 enumWrapper->d()->scopeEnumIndex = value;-
201 return
never executed: return enumWrapper.asReturnedValue();
enumWrapper.asReturnedValue();
never executed: return enumWrapper.asReturnedValue();
0
202 }-
203-
204-
205-
206 }
executed 8 times by 1 test: end of block
Executed by:
  • tst_qqmlecmascript
else if (w->d()->object
w->d()->objectDescription
TRUEevaluated 141634 times by 19 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickanimations
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgraphicsinfo
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickopenglinfo
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_qquickvisualdatamodel
  • tst_scenegraph
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
) {
2-141634
207 QObject *ao = qmlAttachedPropertiesObjectById(type.attachedPropertiesId(QQmlEnginePrivate::get(v4->qmlEngine())), object);-
208 if (ao
aoDescription
TRUEevaluated 141626 times by 19 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickanimations
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgraphicsinfo
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickopenglinfo
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_qquickvisualdatamodel
  • tst_scenegraph
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
)
8-141626
209 return
executed 141626 times by 19 tests: return QV4::QObjectWrapper::getQmlProperty(v4, context, ao, name, QV4::QObjectWrapper::IgnoreRevision, hasProperty);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickanimations
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgraphicsinfo
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickopenglinfo
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_qquickvisualdatamodel
  • tst_scenegraph
QV4::QObjectWrapper::getQmlProperty(v4, context, ao, name, QV4::QObjectWrapper::IgnoreRevision, hasProperty);
executed 141626 times by 19 tests: return QV4::QObjectWrapper::getQmlProperty(v4, context, ao, name, QV4::QObjectWrapper::IgnoreRevision, hasProperty);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickanimations
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgraphicsinfo
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickopenglinfo
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_qquickvisualdatamodel
  • tst_scenegraph
141626
210-
211-
212 }
executed 8 times by 1 test: end of block
Executed by:
  • tst_qqmlecmascript
8
213-
214-
215 }
executed 18 times by 1 test: end of block
Executed by:
  • tst_qqmlecmascript
18
216-
217-
218-
219 } else if (w->d()->typeNamespace
w->d()->typeNamespaceDescription
TRUEevaluated 324 times by 5 tests
Evaluated by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickscreen
FALSEnever evaluated
) {
0-324
220 ((w->d()->importNamespace) ? static_cast<void>(0) : qt_assert("w->d()->importNamespace", __FILE__, 267));-
221 QQmlTypeNameCache::Result r = w->d()->typeNamespace->query(name, w->d()->importNamespace);-
222-
223 if (r.isValid()
r.isValid()Description
TRUEevaluated 322 times by 5 tests
Evaluated by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickscreen
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
) {
2-322
224 if (r.type.isValid()
r.type.isValid()Description
TRUEevaluated 314 times by 5 tests
Evaluated by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickscreen
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
) {
8-314
225 return
executed 314 times by 5 tests: return create(scope.engine, object, r.type, w->d()->mode);
Executed by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickscreen
create(scope.engine, object, r.type, w->d()->mode);
executed 314 times by 5 tests: return create(scope.engine, object, r.type, w->d()->mode);
Executed by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickscreen
314
226 } else if (r.scriptIndex != -1
r.scriptIndex != -1Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEnever evaluated
) {
0-8
227 QV4::ScopedObject scripts(scope, context->importedScripts.valueRef());-
228 return
executed 8 times by 1 test: return scripts->get(r.scriptIndex);
Executed by:
  • tst_qqmlecmascript
scripts->get(r.scriptIndex);
executed 8 times by 1 test: return scripts->get(r.scriptIndex);
Executed by:
  • tst_qqmlecmascript
8
229 } else if (r.importNamespace
r.importNamespaceDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
230 return
never executed: return create(scope.engine, object, context->imports, r.importNamespace);
create(scope.engine, object, context->imports, r.importNamespace);
never executed: return create(scope.engine, object, context->imports, r.importNamespace);
0
231 }-
232-
233 return
never executed: return QV4::Encode::undefined();
QV4::Encode::undefined();
never executed: return QV4::Encode::undefined();
0
234-
235 }-
236-
237-
238-
239 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qqmlecmascript
else {
2
240 ((!"Unreachable") ? static_cast<void>(0) : qt_assert("!\"Unreachable\"", __FILE__, 287));-
241 }
never executed: end of block
0
242-
243 bool ok = false;-
244 const ReturnedValue result = Object::virtualGet(m, id, receiver, &ok);-
245 if (hasProperty
hasPropertyDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
)
2-18
246 *
executed 2 times by 1 test: *hasProperty = ok;
Executed by:
  • tst_qqmlecmascript
hasProperty = ok;
executed 2 times by 1 test: *hasProperty = ok;
Executed by:
  • tst_qqmlecmascript
2
247-
248-
249 if (!ok
!okDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
&& type.isValid()
type.isValid()Description
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
&& !type.isSingleton()
!type.isSingleton()Description
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEnever evaluated
&& !name->startsWithUpper()
!name->startsWithUpper()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
) {
0-16
250 bool enumOk = false;-
251 type.enumValue(QQmlEnginePrivate::get(v4->qmlEngine()), name, &enumOk);-
252 if (enumOk
enumOkDescription
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
)
0-6
253 return
never executed: return throwLowercaseEnumError(v4, name, type);
throwLowercaseEnumError(v4, name, type);
never executed: return throwLowercaseEnumError(v4, name, type);
0
254 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_qqmlecmascript
6
255-
256 return
executed 20 times by 1 test: return result;
Executed by:
  • tst_qqmlecmascript
result;
executed 20 times by 1 test: return result;
Executed by:
  • tst_qqmlecmascript
20
257}-
258-
259-
260bool QQmlTypeWrapper::virtualPut(Managed *m, PropertyKey id, const Value &value, Value *receiver)-
261{-
262 if (!id.isString()
!id.isString()Description
TRUEnever evaluated
FALSEevaluated 1184 times by 9 tests
Evaluated by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquicklayouts
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_testfiltering
)
0-1184
263 return
never executed: return Object::virtualPut(m, id, value, receiver);
Object::virtualPut(m, id, value, receiver);
never executed: return Object::virtualPut(m, id, value, receiver);
0
264-
265-
266 ((m->as<QQmlTypeWrapper>()) ? static_cast<void>(0) : qt_assert("m->as<QQmlTypeWrapper>()", __FILE__, 313));-
267 QQmlTypeWrapper *w = static_cast<QQmlTypeWrapper *>(m);-
268 QV4::Scope scope(w);-
269 if (scope.engine->hasException
scope.engine->hasExceptionDescription
TRUEnever evaluated
FALSEevaluated 1184 times by 9 tests
Evaluated by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquicklayouts
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_testfiltering
)
0-1184
270 return
never executed: return false;
false;
never executed: return false;
0
271-
272 ScopedString name(scope, id.asStringOrSymbol());-
273 QQmlContextData *context = scope.engine->callingQmlContext();-
274-
275 QQmlType type = w->d()->type();-
276 if (type.isValid()
type.isValid()Description
TRUEevaluated 1184 times by 9 tests
Evaluated by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquicklayouts
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_testfiltering
FALSEnever evaluated
&& !type.isSingleton()
!type.isSingleton()Description
TRUEevaluated 1112 times by 5 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquicklayouts
  • tst_qquickvisualdatamodel
FALSEevaluated 72 times by 6 tests
Evaluated by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
&& w->d()->object) {
0-1184
277 QObject *object = w->d()->object;-
278 QQmlEngine *e = scope.engine->qmlEngine();-
279 QObject *ao = qmlAttachedPropertiesObjectById(type.attachedPropertiesId(QQmlEnginePrivate::get(e)), object);-
280 if (ao
aoDescription
TRUEevaluated 1112 times by 5 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquicklayouts
  • tst_qquickvisualdatamodel
FALSEnever evaluated
)
0-1112
281 return
executed 1112 times by 5 tests: return QV4::QObjectWrapper::setQmlProperty(scope.engine, context, ao, name, QV4::QObjectWrapper::IgnoreRevision, value);
Executed by:
  • tst_qqmlecmascript
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquicklayouts
  • tst_qquickvisualdatamodel
QV4::QObjectWrapper::setQmlProperty(scope.engine, context, ao, name, QV4::QObjectWrapper::IgnoreRevision, value);
executed 1112 times by 5 tests: return QV4::QObjectWrapper::setQmlProperty(scope.engine, context, ao, name, QV4::QObjectWrapper::IgnoreRevision, value);
Executed by:
  • tst_qqmlecmascript
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquicklayouts
  • tst_qquickvisualdatamodel
1112
282 return
never executed: return false;
false;
never executed: return false;
0
283 } else if (type.isSingleton()
type.isSingleton()Description
TRUEevaluated 72 times by 6 tests
Evaluated by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
FALSEnever evaluated
) {
0-72
284 QQmlEngine *e = scope.engine->qmlEngine();-
285 QQmlType::SingletonInstanceInfo *siinfo = type.singletonInstanceInfo();-
286 siinfo->init(e);-
287-
288 QObject *qobjectSingleton = siinfo->qobjectApi(e);-
289 if (qobjectSingleton
qobjectSingletonDescription
TRUEevaluated 68 times by 6 tests
Evaluated by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
) {
4-68
290 return
executed 68 times by 6 tests: return QV4::QObjectWrapper::setQmlProperty(scope.engine, context, qobjectSingleton, name, QV4::QObjectWrapper::IgnoreRevision, value);
Executed by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
QV4::QObjectWrapper::setQmlProperty(scope.engine, context, qobjectSingleton, name, QV4::QObjectWrapper::IgnoreRevision, value);
executed 68 times by 6 tests: return QV4::QObjectWrapper::setQmlProperty(scope.engine, context, qobjectSingleton, name, QV4::QObjectWrapper::IgnoreRevision, value);
Executed by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
68
291 } else if (!siinfo->scriptApi(e).isUndefined()
!siinfo->scrip....isUndefined()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEnever evaluated
) {
0-4
292 QV4::ScopedObject apiprivate(scope, QJSValuePrivate::convertedToValue(scope.engine, siinfo->scriptApi(e)));-
293 if (!apiprivate
!apiprivateDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
) {
0-4
294 QString error = QLatin1String("Cannot assign to read-only property \"") + name->toQString() + QLatin1Char('\"');-
295 scope.engine->throwError(error);-
296 return
never executed: return false;
false;
never executed: return false;
0
297 } else {-
298 return
executed 4 times by 1 test: return apiprivate->put(name, value);
Executed by:
  • tst_qqmlecmascript
apiprivate->put(name, value);
executed 4 times by 1 test: return apiprivate->put(name, value);
Executed by:
  • tst_qqmlecmascript
4
299 }-
300 }-
301 }
never executed: end of block
0
302-
303 return
never executed: return false;
false;
never executed: return false;
0
304}-
305-
306PropertyAttributes QQmlTypeWrapper::virtualGetOwnProperty(Managed *m, PropertyKey id, Property *p)-
307{-
308 if (id.isString()
id.isString()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEnever evaluated
) {
0-6
309 Scope scope(m);-
310 ScopedString n(scope, id.asStringOrSymbol());-
311-
312 bool hasProperty = false;-
313 static_cast<Object *>(m)->get(n, &hasProperty);-
314 return
executed 6 times by 1 test: return hasProperty ? Attr_Data : Attr_Invalid;
Executed by:
  • tst_qqmlecmascript
hasProperty ? Attr_Data : Attr_Invalid;
executed 6 times by 1 test: return hasProperty ? Attr_Data : Attr_Invalid;
Executed by:
  • tst_qqmlecmascript
6
315 }-
316-
317 return
never executed: return QV4::Object::virtualGetOwnProperty(m, id, p);
QV4::Object::virtualGetOwnProperty(m, id, p);
never executed: return QV4::Object::virtualGetOwnProperty(m, id, p);
0
318}-
319-
320bool QQmlTypeWrapper::virtualIsEqualTo(Managed *a, Managed *b)-
321{-
322 ((a->as<QV4::QQmlTypeWrapper>()) ? static_cast<void>(0) : qt_assert("a->as<QV4::QQmlTypeWrapper>()", __FILE__, 369));-
323 QV4::QQmlTypeWrapper *qmlTypeWrapperA = static_cast<QV4::QQmlTypeWrapper *>(a);-
324 if (QV4::QQmlTypeWrapper *qmlTypeWrapperB = b->as<QV4::QQmlTypeWrapper>()
QV4::QQmlTypeW...TypeWrapper>()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
)
2-6
325 return
executed 2 times by 1 test: return qmlTypeWrapperA->toVariant() == qmlTypeWrapperB->toVariant();
Executed by:
  • tst_qqmlecmascript
qmlTypeWrapperA->toVariant() == qmlTypeWrapperB->toVariant();
executed 2 times by 1 test: return qmlTypeWrapperA->toVariant() == qmlTypeWrapperB->toVariant();
Executed by:
  • tst_qqmlecmascript
2
326 else if (QV4::QObjectWrapper *qobjectWrapper = b->as<QV4::QObjectWrapper>()
QV4::QObjectWr...jectWrapper>()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEnever evaluated
)
0-6
327 return
executed 6 times by 1 test: return qmlTypeWrapperA->toVariant().value<QObject*>() == qobjectWrapper->object();
Executed by:
  • tst_qqmlecmascript
qmlTypeWrapperA->toVariant().value<QObject*>() == qobjectWrapper->object();
executed 6 times by 1 test: return qmlTypeWrapperA->toVariant().value<QObject*>() == qobjectWrapper->object();
Executed by:
  • tst_qqmlecmascript
6
328-
329 return
never executed: return false;
false;
never executed: return false;
0
330}-
331-
332ReturnedValue QQmlTypeWrapper::virtualInstanceOf(const Object *typeObject, const Value &var)-
333{-
334 ((typeObject->as<QV4::QQmlTypeWrapper>()) ? static_cast<void>(0) : qt_assert("typeObject->as<QV4::QQmlTypeWrapper>()", __FILE__, 381));-
335 const QV4::QQmlTypeWrapper *typeWrapper = static_cast<const QV4::QQmlTypeWrapper *>(typeObject);-
336 QV4::ExecutionEngine *engine = typeObject->internalClass()->engine;-
337 QQmlEnginePrivate *qenginepriv = QQmlEnginePrivate::get(engine->qmlEngine());-
338-
339-
340 const QObjectWrapper *wrapper = var.as<QObjectWrapper>();-
341 if (!wrapper
!wrapperDescription
TRUEnever evaluated
FALSEevaluated 56 times by 1 test
Evaluated by:
  • tst_qquicklayouts
)
0-56
342 return
never executed: return engine->throwTypeError();
engine->throwTypeError();
never executed: return engine->throwTypeError();
0
343-
344-
345 const QObject *wrapperObject = wrapper->object();-
346 if (!wrapperObject
!wrapperObjectDescription
TRUEnever evaluated
FALSEevaluated 56 times by 1 test
Evaluated by:
  • tst_qquicklayouts
)
0-56
347 return
never executed: return engine->throwTypeError();
engine->throwTypeError();
never executed: return engine->throwTypeError();
0
348-
349 const int myTypeId = typeWrapper->d()->type().typeId();-
350 QQmlMetaObject myQmlType;-
351 if (myTypeId == 0
myTypeId == 0Description
TRUEnever evaluated
FALSEevaluated 56 times by 1 test
Evaluated by:
  • tst_qquicklayouts
) {
0-56
352-
353-
354-
355 QQmlData *theirDData = QQmlData::get(wrapperObject, false);-
356 ((theirDData) ? static_cast<void>(0) : qt_assert("theirDData", __FILE__, 403));-
357 if (!theirDData->compilationUnit
!theirDData->compilationUnitDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
358 return
never executed: return Encode(false);
Encode(false);
never executed: return Encode(false);
0
359-
360 QQmlRefPointer<QQmlTypeData> td = qenginepriv->typeLoader.getType(typeWrapper->d()->type().sourceUrl());-
361 CompiledData::CompilationUnit *cu = td->compilationUnit();-
362 myQmlType = qenginepriv->metaObjectForType(cu->metaTypeId);-
363 }
never executed: end of block
else {
0
364 myQmlType = qenginepriv->metaObjectForType(myTypeId);-
365 }
executed 56 times by 1 test: end of block
Executed by:
  • tst_qquicklayouts
56
366-
367 const QMetaObject *theirType = wrapperObject->metaObject();-
368-
369 return
executed 56 times by 1 test: return QV4::Encode(QQmlMetaObject::canConvert(theirType, myQmlType));
Executed by:
  • tst_qquicklayouts
QV4::Encode(QQmlMetaObject::canConvert(theirType, myQmlType));
executed 56 times by 1 test: return QV4::Encode(QQmlMetaObject::canConvert(theirType, myQmlType));
Executed by:
  • tst_qquicklayouts
56
370}-
371-
372void Heap::QQmlScopedEnumWrapper::destroy()-
373{-
374 QQmlType::derefHandle(typePrivate);-
375 typePrivate = nullptr;-
376 Object::destroy();-
377}
never executed: end of block
0
378-
379QQmlType Heap::QQmlScopedEnumWrapper::type() const-
380{-
381 return
never executed: return QQmlType(typePrivate);
QQmlType(typePrivate);
never executed: return QQmlType(typePrivate);
0
382}-
383-
384ReturnedValue QQmlScopedEnumWrapper::virtualGet(const Managed *m, PropertyKey id, const Value *receiver, bool *hasProperty)-
385{-
386 ((m->as<QQmlScopedEnumWrapper>()) ? static_cast<void>(0) : qt_assert("m->as<QQmlScopedEnumWrapper>()", __FILE__, 433));-
387 if (!id.isString()
!id.isString()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
388 return
never executed: return Object::virtualGet(m, id, receiver, hasProperty);
Object::virtualGet(m, id, receiver, hasProperty);
never executed: return Object::virtualGet(m, id, receiver, hasProperty);
0
389-
390 const QQmlScopedEnumWrapper *resource = static_cast<const QQmlScopedEnumWrapper *>(m);-
391 QV4::ExecutionEngine *v4 = resource->engine();-
392 QV4::Scope scope(v4);-
393 ScopedString name(scope, id.asStringOrSymbol());-
394-
395 QQmlType type = resource->d()->type();-
396 int index = resource->d()->scopeEnumIndex;-
397-
398 bool ok = false;-
399 int value = type.scopedEnumValue(QQmlEnginePrivate::get(v4->qmlEngine()), index, name, &ok);-
400 if (hasProperty
hasPropertyDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
401 *
never executed: *hasProperty = ok;
hasProperty = ok;
never executed: *hasProperty = ok;
0
402 if (ok
okDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
403 return
never executed: return QV4::Primitive::fromInt32(value).asReturnedValue();
QV4::Primitive::fromInt32(value).asReturnedValue();
never executed: return QV4::Primitive::fromInt32(value).asReturnedValue();
0
404-
405 return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
0
406}-
407-
408-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0