OpenCoverage

qqmladaptormodel.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/util/qqmladaptormodel.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6class QQmlAdaptorModelEngineData : public QV8Engine::Deletable-
7{-
8public:-
9 QQmlAdaptorModelEngineData(QV4::ExecutionEngine *v4);-
10 ~QQmlAdaptorModelEngineData();-
11-
12 QV4::ExecutionEngine *v4;-
13 QV4::PersistentValue listItemProto;-
14};-
15-
16static inline QQmlAdaptorModelEngineData *engineData(QV4::ExecutionEngine *engine) { static int extensionId = -1; if (extensionId == -1
extensionId == -1Description
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickvisualdatamodel
FALSEevaluated 782 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
) { QV8Engine::registrationMutex()->lock(); if (extensionId == -1
extensionId == -1Description
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) extensionId = QV8Engine::registerExtension();
executed 4 times by 2 tests: extensionId = QV8Engine::registerExtension();
Executed by:
  • tst_examples
  • tst_qquickvisualdatamodel
QV8Engine::registrationMutex()->unlock(); }
executed 4 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickvisualdatamodel
QQmlAdaptorModelEngineData *rv = (QQmlAdaptorModelEngineData *)engine->v8Engine->extensionData(extensionId); if (!rv
!rvDescription
TRUEevaluated 8 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickvisualdatamodel
FALSEevaluated 778 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
) { rv = new QQmlAdaptorModelEngineData(engine); engine->v8Engine->setExtensionData(extensionId, rv); }
executed 8 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickvisualdatamodel
return
executed 786 times by 2 tests: return rv;
Executed by:
  • tst_examples
  • tst_qquickvisualdatamodel
rv;
executed 786 times by 2 tests: return rv;
Executed by:
  • tst_examples
  • tst_qquickvisualdatamodel
}
0-786
17-
18static QV4::ReturnedValue get_index(const QV4::FunctionObject *f, const QV4::Value *thisObject, const QV4::Value *, int)-
19{-
20 QV4::Scope scope(f);-
21 QV4::Scoped<QQmlDelegateModelItemObject> o(scope, thisObject->as<QQmlDelegateModelItemObject>());-
22 if (!o
!oDescription
TRUEnever evaluated
FALSEevaluated 2332 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
)
0-2332
23 return
never executed: return QV4::Encode(scope.engine->throwTypeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "Not a valid VisualData object")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Not a valid VisualData object" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())));
QV4::Encode(scope.engine->throwTypeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "Not a valid VisualData object")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Not a valid VisualData object" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}())));
never executed: return QV4::Encode(scope.engine->throwTypeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "Not a valid VisualData object")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Not a valid VisualData object" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())));
0
24-
25 return
executed 2332 times by 1 test: return QV4::Encode(QV4::Encode(o->d()->item->index));
Executed by:
  • tst_qquickvisualdatamodel
QV4::Encode(QV4::Encode(o->d()->item->index));
executed 2332 times by 1 test: return QV4::Encode(QV4::Encode(o->d()->item->index));
Executed by:
  • tst_qquickvisualdatamodel
2332
26}-
27-
28template <typename T, typename M> static void setModelDataType(QMetaObjectBuilder *builder, M *metaType)-
29{-
30 builder->setFlags(QMetaObjectBuilder::DynamicMetaObject);-
31 builder->setClassName(T::staticMetaObject.className());-
32 builder->setSuperClass(&T::staticMetaObject);-
33 metaType->propertyOffset = T::staticMetaObject.propertyCount();-
34 metaType->signalOffset = T::staticMetaObject.methodCount();-
35}
executed 3970 times by 12 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
3970
36-
37static void addProperty(QMetaObjectBuilder *builder, int propertyId, const QByteArray &propertyName, const QByteArray &propertyType)-
38{-
39 builder->addSignal("__" + QByteArray::number(propertyId) + "()");-
40 QMetaPropertyBuilder property = builder->addProperty(-
41 propertyName, propertyType, propertyId);-
42 property.setWritable(true);-
43}
executed 26940 times by 12 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
26940
44-
45class VDMModelDelegateDataType;-
46-
47class QQmlDMCachedModelData : public QQmlDelegateModelItem-
48{-
49public:-
50 QQmlDMCachedModelData(-
51 QQmlDelegateModelItemMetaType *metaType,-
52 VDMModelDelegateDataType *dataType,-
53 int index);-
54-
55 int metaCall(QMetaObject::Call call, int id, void **arguments);-
56-
57 virtual QVariant value(int role) const = 0;-
58 virtual void setValue(int role, const QVariant &value) = 0;-
59-
60 void setValue(const QString &role, const QVariant &value) override;-
61 bool resolveIndex(const QQmlAdaptorModel &model, int idx) override;-
62-
63 static QV4::ReturnedValue get_property(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
64 static QV4::ReturnedValue set_property(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
65-
66 VDMModelDelegateDataType *type;-
67 QVector<QVariant> cachedData;-
68};-
69-
70class VDMModelDelegateDataType-
71 : public QQmlRefCount-
72 , public QQmlAdaptorModel::Accessors-
73 , public QAbstractDynamicMetaObject-
74{-
75public:-
76 VDMModelDelegateDataType(QQmlAdaptorModel *model)-
77 : model(model)-
78 , metaObject(nullptr)-
79 , propertyCache(nullptr)-
80 , propertyOffset(0)-
81 , signalOffset(0)-
82 , hasModelData(false)-
83 {-
84 }
executed 4156 times by 12 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
4156
85-
86 ~VDMModelDelegateDataType()-
87 {-
88 if (propertyCache
propertyCacheDescription
TRUEevaluated 3930 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 210 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
)
210-3930
89 propertyCache->release();
executed 3930 times by 11 tests: propertyCache->release();
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
3930
90 free(metaObject);-
91 }
executed 4140 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
4140
92-
93 bool notify(-
94 const QQmlAdaptorModel &,-
95 const QList<QQmlDelegateModelItem *> &items,-
96 int index,-
97 int count,-
98 const QVector<int> &roles) const override-
99 {-
100 bool changed = roles.isEmpty()
roles.isEmpty()Description
TRUEevaluated 450 times by 4 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEevaluated 44 times by 4 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
&& !watchedRoles.isEmpty()
!watchedRoles.isEmpty()Description
TRUEevaluated 418 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
FALSEevaluated 32 times by 4 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
;
32-450
101 if (!changed
!changedDescription
TRUEevaluated 76 times by 5 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEevaluated 418 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
&& !watchedRoles.isEmpty()
!watchedRoles.isEmpty()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEevaluated 64 times by 5 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
&& watchedRoleIds.isEmpty()
watchedRoleIds.isEmpty()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
) {
6-418
102 QList<int> roleIds;-
103 for (const QByteArray &r : watchedRoles) {-
104 QHash<QByteArray, int>::const_iterator it = roleNames.find(r);-
105 if (it != roleNames.end()
it != roleNames.end()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
)
4-8
106 roleIds << it.value();
executed 8 times by 1 test: roleIds << it.value();
Executed by:
  • tst_qquickvisualdatamodel
8
107 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_qquickvisualdatamodel
12
108 const_cast<VDMModelDelegateDataType *>(this)->watchedRoleIds = roleIds;-
109 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_qquickvisualdatamodel
6
110-
111 QVector<int> signalIndexes;-
112 for (int i = 0; i < roles.count()
i < roles.count()Description
TRUEevaluated 52 times by 4 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEevaluated 494 times by 5 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
; ++i) {
52-494
113 const int role = roles.at(i);-
114 if (!changed
!changedDescription
TRUEevaluated 52 times by 4 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEnever evaluated
&& watchedRoleIds.contains(role)
watchedRoleIds.contains(role)Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEevaluated 44 times by 4 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
)
0-52
115 changed = true;
executed 8 times by 1 test: changed = true;
Executed by:
  • tst_qquickvisualdatamodel
8
116-
117 int propertyId = propertyRoles.indexOf(role);-
118 if (propertyId != -1
propertyId != -1Description
TRUEevaluated 52 times by 4 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEnever evaluated
)
0-52
119 signalIndexes.append(propertyId + signalOffset);
executed 52 times by 4 tests: signalIndexes.append(propertyId + signalOffset);
Executed by:
  • tst_qqmllistmodel
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
52
120 }
executed 52 times by 4 tests: end of block
Executed by:
  • tst_qqmllistmodel
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
52
121 if (roles.isEmpty()
roles.isEmpty()Description
TRUEevaluated 450 times by 4 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEevaluated 44 times by 4 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
) {
44-450
122 const int propertyRolesCount = propertyRoles.count();-
123 signalIndexes.reserve(propertyRolesCount);-
124 for (int propertyId = 0; propertyId < propertyRolesCount
propertyId < p...ertyRolesCountDescription
TRUEevaluated 3134 times by 4 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEevaluated 450 times by 4 tests
Evaluated by:
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
; ++propertyId)
450-3134
125 signalIndexes.append(propertyId + signalOffset);
executed 3134 times by 4 tests: signalIndexes.append(propertyId + signalOffset);
Executed by:
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
3134
126 }
executed 450 times by 4 tests: end of block
Executed by:
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
450
127-
128 for (int i = 0, c = items.count(); i < c
i < cDescription
TRUEevaluated 4646 times by 5 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEevaluated 494 times by 5 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
; ++i) {
494-4646
129 QQmlDelegateModelItem *item = items.at(i);-
130 const int idx = item->modelIndex();-
131 if (idx >= index
idx >= indexDescription
TRUEevaluated 3393 times by 5 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEevaluated 1253 times by 5 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
&& idx < index + count
idx < index + countDescription
TRUEevaluated 1952 times by 5 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEevaluated 1441 times by 5 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
) {
1253-3393
132 for (int i = 0; i < signalIndexes.count()
i < signalIndexes.count()Description
TRUEevaluated 13502 times by 5 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEevaluated 1952 times by 5 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
; ++i)
1952-13502
133 QMetaObject::activate(item, signalIndexes.at(i), nullptr);
executed 13502 times by 5 tests: QMetaObject::activate(item, signalIndexes.at(i), nullptr);
Executed by:
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
13502
134 }
executed 1952 times by 5 tests: end of block
Executed by:
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
1952
135 }
executed 4646 times by 5 tests: end of block
Executed by:
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
4646
136 return
executed 494 times by 5 tests: return changed;
Executed by:
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
changed;
executed 494 times by 5 tests: return changed;
Executed by:
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
494
137 }-
138-
139 void replaceWatchedRoles(-
140 QQmlAdaptorModel &,-
141 const QList<QByteArray> &oldRoles,-
142 const QList<QByteArray> &newRoles) const override-
143 {-
144 VDMModelDelegateDataType *dataType = const_cast<VDMModelDelegateDataType *>(this);-
145-
146 dataType->watchedRoleIds.clear();-
147 for (const QByteArray &oldRole : oldRoles)-
148 dataType->watchedRoles.removeOne(oldRole);
executed 24 times by 2 tests: dataType->watchedRoles.removeOne(oldRole);
Executed by:
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
24
149 dataType->watchedRoles += newRoles;-
150 }
executed 6002 times by 12 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
6002
151-
152 static QV4::ReturnedValue get_hasModelChildren(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int)-
153 {-
154 QV4::Scope scope(b);-
155 QV4::Scoped<QQmlDelegateModelItemObject> o(scope, thisObject->as<QQmlDelegateModelItemObject>());-
156 if (!o
!oDescription
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
)
0-8
157 return
never executed: return QV4::Encode(scope.engine->throwTypeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "Not a valid VisualData object")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Not a valid VisualData object" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())));
QV4::Encode(scope.engine->throwTypeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "Not a valid VisualData object")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Not a valid VisualData object" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}())));
never executed: return QV4::Encode(scope.engine->throwTypeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "Not a valid VisualData object")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Not a valid VisualData object" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())));
0
158-
159 const QQmlAdaptorModel *const model = static_cast<QQmlDMCachedModelData *>(o->d()->item)->type->model;-
160 if (o->d()->item->index >= 0
o->d()->item->index >= 0Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEnever evaluated
&& *model) {
0-8
161 const QAbstractItemModel * const aim = model->aim();-
162 return
executed 8 times by 1 test: return QV4::Encode(QV4::Encode(aim->hasChildren(aim->index(o->d()->item->index, 0, model->rootIndex))));
Executed by:
  • tst_qquickvisualdatamodel
QV4::Encode(QV4::Encode(aim->hasChildren(aim->index(o->d()->item->index, 0, model->rootIndex))));
executed 8 times by 1 test: return QV4::Encode(QV4::Encode(aim->hasChildren(aim->index(o->d()->item->index, 0, model->rootIndex))));
Executed by:
  • tst_qquickvisualdatamodel
8
163 } else {-
164 return
never executed: return QV4::Encode(QV4::Encode(false));
QV4::Encode(QV4::Encode(false));
never executed: return QV4::Encode(QV4::Encode(false));
0
165 }-
166 }-
167-
168-
169 void initializeConstructor(QQmlAdaptorModelEngineData *const data)-
170 {-
171 QV4::ExecutionEngine *v4 = data->v4;-
172 QV4::Scope scope(v4);-
173 QV4::ScopedObject proto(scope, v4->newObject());-
174 proto->defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "index")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "index" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 362 times by 2 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qquickvisualdatamodel
qstring_literal_temp;
executed 362 times by 2 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qquickvisualdatamodel
}()), get_index, nullptr);
362
175 proto->defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "hasModelChildren")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "hasModelChildren" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 362 times by 2 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qquickvisualdatamodel
qstring_literal_temp;
executed 362 times by 2 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qquickvisualdatamodel
}()), get_hasModelChildren, nullptr);
362
176 QV4::ScopedProperty p(scope);-
177-
178 typedef QHash<QByteArray, int>::const_iterator iterator;-
179 for (iterator it = roleNames.constBegin(), end = roleNames.constEnd(); it != end
it != endDescription
TRUEevaluated 936 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickvisualdatamodel
FALSEevaluated 362 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickvisualdatamodel
; ++it) {
362-936
180 const int propertyId = propertyRoles.indexOf(it.value());-
181 const QByteArray &propertyName = it.key();-
182-
183 QV4::ScopedString name(scope, v4->newString(QString::fromUtf8(propertyName)));-
184 QV4::ExecutionContext *global = v4->rootContext();-
185 QV4::ScopedFunctionObject g(scope, v4->memoryManager->allocate<QV4::IndexedBuiltinFunction>(global, propertyId, QQmlDMCachedModelData::get_property));-
186 QV4::ScopedFunctionObject s(scope, v4->memoryManager->allocate<QV4::IndexedBuiltinFunction>(global, propertyId, QQmlDMCachedModelData::set_property));-
187 p->setGetter(g);-
188 p->setSetter(s);-
189 proto->insertMember(name, p, QV4::Attr_Accessor|QV4::Attr_NotEnumerable|QV4::Attr_NotConfigurable);-
190 }
executed 936 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickvisualdatamodel
936
191 prototype.set(v4, proto);-
192 }
executed 362 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickvisualdatamodel
362
193-
194-
195-
196 void objectDestroyed(QObject *) override-
197 {-
198 release();-
199 }
executed 77952 times by 12 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
77952
200-
201 int metaCall(QObject *object, QMetaObject::Call call, int id, void **arguments) override-
202 {-
203 return
executed 234595 times by 11 tests: return static_cast<QQmlDMCachedModelData *>(object)->metaCall(call, id, arguments);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
static_cast<QQmlDMCachedModelData *>(object)->metaCall(call, id, arguments);
executed 234595 times by 11 tests: return static_cast<QQmlDMCachedModelData *>(object)->metaCall(call, id, arguments);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
234595
204 }-
205-
206 QV4::PersistentValue prototype;-
207 QList<int> propertyRoles;-
208 QList<int> watchedRoleIds;-
209 QList<QByteArray> watchedRoles;-
210 QHash<QByteArray, int> roleNames;-
211 QQmlAdaptorModel *model;-
212 QMetaObject *metaObject;-
213 QQmlPropertyCache *propertyCache;-
214 int propertyOffset;-
215 int signalOffset;-
216 bool hasModelData;-
217};-
218-
219QQmlDMCachedModelData::QQmlDMCachedModelData(-
220 QQmlDelegateModelItemMetaType *metaType, VDMModelDelegateDataType *dataType, int index)-
221 : QQmlDelegateModelItem(metaType, index)-
222 , type(dataType)-
223{-
224 if (index == -1
index == -1Description
TRUEevaluated 360 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEevaluated 77626 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
)
360-77626
225 cachedData.resize(type->hasModelData ? 1 : type->propertyRoles.count());
executed 360 times by 1 test: cachedData.resize(type->hasModelData ? 1 : type->propertyRoles.count());
Executed by:
  • tst_qquickvisualdatamodel
360
226-
227 QObjectPrivate::get(this)->metaObject = type;-
228-
229 type->addref();-
230-
231 QQmlData *qmldata = QQmlData::get(this, true);-
232 qmldata->propertyCache = dataType->propertyCache;-
233 qmldata->propertyCache->addref();-
234}
executed 77986 times by 12 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
77986
235-
236int QQmlDMCachedModelData::metaCall(QMetaObject::Call call, int id, void **arguments)-
237{-
238 if (call == QMetaObject::ReadProperty
call == QMetaO...::ReadPropertyDescription
TRUEevaluated 234549 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEevaluated 46 times by 2 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qquickvisualdatamodel
&& id >= type->propertyOffset
id >= type->propertyOffsetDescription
TRUEevaluated 234549 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) {
0-234549
239 const int propertyIndex = id - type->propertyOffset;-
240 if (index == -1
index == -1Description
TRUEevaluated 1400 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEevaluated 233149 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
) {
1400-233149
241 if (!cachedData.isEmpty()
!cachedData.isEmpty()Description
TRUEevaluated 1400 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) {
0-1400
242 *static_cast<QVariant *>(arguments[0]) = cachedData.at(-
243 type->hasModelData ? 0 : propertyIndex);-
244 }
executed 1400 times by 1 test: end of block
Executed by:
  • tst_qquickvisualdatamodel
1400
245 }
executed 1400 times by 1 test: end of block
Executed by:
  • tst_qquickvisualdatamodel
else if (*
*type->modelDescription
TRUEevaluated 233149 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEnever evaluated
type->model
*type->modelDescription
TRUEevaluated 233149 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) {
0-233149
246 *static_cast<QVariant *>(arguments[0]) = value(type->propertyRoles.at(propertyIndex));-
247 }
executed 233149 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
233149
248 return
executed 234549 times by 11 tests: return -1;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
-1;
executed 234549 times by 11 tests: return -1;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
234549
249 } else if (call == QMetaObject::WriteProperty
call == QMetaO...:WritePropertyDescription
TRUEevaluated 46 times by 2 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qquickvisualdatamodel
FALSEnever evaluated
&& id >= type->propertyOffset
id >= type->propertyOffsetDescription
TRUEevaluated 46 times by 2 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) {
0-46
250 const int propertyIndex = id - type->propertyOffset;-
251 if (index == -1
index == -1Description
TRUEevaluated 40 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qquickvisualdatamodel
) {
6-40
252 const QMetaObject *meta = metaObject();-
253 if (cachedData.count() > 1
cachedData.count() > 1Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEevaluated 32 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
) {
8-32
254 cachedData[propertyIndex] = *static_cast<QVariant *>(arguments[0]);-
255 QMetaObject::activate(this, meta, propertyIndex, nullptr);-
256 }
executed 8 times by 1 test: end of block
Executed by:
  • tst_qquickvisualdatamodel
else if (cachedData.count() == 1
cachedData.count() == 1Description
TRUEevaluated 32 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) {
0-32
257 cachedData[0] = *static_cast<QVariant *>(arguments[0]);-
258 QMetaObject::activate(this, meta, 0, nullptr);-
259 QMetaObject::activate(this, meta, 1, nullptr);-
260 }
executed 32 times by 1 test: end of block
Executed by:
  • tst_qquickvisualdatamodel
32
261 }
executed 40 times by 1 test: end of block
Executed by:
  • tst_qquickvisualdatamodel
else if (*
*type->modelDescription
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qquickvisualdatamodel
FALSEnever evaluated
type->model
*type->modelDescription
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) {
0-40
262 setValue(type->propertyRoles.at(propertyIndex), *static_cast<QVariant *>(arguments[0]));-
263 }
executed 6 times by 2 tests: end of block
Executed by:
  • tst_qqmllistmodel
  • tst_qquickvisualdatamodel
6
264 return
executed 46 times by 2 tests: return -1;
Executed by:
  • tst_qqmllistmodel
  • tst_qquickvisualdatamodel
-1;
executed 46 times by 2 tests: return -1;
Executed by:
  • tst_qqmllistmodel
  • tst_qquickvisualdatamodel
46
265 } else {-
266 return
never executed: return qt_metacall(call, id, arguments);
qt_metacall(call, id, arguments);
never executed: return qt_metacall(call, id, arguments);
0
267 }-
268}-
269-
270void QQmlDMCachedModelData::setValue(const QString &role, const QVariant &value)-
271{-
272 QHash<QByteArray, int>::iterator it = type->roleNames.find(role.toUtf8());-
273 if (it != type->roleNames.end()
it != type->roleNames.end()Description
TRUEevaluated 352 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
) {
8-352
274 for (int i = 0; i < type->propertyRoles.count()
i < type->prop...yRoles.count()Description
TRUEevaluated 440 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEnever evaluated
; ++i) {
0-440
275 if (type->propertyRoles.at(i) == *it
type->property...s.at(i) == *itDescription
TRUEevaluated 352 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEevaluated 88 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
) {
88-352
276 cachedData[i] = value;-
277 return;
executed 352 times by 1 test: return;
Executed by:
  • tst_qquickvisualdatamodel
352
278 }-
279 }
executed 88 times by 1 test: end of block
Executed by:
  • tst_qquickvisualdatamodel
88
280 }
never executed: end of block
0
281}
executed 8 times by 1 test: end of block
Executed by:
  • tst_qquickvisualdatamodel
8
282-
283bool QQmlDMCachedModelData::resolveIndex(const QQmlAdaptorModel &, int idx)-
284{-
285 if (index == -1
index == -1Description
TRUEevaluated 120 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) {
0-120
286 ((idx >= 0) ? static_cast<void>(0) : qt_assert("idx >= 0", __FILE__, 332));-
287 cachedData.clear();-
288 setModelIndex(idx);-
289 const QMetaObject *meta = metaObject();-
290 const int propertyCount = type->propertyRoles.count();-
291 for (int i = 0; i < propertyCount
i < propertyCountDescription
TRUEevaluated 288 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEevaluated 120 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
; ++i)
120-288
292 QMetaObject::activate(this, meta, i, nullptr);
executed 288 times by 1 test: QMetaObject::activate(this, meta, i, nullptr);
Executed by:
  • tst_qquickvisualdatamodel
288
293 return
executed 120 times by 1 test: return true;
Executed by:
  • tst_qquickvisualdatamodel
true;
executed 120 times by 1 test: return true;
Executed by:
  • tst_qquickvisualdatamodel
120
294 } else {-
295 return
never executed: return false;
false;
never executed: return false;
0
296 }-
297}-
298-
299QV4::ReturnedValue QQmlDMCachedModelData::get_property(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int)-
300{-
301 QV4::Scope scope(b);-
302 QV4::Scoped<QQmlDelegateModelItemObject> o(scope, thisObject->as<QQmlDelegateModelItemObject>());-
303 if (!o
!oDescription
TRUEnever evaluated
FALSEevaluated 2588 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickvisualdatamodel
)
0-2588
304 return
never executed: return scope.engine->throwTypeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "Not a valid VisualData object")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Not a valid VisualData object" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));
scope.engine->throwTypeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "Not a valid VisualData object")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Not a valid VisualData object" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()));
never executed: return scope.engine->throwTypeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "Not a valid VisualData object")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Not a valid VisualData object" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));
0
305-
306 uint propertyId = static_cast<const QV4::IndexedBuiltinFunction *>(b)->d()->index;-
307-
308 QQmlDMCachedModelData *modelData = static_cast<QQmlDMCachedModelData *>(o->d()->item);-
309 if (o->d()->item->index == -1
o->d()->item->index == -1Description
TRUEevaluated 236 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEevaluated 2352 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickvisualdatamodel
) {
236-2352
310 if (!modelData->cachedData.isEmpty()
!modelData->ca...Data.isEmpty()Description
TRUEevaluated 236 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) {
0-236
311 return
executed 236 times by 1 test: return scope.engine->fromVariant( modelData->cachedData.at(modelData->type->hasModelData ? 0 : propertyId));
Executed by:
  • tst_qquickvisualdatamodel
scope.engine->fromVariant(
executed 236 times by 1 test: return scope.engine->fromVariant( modelData->cachedData.at(modelData->type->hasModelData ? 0 : propertyId));
Executed by:
  • tst_qquickvisualdatamodel
236
312 modelData->cachedData.at(modelData->type->hasModelData ? 0 : propertyId));
executed 236 times by 1 test: return scope.engine->fromVariant( modelData->cachedData.at(modelData->type->hasModelData ? 0 : propertyId));
Executed by:
  • tst_qquickvisualdatamodel
236
313 }-
314 }
never executed: end of block
else if (*
*modelData->type->modelDescription
TRUEevaluated 2352 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickvisualdatamodel
FALSEnever evaluated
modelData->type->model
*modelData->type->modelDescription
TRUEevaluated 2352 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) {
0-2352
315 return
executed 2352 times by 2 tests: return scope.engine->fromVariant( modelData->value(modelData->type->propertyRoles.at(propertyId)));
Executed by:
  • tst_examples
  • tst_qquickvisualdatamodel
scope.engine->fromVariant(
executed 2352 times by 2 tests: return scope.engine->fromVariant( modelData->value(modelData->type->propertyRoles.at(propertyId)));
Executed by:
  • tst_examples
  • tst_qquickvisualdatamodel
2352
316 modelData->value(modelData->type->propertyRoles.at(propertyId)));
executed 2352 times by 2 tests: return scope.engine->fromVariant( modelData->value(modelData->type->propertyRoles.at(propertyId)));
Executed by:
  • tst_examples
  • tst_qquickvisualdatamodel
2352
317 }-
318 return
never executed: return QV4::Encode::undefined();
QV4::Encode::undefined();
never executed: return QV4::Encode::undefined();
0
319}-
320-
321QV4::ReturnedValue QQmlDMCachedModelData::set_property(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)-
322{-
323 QV4::Scope scope(b);-
324 QV4::Scoped<QQmlDelegateModelItemObject> o(scope, thisObject->as<QQmlDelegateModelItemObject>());-
325 if (!o
!oDescription
TRUEnever evaluated
FALSEevaluated 32 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
)
0-32
326 return
never executed: return scope.engine->throwTypeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "Not a valid VisualData object")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Not a valid VisualData object" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));
scope.engine->throwTypeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "Not a valid VisualData object")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Not a valid VisualData object" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()));
never executed: return scope.engine->throwTypeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "Not a valid VisualData object")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Not a valid VisualData object" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));
0
327 if (!argc
!argcDescription
TRUEnever evaluated
FALSEevaluated 32 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
)
0-32
328 return
never executed: return scope.engine->throwTypeError();
scope.engine->throwTypeError();
never executed: return scope.engine->throwTypeError();
0
329-
330 uint propertyId = static_cast<const QV4::IndexedBuiltinFunction *>(b)->d()->index;-
331-
332 if (o->d()->item->index == -1
o->d()->item->index == -1Description
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
) {
12-20
333 QQmlDMCachedModelData *modelData = static_cast<QQmlDMCachedModelData *>(o->d()->item);-
334 if (!modelData->cachedData.isEmpty()
!modelData->ca...Data.isEmpty()Description
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) {
0-20
335 if (modelData->cachedData.count() > 1
modelData->cac...ta.count() > 1Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
) {
4-16
336 modelData->cachedData[propertyId] = scope.engine->toVariant(argv[0], QVariant::Invalid);-
337 QMetaObject::activate(o->d()->item, o->d()->item->metaObject(), propertyId, nullptr);-
338 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickvisualdatamodel
else if (modelData->cachedData.count() == 1
modelData->cac...a.count() == 1Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) {
0-16
339 modelData->cachedData[0] = scope.engine->toVariant(argv[0], QVariant::Invalid);-
340 QMetaObject::activate(o->d()->item, o->d()->item->metaObject(), 0, nullptr);-
341 QMetaObject::activate(o->d()->item, o->d()->item->metaObject(), 1, nullptr);-
342 }
executed 16 times by 1 test: end of block
Executed by:
  • tst_qquickvisualdatamodel
16
343 }
executed 20 times by 1 test: end of block
Executed by:
  • tst_qquickvisualdatamodel
20
344 }
executed 20 times by 1 test: end of block
Executed by:
  • tst_qquickvisualdatamodel
20
345 return
executed 32 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_qquickvisualdatamodel
QV4::Encode::undefined();
executed 32 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_qquickvisualdatamodel
32
346}-
347-
348-
349-
350-
351-
352class QQmlDMAbstractItemModelData : public QQmlDMCachedModelData-
353{-
354 public:-
355#pragma GCC diagnostic push-
356 -
357#pragma GCC diagnostic ignored "-Wsuggest-override"-
358 static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private:-
359#pragma GCC diagnostic ignored "-Wattributes"-
360 __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);-
361#pragma GCC diagnostic pop-
362 struct QPrivateSignal {};-
363 -
364-
365public:-
366 QQmlDMAbstractItemModelData(-
367 QQmlDelegateModelItemMetaType *metaType,-
368 VDMModelDelegateDataType *dataType,-
369 int index)-
370 : QQmlDMCachedModelData(metaType, dataType, index)-
371 {-
372 }
executed 77986 times by 12 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
77986
373-
374 bool hasModelChildren() const-
375 {-
376 if (index >= 0
index >= 0Description
TRUEevaluated 34 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEnever evaluated
&& *type->model) {
0-34
377 const QAbstractItemModel * const model = type->model->aim();-
378 return
executed 34 times by 1 test: return model->hasChildren(model->index(row, column, type->model->rootIndex));
Executed by:
  • tst_qquickvisualdatamodel
model->hasChildren(model->index(row, column, type->model->rootIndex));
executed 34 times by 1 test: return model->hasChildren(model->index(row, column, type->model->rootIndex));
Executed by:
  • tst_qquickvisualdatamodel
34
379 } else {-
380 return
never executed: return false;
false;
never executed: return false;
0
381 }-
382 }-
383-
384 QVariant value(int role) const override-
385 {-
386 return
executed 235501 times by 11 tests: return type->model->aim()->index(row, column, type->model->rootIndex).data(role);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
type->model->aim()->index(row, column, type->model->rootIndex).data(role);
executed 235501 times by 11 tests: return type->model->aim()->index(row, column, type->model->rootIndex).data(role);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
235501
387 }-
388-
389 void setValue(int role, const QVariant &value) override-
390 {-
391 type->model->aim()->setData(-
392 type->model->aim()->index(row, column, type->model->rootIndex), value, role);-
393 }
executed 6 times by 2 tests: end of block
Executed by:
  • tst_qqmllistmodel
  • tst_qquickvisualdatamodel
6
394-
395 QV4::ReturnedValue get() override-
396 {-
397 if (type->prototype.isUndefined()
type->prototype.isUndefined()Description
TRUEevaluated 362 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickvisualdatamodel
FALSEevaluated 4394 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickvisualdatamodel
) {
362-4394
398 QQmlAdaptorModelEngineData * const data = engineData(v4);-
399 type->initializeConstructor(data);-
400 }
executed 362 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickvisualdatamodel
362
401 QV4::Scope scope(v4);-
402 QV4::ScopedObject proto(scope, type->prototype.value());-
403 QV4::ScopedObject o(scope, proto->engine()->memoryManager->allocate<QQmlDelegateModelItemObject>(this));-
404 o->setPrototypeOf(proto);-
405 ++scriptRef;-
406 return
executed 4756 times by 2 tests: return o.asReturnedValue();
Executed by:
  • tst_examples
  • tst_qquickvisualdatamodel
o.asReturnedValue();
executed 4756 times by 2 tests: return o.asReturnedValue();
Executed by:
  • tst_examples
  • tst_qquickvisualdatamodel
4756
407 }-
408};-
409-
410class VDMAbstractItemModelDataType : public VDMModelDelegateDataType-
411{-
412public:-
413 VDMAbstractItemModelDataType(QQmlAdaptorModel *model)-
414 : VDMModelDelegateDataType(model)-
415 {-
416 }
executed 4156 times by 12 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
4156
417-
418 int rowCount(const QQmlAdaptorModel &model) const override-
419 {-
420 return
executed 259434 times by 12 tests: return model.aim()->rowCount(model.rootIndex);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
model.aim()->rowCount(model.rootIndex);
executed 259434 times by 12 tests: return model.aim()->rowCount(model.rootIndex);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
259434
421 }-
422-
423 int columnCount(const QQmlAdaptorModel &model) const override-
424 {-
425 return
never executed: return model.aim()->columnCount(model.rootIndex);
model.aim()->columnCount(model.rootIndex);
never executed: return model.aim()->columnCount(model.rootIndex);
0
426 }-
427-
428 void cleanup(QQmlAdaptorModel &model, QQmlDelegateModel *vdm) const override-
429 {-
430 QAbstractItemModel * const aim = model.aim();-
431 if (aim
aimDescription
TRUEevaluated 70 times by 6 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEevaluated 4080 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
&& vdm
vdmDescription
TRUEevaluated 70 times by 6 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) {
0-4080
432 QObject::disconnect(aim, qFlagLocation("2""rowsInserted(QModelIndex,int,int)" "\0" __FILE__ ":" "470"),-
433 vdm, qFlagLocation("1""_q_rowsInserted(QModelIndex,int,int)" "\0" __FILE__ ":" "471"));-
434 QObject::disconnect(aim, qFlagLocation("2""rowsAboutToBeRemoved(QModelIndex,int,int)" "\0" __FILE__ ":" "472"),-
435 vdm, qFlagLocation("1""_q_rowsAboutToBeRemoved(QModelIndex,int,int)" "\0" __FILE__ ":" "473"));-
436 QObject::disconnect(aim, qFlagLocation("2""rowsRemoved(QModelIndex,int,int)" "\0" __FILE__ ":" "474"),-
437 vdm, qFlagLocation("1""_q_rowsRemoved(QModelIndex,int,int)" "\0" __FILE__ ":" "475"));-
438 QObject::disconnect(aim, qFlagLocation("2""dataChanged(QModelIndex,QModelIndex,QVector<int>)" "\0" __FILE__ ":" "476"),-
439 vdm, qFlagLocation("1""_q_dataChanged(QModelIndex,QModelIndex,QVector<int>)" "\0" __FILE__ ":" "477"));-
440 QObject::disconnect(aim, qFlagLocation("2""rowsMoved(QModelIndex,int,int,QModelIndex,int)" "\0" __FILE__ ":" "478"),-
441 vdm, qFlagLocation("1""_q_rowsMoved(QModelIndex,int,int,QModelIndex,int)" "\0" __FILE__ ":" "479"));-
442 QObject::disconnect(aim, qFlagLocation("2""modelReset()" "\0" __FILE__ ":" "480"),-
443 vdm, qFlagLocation("1""_q_modelReset()" "\0" __FILE__ ":" "481"));-
444 QObject::disconnect(aim, qFlagLocation("2""layoutChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)" "\0" __FILE__ ":" "482"),-
445 vdm, qFlagLocation("1""_q_layoutChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)" "\0" __FILE__ ":" "483"));-
446 }
executed 70 times by 6 tests: end of block
Executed by:
  • tst_qqmlecmascript
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
70
447-
448 const_cast<VDMAbstractItemModelDataType *>(this)->release();-
449 }
executed 4150 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
4150
450-
451 QVariant value(const QQmlAdaptorModel &model, int index, const QString &role) const override-
452 {-
453 QHash<QByteArray, int>::const_iterator it = roleNames.find(role.toUtf8());-
454 if (it != roleNames.end()
it != roleNames.end()Description
TRUEevaluated 7278 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
) {
8-7278
455 return
executed 7278 times by 3 tests: return model.aim()->index(model.rowAt(index), model.columnAt(index), model.rootIndex).data(*it);
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
model.aim()->index(model.rowAt(index), model.columnAt(index), model.rootIndex).data(*it);
executed 7278 times by 3 tests: return model.aim()->index(model.rowAt(index), model.columnAt(index), model.rootIndex).data(*it);
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
7278
456 } else if (role == QLatin1String("hasModelChildren")
role == QLatin...odelChildren")Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) {
0-8
457 return
executed 8 times by 1 test: return QVariant(model.aim()->hasChildren(model.aim()->index(model.rowAt(index), model.columnAt(index), model.rootIndex)));
Executed by:
  • tst_qquickvisualdatamodel
QVariant(model.aim()->hasChildren(model.aim()->index(model.rowAt(index), model.columnAt(index), model.rootIndex)));
executed 8 times by 1 test: return QVariant(model.aim()->hasChildren(model.aim()->index(model.rowAt(index), model.columnAt(index), model.rootIndex)));
Executed by:
  • tst_qquickvisualdatamodel
8
458 } else {-
459 return
never executed: return QVariant();
QVariant();
never executed: return QVariant();
0
460 }-
461 }-
462-
463 QVariant parentModelIndex(const QQmlAdaptorModel &model) const override-
464 {-
465 return
executed 2 times by 1 test: return model ? QVariant::fromValue(model.aim()->parent(model.rootIndex)) : QVariant();
Executed by:
  • tst_qquickvisualdatamodel
model
executed 2 times by 1 test: return model ? QVariant::fromValue(model.aim()->parent(model.rootIndex)) : QVariant();
Executed by:
  • tst_qquickvisualdatamodel
2
466 ? QVariant::fromValue(model.aim()->parent(model.rootIndex))
executed 2 times by 1 test: return model ? QVariant::fromValue(model.aim()->parent(model.rootIndex)) : QVariant();
Executed by:
  • tst_qquickvisualdatamodel
2
467 : QVariant();
executed 2 times by 1 test: return model ? QVariant::fromValue(model.aim()->parent(model.rootIndex)) : QVariant();
Executed by:
  • tst_qquickvisualdatamodel
2
468 }-
469-
470 QVariant modelIndex(const QQmlAdaptorModel &model, int index) const override-
471 {-
472 return
executed 6 times by 2 tests: return model ? QVariant::fromValue(model.aim()->index(model.rowAt(index), model.columnAt(index), model.rootIndex)) : QVariant();
Executed by:
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
model
executed 6 times by 2 tests: return model ? QVariant::fromValue(model.aim()->index(model.rowAt(index), model.columnAt(index), model.rootIndex)) : QVariant();
Executed by:
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
6
473 ? QVariant::fromValue(model.aim()->index(model.rowAt(index), model.columnAt(index), model.rootIndex))
executed 6 times by 2 tests: return model ? QVariant::fromValue(model.aim()->index(model.rowAt(index), model.columnAt(index), model.rootIndex)) : QVariant();
Executed by:
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
6
474 : QVariant();
executed 6 times by 2 tests: return model ? QVariant::fromValue(model.aim()->index(model.rowAt(index), model.columnAt(index), model.rootIndex)) : QVariant();
Executed by:
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
6
475 }-
476-
477 bool canFetchMore(const QQmlAdaptorModel &model) const override-
478 {-
479 return
executed 11513 times by 12 tests: return model && model.aim()->canFetchMore(model.rootIndex);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
model && model.aim()->canFetchMore(model.rootIndex);
executed 11513 times by 12 tests: return model && model.aim()->canFetchMore(model.rootIndex);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
11513
480 }-
481-
482 void fetchMore(QQmlAdaptorModel &model) const override-
483 {-
484 if (model
modelDescription
TRUEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquicklistview
FALSEnever evaluated
)
0-18
485 model.aim()->fetchMore(model.rootIndex);
executed 18 times by 1 test: model.aim()->fetchMore(model.rootIndex);
Executed by:
  • tst_qquicklistview
18
486 }
executed 18 times by 1 test: end of block
Executed by:
  • tst_qquicklistview
18
487-
488 QQmlDelegateModelItem *createItem(-
489 QQmlAdaptorModel &model,-
490 QQmlDelegateModelItemMetaType *metaType,-
491 int index) const override-
492 {-
493 VDMAbstractItemModelDataType *dataType = const_cast<VDMAbstractItemModelDataType *>(this);-
494 if (!metaObject
!metaObjectDescription
TRUEevaluated 3946 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 74040 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
)
3946-74040
495 dataType->initializeMetaType(model);
executed 3946 times by 12 tests: dataType->initializeMetaType(model);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
3946
496 return
executed 77986 times by 12 tests: return new QQmlDMAbstractItemModelData(metaType, dataType, index);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
new QQmlDMAbstractItemModelData(metaType, dataType, index);
executed 77986 times by 12 tests: return new QQmlDMAbstractItemModelData(metaType, dataType, index);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
77986
497 }-
498-
499 void initializeMetaType(QQmlAdaptorModel &model)-
500 {-
501 QMetaObjectBuilder builder;-
502 setModelDataType<QQmlDMAbstractItemModelData>(&builder, this);-
503-
504 const QByteArray propertyType = ([]() -> QByteArray { enum { Size = sizeof("QVariant") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "QVariant" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
executed 3946 times by 12 tests: return ba;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
ba;
executed 3946 times by 12 tests: return ba;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
}());
3946
505 const QHash<int, QByteArray> names = model.aim()->roleNames();-
506 for (QHash<int, QByteArray>::const_iterator it = names.begin(), cend = names.end(); it != cend
it != cendDescription
TRUEevaluated 26316 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 3946 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
; ++it) {
3946-26316
507 const int propertyId = propertyRoles.count();-
508 propertyRoles.append(it.key());-
509 roleNames.insert(it.value(), it.key());-
510 addProperty(&builder, propertyId, it.value(), propertyType);-
511 }
executed 26316 times by 12 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
26316
512 if (propertyRoles.count() == 1
propertyRoles.count() == 1Description
TRUEevaluated 624 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 3322 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
) {
624-3322
513 hasModelData = true;-
514 const int role = names.begin().key();-
515 const QByteArray propertyName = ([]() -> QByteArray { enum { Size = sizeof("modelData") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "modelData" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
executed 624 times by 10 tests: return ba;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
ba;
executed 624 times by 10 tests: return ba;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
}());
624
516-
517 propertyRoles.append(role);-
518 roleNames.insert(propertyName, role);-
519 addProperty(&builder, 1, propertyName, propertyType);-
520 }
executed 624 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
624
521-
522 metaObject = builder.toMetaObject();-
523 *static_cast<QMetaObject *>(this) = *metaObject;-
524 propertyCache = new QQmlPropertyCache(metaObject);-
525 }
executed 3946 times by 12 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
3946
526};-
527-
528-
529-
530-
531-
532class QQmlDMListAccessorData : public QQmlDelegateModelItem-
533{-
534 public:-
535#pragma GCC diagnostic push-
536 -
537#pragma GCC diagnostic ignored "-Wsuggest-override"-
538 static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private:-
539#pragma GCC diagnostic ignored "-Wattributes"-
540 __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);-
541#pragma GCC diagnostic pop-
542 struct QPrivateSignal {};-
543 -
544public:-
545 QQmlDMListAccessorData(QQmlDelegateModelItemMetaType *metaType, int index, const QVariant &value)-
546 : QQmlDelegateModelItem(metaType, index)-
547 , cachedData(value)-
548 {-
549 }
executed 9985 times by 22 tests: end of block
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickvisualdatamodel
  • tst_scenegraph
9985
550-
551 QVariant modelData() const-
552 {-
553 return
executed 5750 times by 7 tests: return cachedData;
Executed by:
  • tst_examples
  • tst_qqmlinstantiator
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickvisualdatamodel
cachedData;
executed 5750 times by 7 tests: return cachedData;
Executed by:
  • tst_examples
  • tst_qqmlinstantiator
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickvisualdatamodel
5750
554 }-
555-
556 void setModelData(const QVariant &data)-
557 {-
558 if (index == -1
index == -1Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
&& data != cachedData
data != cachedDataDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) {
0-12
559 cachedData = data;-
560 modelDataChanged();-
561 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_qquickvisualdatamodel
12
562 }
executed 16 times by 1 test: end of block
Executed by:
  • tst_qquickvisualdatamodel
16
563-
564 static QV4::ReturnedValue get_modelData(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int)-
565 {-
566 QV4::ExecutionEngine *v4 = b->engine();-
567 const QQmlDelegateModelItemObject *o = thisObject->as<QQmlDelegateModelItemObject>();-
568 if (!o
!oDescription
TRUEnever evaluated
FALSEevaluated 208 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
)
0-208
569 return
never executed: return v4->throwTypeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "Not a valid VisualData object")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Not a valid VisualData object" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));
v4->throwTypeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "Not a valid VisualData object")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Not a valid VisualData object" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()));
never executed: return v4->throwTypeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "Not a valid VisualData object")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Not a valid VisualData object" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));
0
570-
571 return
executed 208 times by 1 test: return v4->fromVariant(static_cast<QQmlDMListAccessorData *>(o->d()->item)->cachedData);
Executed by:
  • tst_qquickvisualdatamodel
v4->fromVariant(static_cast<QQmlDMListAccessorData *>(o->d()->item)->cachedData);
executed 208 times by 1 test: return v4->fromVariant(static_cast<QQmlDMListAccessorData *>(o->d()->item)->cachedData);
Executed by:
  • tst_qquickvisualdatamodel
208
572 }-
573-
574 static QV4::ReturnedValue set_modelData(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)-
575 {-
576 QV4::ExecutionEngine *v4 = b->engine();-
577 const QQmlDelegateModelItemObject *o = thisObject->as<QQmlDelegateModelItemObject>();-
578 if (!o
!oDescription
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
)
0-8
579 return
never executed: return v4->throwTypeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "Not a valid VisualData object")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Not a valid VisualData object" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));
v4->throwTypeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "Not a valid VisualData object")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Not a valid VisualData object" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()));
never executed: return v4->throwTypeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "Not a valid VisualData object")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Not a valid VisualData object" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));
0
580 if (!argc
!argcDescription
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
)
0-8
581 return
never executed: return v4->throwTypeError();
v4->throwTypeError();
never executed: return v4->throwTypeError();
0
582-
583 static_cast<QQmlDMListAccessorData *>(o->d()->item)->setModelData(v4->toVariant(argv[0], QVariant::Invalid));-
584 return
executed 8 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_qquickvisualdatamodel
QV4::Encode::undefined();
executed 8 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_qquickvisualdatamodel
8
585 }-
586-
587 QV4::ReturnedValue get() override-
588 {-
589 QQmlAdaptorModelEngineData *data = engineData(v4);-
590 QV4::Scope scope(v4);-
591 QV4::ScopedObject o(scope, v4->memoryManager->allocate<QQmlDelegateModelItemObject>(this));-
592 QV4::ScopedObject p(scope, data->listItemProto.value());-
593 o->setPrototypeOf(p);-
594 ++scriptRef;-
595 return
executed 424 times by 1 test: return o.asReturnedValue();
Executed by:
  • tst_qquickvisualdatamodel
o.asReturnedValue();
executed 424 times by 1 test: return o.asReturnedValue();
Executed by:
  • tst_qquickvisualdatamodel
424
596 }-
597-
598 void setValue(const QString &role, const QVariant &value) override-
599 {-
600 if (role == QLatin1String("modelData")
role == QLatin...g("modelData")Description
TRUEevaluated 44 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEnever evaluated
)
0-44
601 cachedData = value;
executed 44 times by 1 test: cachedData = value;
Executed by:
  • tst_qquickvisualdatamodel
44
602 }
executed 44 times by 1 test: end of block
Executed by:
  • tst_qquickvisualdatamodel
44
603-
604 bool resolveIndex(const QQmlAdaptorModel &model, int idx) override-
605 {-
606 if (index == -1
index == -1Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) {
0-12
607 index = idx;-
608 cachedData = model.list.at(idx);-
609 modelIndexChanged();-
610 modelDataChanged();-
611 return
executed 12 times by 1 test: return true;
Executed by:
  • tst_qquickvisualdatamodel
true;
executed 12 times by 1 test: return true;
Executed by:
  • tst_qquickvisualdatamodel
12
612 } else {-
613 return
never executed: return false;
false;
never executed: return false;
0
614 }-
615 }-
616-
617-
618public :-
619 void modelDataChanged();-
620-
621private:-
622 QVariant cachedData;-
623};-
624-
625-
626class VDMListDelegateDataType : public QQmlAdaptorModel::Accessors-
627{-
628public:-
629 inline VDMListDelegateDataType() {}-
630-
631 int rowCount(const QQmlAdaptorModel &model) const override-
632 {-
633 return
executed 20760 times by 22 tests: return model.list.count();
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickvisualdatamodel
  • tst_scenegraph
model.list.count();
executed 20760 times by 22 tests: return model.list.count();
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickvisualdatamodel
  • tst_scenegraph
20760
634 }-
635-
636 int columnCount(const QQmlAdaptorModel &) const override-
637 {-
638 return
never executed: return 1;
1;
never executed: return 1;
0
639 }-
640-
641 QVariant value(const QQmlAdaptorModel &model, int index, const QString &role) const override-
642 {-
643 return
executed 102 times by 1 test: return role == QLatin1String("modelData") ? model.list.at(index) : QVariant();
Executed by:
  • tst_qquicklistview
role == QLatin1String("modelData")
executed 102 times by 1 test: return role == QLatin1String("modelData") ? model.list.at(index) : QVariant();
Executed by:
  • tst_qquicklistview
102
644 ? model.list.at(index)
executed 102 times by 1 test: return role == QLatin1String("modelData") ? model.list.at(index) : QVariant();
Executed by:
  • tst_qquicklistview
102
645 : QVariant();
executed 102 times by 1 test: return role == QLatin1String("modelData") ? model.list.at(index) : QVariant();
Executed by:
  • tst_qquicklistview
102
646 }-
647-
648 QQmlDelegateModelItem *createItem(-
649 QQmlAdaptorModel &model,-
650 QQmlDelegateModelItemMetaType *metaType,-
651 int index) const override-
652 {-
653 return
executed 9985 times by 22 tests: return new QQmlDMListAccessorData( metaType, index, index >= 0 && index < model.list.count() ? model.list.at(index) : QVariant());
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickvisualdatamodel
  • tst_scenegraph
new QQmlDMListAccessorData(
executed 9985 times by 22 tests: return new QQmlDMListAccessorData( metaType, index, index >= 0 && index < model.list.count() ? model.list.at(index) : QVariant());
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickvisualdatamodel
  • tst_scenegraph
9985
654 metaType,
executed 9985 times by 22 tests: return new QQmlDMListAccessorData( metaType, index, index >= 0 && index < model.list.count() ? model.list.at(index) : QVariant());
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickvisualdatamodel
  • tst_scenegraph
9985
655 index,
executed 9985 times by 22 tests: return new QQmlDMListAccessorData( metaType, index, index >= 0 && index < model.list.count() ? model.list.at(index) : QVariant());
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickvisualdatamodel
  • tst_scenegraph
9985
656 index >= 0 && index < model.list.count() ? model.list.at(index) : QVariant());
executed 9985 times by 22 tests: return new QQmlDMListAccessorData( metaType, index, index >= 0 && index < model.list.count() ? model.list.at(index) : QVariant());
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickvisualdatamodel
  • tst_scenegraph
9985
657 }-
658};-
659-
660-
661-
662-
663-
664class VDMObjectDelegateDataType;-
665class QQmlDMObjectData : public QQmlDelegateModelItem, public QQmlAdaptorModelProxyInterface-
666{-
667 public:-
668#pragma GCC diagnostic push-
669 -
670#pragma GCC diagnostic ignored "-Wsuggest-override"-
671 static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private:-
672#pragma GCC diagnostic ignored "-Wattributes"-
673 __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);-
674#pragma GCC diagnostic pop-
675 struct QPrivateSignal {};-
676 -
677 -
678public:-
679 QQmlDMObjectData(-
680 QQmlDelegateModelItemMetaType *metaType,-
681 VDMObjectDelegateDataType *dataType,-
682 int index,-
683 QObject *object);-
684-
685 QObject *modelData() const { return
executed 454 times by 3 tests: return object;
Executed by:
  • tst_examples
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
object;
executed 454 times by 3 tests: return object;
Executed by:
  • tst_examples
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
}
454
686 QObject *proxiedObject() override { return
executed 472 times by 3 tests: return object;
Executed by:
  • tst_examples
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
object;
executed 472 times by 3 tests: return object;
Executed by:
  • tst_examples
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
}
472
687-
688 QPointer<QObject> object;-
689};-
690-
691class VDMObjectDelegateDataType : public QQmlRefCount, public QQmlAdaptorModel::Accessors-
692{-
693public:-
694 QMetaObject *metaObject;-
695 int propertyOffset;-
696 int signalOffset;-
697 bool shared;-
698 QMetaObjectBuilder builder;-
699-
700 VDMObjectDelegateDataType()-
701 : metaObject(nullptr)-
702 , propertyOffset(0)-
703 , signalOffset(0)-
704 , shared(true)-
705 {-
706 }
executed 24 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
24
707-
708 VDMObjectDelegateDataType(const VDMObjectDelegateDataType &type)-
709 : QQmlRefCount()-
710 , QQmlAdaptorModel::Accessors()-
711 , metaObject(nullptr)-
712 , propertyOffset(type.propertyOffset)-
713 , signalOffset(type.signalOffset)-
714 , shared(false)-
715 , builder(type.metaObject, QMetaObjectBuilder::Properties-
716 | QMetaObjectBuilder::Signals-
717 | QMetaObjectBuilder::SuperClass-
718 | QMetaObjectBuilder::ClassName)-
719 {-
720 builder.setFlags(QMetaObjectBuilder::DynamicMetaObject);-
721 }
executed 66 times by 1 test: end of block
Executed by:
  • tst_qquickvisualdatamodel
66
722-
723 ~VDMObjectDelegateDataType()-
724 {-
725 free(metaObject);-
726 }
executed 90 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
90
727-
728 int rowCount(const QQmlAdaptorModel &model) const override-
729 {-
730 return
executed 968 times by 3 tests: return model.list.count();
Executed by:
  • tst_examples
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
model.list.count();
executed 968 times by 3 tests: return model.list.count();
Executed by:
  • tst_examples
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
968
731 }-
732-
733 int columnCount(const QQmlAdaptorModel &) const override-
734 {-
735 return
never executed: return 1;
1;
never executed: return 1;
0
736 }-
737-
738 QVariant value(const QQmlAdaptorModel &model, int index, const QString &role) const override-
739 {-
740 if (QObject *object = model.list.at(index).value<QObject *>()
QObject *objec...e<QObject *>()Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEnever evaluated
)
0-24
741 return
executed 24 times by 1 test: return object->property(role.toUtf8());
Executed by:
  • tst_qquickvisualdatamodel
object->property(role.toUtf8());
executed 24 times by 1 test: return object->property(role.toUtf8());
Executed by:
  • tst_qquickvisualdatamodel
24
742 return
never executed: return QVariant();
QVariant();
never executed: return QVariant();
0
743 }-
744-
745 QQmlDelegateModelItem *createItem(-
746 QQmlAdaptorModel &model,-
747 QQmlDelegateModelItemMetaType *metaType,-
748 int index) const override-
749 {-
750 VDMObjectDelegateDataType *dataType = const_cast<VDMObjectDelegateDataType *>(this);-
751 if (!metaObject
!metaObjectDescription
TRUEevaluated 24 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEevaluated 460 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
)
24-460
752 dataType->initializeMetaType(model);
executed 24 times by 3 tests: dataType->initializeMetaType(model);
Executed by:
  • tst_examples
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
24
753 return
executed 484 times by 3 tests: return index >= 0 && index < model.list.count() ? new QQmlDMObjectData(metaType, dataType, index, qvariant_cast<QObject *>(model.list.at(index))) : nullptr;
Executed by:
  • tst_examples
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
index >= 0 && index < model.list.count()
executed 484 times by 3 tests: return index >= 0 && index < model.list.count() ? new QQmlDMObjectData(metaType, dataType, index, qvariant_cast<QObject *>(model.list.at(index))) : nullptr;
Executed by:
  • tst_examples
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
484
754 ? new QQmlDMObjectData(metaType, dataType, index, qvariant_cast<QObject *>(model.list.at(index)))
executed 484 times by 3 tests: return index >= 0 && index < model.list.count() ? new QQmlDMObjectData(metaType, dataType, index, qvariant_cast<QObject *>(model.list.at(index))) : nullptr;
Executed by:
  • tst_examples
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
484
755 : nullptr;
executed 484 times by 3 tests: return index >= 0 && index < model.list.count() ? new QQmlDMObjectData(metaType, dataType, index, qvariant_cast<QObject *>(model.list.at(index))) : nullptr;
Executed by:
  • tst_examples
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
484
756 }-
757-
758 void initializeMetaType(QQmlAdaptorModel &)-
759 {-
760 setModelDataType<QQmlDMObjectData>(&builder, this);-
761-
762 metaObject = builder.toMetaObject();-
763 }
executed 24 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
24
764-
765 void cleanup(QQmlAdaptorModel &, QQmlDelegateModel *) const override-
766 {-
767 const_cast<VDMObjectDelegateDataType *>(this)->release();-
768 }
executed 24 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
24
769};-
770-
771class QQmlDMObjectDataMetaObject : public QAbstractDynamicMetaObject-
772{-
773public:-
774 QQmlDMObjectDataMetaObject(QQmlDMObjectData *data, VDMObjectDelegateDataType *type)-
775 : m_data(data)-
776 , m_type(type)-
777 {-
778 QObjectPrivate *op = QObjectPrivate::get(m_data);-
779 *static_cast<QMetaObject *>(this) = *type->metaObject;-
780 op->metaObject = this;-
781 m_type->addref();-
782 }
executed 472 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
472
783-
784 ~QQmlDMObjectDataMetaObject()-
785 {-
786 m_type->release();-
787 }
executed 472 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
472
788-
789 int metaCall(QObject *o, QMetaObject::Call call, int id, void **arguments) override-
790 {-
791 ((o == m_data) ? static_cast<void>(0) : qt_assert("o == m_data", __FILE__, 813));-
792 (void)o;;-
793-
794 static const int objectPropertyOffset = QObject::staticMetaObject.propertyCount();-
795 if (id >= m_type->propertyOffset
id >= m_type->propertyOffsetDescription
TRUEevaluated 118 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEevaluated 1314 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
118-1314
796 && (call == QMetaObject::ReadProperty
call == QMetaO...::ReadPropertyDescription
TRUEevaluated 116 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
2-116
797 || call == QMetaObject::WriteProperty
call == QMetaO...:WritePropertyDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
0-2
798 || call == QMetaObject::ResetProperty
call == QMetaO...:ResetPropertyDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
)) {
0-2
799 if (m_data->object
m_data->objectDescription
TRUEevaluated 116 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEnever evaluated
)
0-116
800 QMetaObject::metacall(m_data->object, call, id - m_type->propertyOffset + objectPropertyOffset, arguments);
executed 116 times by 1 test: QMetaObject::metacall(m_data->object, call, id - m_type->propertyOffset + objectPropertyOffset, arguments);
Executed by:
  • tst_qquickvisualdatamodel
116
801 return
executed 116 times by 1 test: return -1;
Executed by:
  • tst_qquickvisualdatamodel
-1;
executed 116 times by 1 test: return -1;
Executed by:
  • tst_qquickvisualdatamodel
116
802 } else if (id >= m_type->signalOffset
id >= m_type->signalOffsetDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEevaluated 1314 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
&& call == QMetaObject::InvokeMetaMethod
call == QMetaO...vokeMetaMethodDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) {
0-1314
803 QMetaObject::activate(m_data, this, id - m_type->signalOffset, nullptr);-
804 return
executed 2 times by 1 test: return -1;
Executed by:
  • tst_qquickvisualdatamodel
-1;
executed 2 times by 1 test: return -1;
Executed by:
  • tst_qquickvisualdatamodel
2
805 } else {-
806 return
executed 1314 times by 3 tests: return m_data->qt_metacall(call, id, arguments);
Executed by:
  • tst_examples
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
m_data->qt_metacall(call, id, arguments);
executed 1314 times by 3 tests: return m_data->qt_metacall(call, id, arguments);
Executed by:
  • tst_examples
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
1314
807 }-
808 }-
809-
810 int createProperty(const char *name, const char *) override-
811 {-
812 if (!m_data->object
!m_data->objectDescription
TRUEnever evaluated
FALSEevaluated 466 times by 2 tests
Evaluated by:
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
)
0-466
813 return
never executed: return -1;
-1;
never executed: return -1;
0
814 const QMetaObject *metaObject = m_data->object->metaObject();-
815 static const int objectPropertyOffset = QObject::staticMetaObject.propertyCount();-
816-
817 const int previousPropertyCount = propertyCount() - propertyOffset();-
818 int propertyIndex = metaObject->indexOfProperty(name);-
819 if (propertyIndex == -1
propertyIndex == -1Description
TRUEevaluated 400 times by 1 test
Evaluated by:
  • tst_qquickrepeater
FALSEevaluated 66 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
)
66-400
820 return
executed 400 times by 1 test: return -1;
Executed by:
  • tst_qquickrepeater
-1;
executed 400 times by 1 test: return -1;
Executed by:
  • tst_qquickrepeater
400
821 if (previousPropertyCount + objectPropertyOffset == metaObject->propertyCount()
previousProper...ropertyCount()Description
TRUEnever evaluated
FALSEevaluated 66 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
)
0-66
822 return
never executed: return propertyIndex + m_type->propertyOffset - objectPropertyOffset;
propertyIndex + m_type->propertyOffset - objectPropertyOffset;
never executed: return propertyIndex + m_type->propertyOffset - objectPropertyOffset;
0
823-
824 if (m_type->shared
m_type->sharedDescription
TRUEevaluated 66 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) {
0-66
825 VDMObjectDelegateDataType *type = m_type;-
826 m_type = new VDMObjectDelegateDataType(*m_type);-
827 type->release();-
828 }
executed 66 times by 1 test: end of block
Executed by:
  • tst_qquickvisualdatamodel
66
829-
830 const int previousMethodCount = methodCount();-
831 int notifierId = previousMethodCount - methodOffset();-
832 for (int propertyId = previousPropertyCount; propertyId < metaObject->propertyCount() - objectPropertyOffset
propertyId < m...PropertyOffsetDescription
TRUEevaluated 198 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEevaluated 66 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
; ++propertyId) {
66-198
833 QMetaProperty property = metaObject->property(propertyId + objectPropertyOffset);-
834 QMetaPropertyBuilder propertyBuilder;-
835 if (property.hasNotifySignal()
property.hasNotifySignal()Description
TRUEevaluated 132 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEevaluated 66 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
) {
66-132
836 m_type->builder.addSignal("__" + QByteArray::number(propertyId) + "()");-
837 propertyBuilder = m_type->builder.addProperty(property.name(), property.typeName(), notifierId);-
838 ++notifierId;-
839 }
executed 132 times by 1 test: end of block
Executed by:
  • tst_qquickvisualdatamodel
else {
132
840 propertyBuilder = m_type->builder.addProperty(property.name(), property.typeName());-
841 }
executed 66 times by 1 test: end of block
Executed by:
  • tst_qquickvisualdatamodel
66
842 propertyBuilder.setWritable(property.isWritable());-
843 propertyBuilder.setResettable(property.isResettable());-
844 propertyBuilder.setConstant(property.isConstant());-
845 }
executed 198 times by 1 test: end of block
Executed by:
  • tst_qquickvisualdatamodel
198
846-
847 if (m_type->metaObject
m_type->metaObjectDescription
TRUEnever evaluated
FALSEevaluated 66 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
)
0-66
848 free(m_type->metaObject);
never executed: free(m_type->metaObject);
0
849 m_type->metaObject = m_type->builder.toMetaObject();-
850 *static_cast<QMetaObject *>(this) = *m_type->metaObject;-
851-
852 notifierId = previousMethodCount;-
853 for (int i = previousPropertyCount; i < metaObject->propertyCount() - objectPropertyOffset
i < metaObject...PropertyOffsetDescription
TRUEevaluated 198 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEevaluated 66 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
; ++i) {
66-198
854 QMetaProperty property = metaObject->property(i + objectPropertyOffset);-
855 if (property.hasNotifySignal()
property.hasNotifySignal()Description
TRUEevaluated 132 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
FALSEevaluated 66 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
) {
66-132
856 QQmlPropertyPrivate::connect(-
857 m_data->object, property.notifySignalIndex(), m_data, notifierId);-
858 ++notifierId;-
859 }
executed 132 times by 1 test: end of block
Executed by:
  • tst_qquickvisualdatamodel
132
860 }
executed 198 times by 1 test: end of block
Executed by:
  • tst_qquickvisualdatamodel
198
861 return
executed 66 times by 1 test: return propertyIndex + m_type->propertyOffset - objectPropertyOffset;
Executed by:
  • tst_qquickvisualdatamodel
propertyIndex + m_type->propertyOffset - objectPropertyOffset;
executed 66 times by 1 test: return propertyIndex + m_type->propertyOffset - objectPropertyOffset;
Executed by:
  • tst_qquickvisualdatamodel
66
862 }-
863-
864 QQmlDMObjectData *m_data;-
865 VDMObjectDelegateDataType *m_type;-
866};-
867-
868QQmlDMObjectData::QQmlDMObjectData(-
869 QQmlDelegateModelItemMetaType *metaType,-
870 VDMObjectDelegateDataType *dataType,-
871 int index,-
872 QObject *object)-
873 : QQmlDelegateModelItem(metaType, index)-
874 , object(object)-
875{-
876 new QQmlDMObjectDataMetaObject(this, dataType);-
877}
executed 472 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
472
878-
879-
880-
881-
882-
883static const QQmlAdaptorModel::Accessors qt_vdm_null_accessors;-
884static const VDMListDelegateDataType qt_vdm_list_accessors;-
885-
886QQmlAdaptorModel::Accessors::~Accessors()-
887{-
888}-
889-
890QQmlAdaptorModel::QQmlAdaptorModel()-
891 : accessors(&qt_vdm_null_accessors)-
892{-
893}
executed 5622 times by 27 tests: end of block
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • ...
5622
894-
895QQmlAdaptorModel::~QQmlAdaptorModel()-
896{-
897 accessors->cleanup(*this);-
898}
executed 5556 times by 25 tests: end of block
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_qtqmlmodules
  • tst_scenegraph
5556
899-
900void QQmlAdaptorModel::setModel(const QVariant &variant, QQmlDelegateModel *vdm, QQmlEngine *engine)-
901{-
902 accessors->cleanup(*this, vdm);-
903-
904 list.setList(variant, engine);-
905-
906 if (QObject *object = qvariant_cast<QObject *>(list.list())
QObject *objec...>(list.list())Description
TRUEevaluated 4158 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 1324 times by 22 tests
Evaluated by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickvisualdatamodel
  • tst_scenegraph
) {
1324-4158
907 setObject(object, vdm);-
908 if (QAbstractItemModel *model = qobject_cast<QAbstractItemModel *>(object)
QAbstractItemM...del *>(object)Description
TRUEevaluated 4156 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickvisualdatamodel
) {
2-4156
909 accessors = new VDMAbstractItemModelDataType(this);-
910-
911 { QAbstractItemModel *sender = (model); QQmlDelegateModel *receiver = (vdm); const char *signal = (qFlagLocation("2""rowsInserted(QModelIndex,int,int)" "\0" __FILE__ ":" "934")); const char *method = (qFlagLocation("1""_q_rowsInserted(QModelIndex,int,int)" "\0" __FILE__ ":" "934")); static int signalIdx = -1; static int methodIdx = -1; if (signalIdx < 0
signalIdx < 0Description
TRUEevaluated 24 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 4132 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
) { ((((int)(*signal) - '0') == 2) ? static_cast<void>(0) : qt_assert("((int)(*signal) - '0') == QSIGNAL_CODE",
24-4132
912 __FILE__-
913 ,-
914 934-
915 )); signalIdx = QAbstractItemModel::staticMetaObject.indexOfSignal(signal+1); }
executed 24 times by 12 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
if (methodIdx < 0
methodIdx < 0Description
TRUEevaluated 24 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 4132 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
) { int code = ((int)(*method) - '0'); ((code == 1 || code == 2) ? static_cast<void>(0) : qt_assert("code == QSLOT_CODE || code == QSIGNAL_CODE",
24-4132
916 __FILE__-
917 ,-
918 934-
919 )); if (code == 1
code == 1Description
TRUEevaluated 24 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) methodIdx = QQmlDelegateModel::staticMetaObject.indexOfSlot(method+1);
executed 24 times by 12 tests: methodIdx = QQmlDelegateModel::staticMetaObject.indexOfSlot(method+1);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
else methodIdx = QQmlDelegateModel::staticMetaObject.indexOfSignal(method+1);
never executed: methodIdx = QQmlDelegateModel::staticMetaObject.indexOfSignal(method+1);
} ((signalIdx != -1 && methodIdx != -1) ? static_cast<void>(0) : qt_assert("signalIdx != -1 && methodIdx != -1",
0-24
920 __FILE__-
921 ,-
922 934-
923 )); QMetaObject::connect(sender, signalIdx, receiver, methodIdx, Qt::DirectConnection); }-
924 ;-
925 { QAbstractItemModel *sender = (model); QQmlDelegateModel *receiver = (vdm); const char *signal = (qFlagLocation("2""rowsRemoved(QModelIndex,int,int)" "\0" __FILE__ ":" "936")); const char *method = (qFlagLocation("1""_q_rowsRemoved(QModelIndex,int,int)" "\0" __FILE__ ":" "936")); static int signalIdx = -1; static int methodIdx = -1; if (signalIdx < 0
signalIdx < 0Description
TRUEevaluated 24 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 4132 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
) { ((((int)(*signal) - '0') == 2) ? static_cast<void>(0) : qt_assert("((int)(*signal) - '0') == QSIGNAL_CODE",
24-4132
926 __FILE__-
927 ,-
928 936-
929 )); signalIdx = QAbstractItemModel::staticMetaObject.indexOfSignal(signal+1); }
executed 24 times by 12 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
if (methodIdx < 0
methodIdx < 0Description
TRUEevaluated 24 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 4132 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
) { int code = ((int)(*method) - '0'); ((code == 1 || code == 2) ? static_cast<void>(0) : qt_assert("code == QSLOT_CODE || code == QSIGNAL_CODE",
24-4132
930 __FILE__-
931 ,-
932 936-
933 )); if (code == 1
code == 1Description
TRUEevaluated 24 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) methodIdx = QQmlDelegateModel::staticMetaObject.indexOfSlot(method+1);
executed 24 times by 12 tests: methodIdx = QQmlDelegateModel::staticMetaObject.indexOfSlot(method+1);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
else methodIdx = QQmlDelegateModel::staticMetaObject.indexOfSignal(method+1);
never executed: methodIdx = QQmlDelegateModel::staticMetaObject.indexOfSignal(method+1);
} ((signalIdx != -1 && methodIdx != -1) ? static_cast<void>(0) : qt_assert("signalIdx != -1 && methodIdx != -1",
0-24
934 __FILE__-
935 ,-
936 936-
937 )); QMetaObject::connect(sender, signalIdx, receiver, methodIdx, Qt::DirectConnection); }-
938 ;-
939 { QAbstractItemModel *sender = (model); QQmlDelegateModel *receiver = (vdm); const char *signal = (qFlagLocation("2""rowsAboutToBeRemoved(QModelIndex,int,int)" "\0" __FILE__ ":" "938")); const char *method = (qFlagLocation("1""_q_rowsAboutToBeRemoved(QModelIndex,int,int)" "\0" __FILE__ ":" "938")); static int signalIdx = -1; static int methodIdx = -1; if (signalIdx < 0
signalIdx < 0Description
TRUEevaluated 24 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 4132 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
) { ((((int)(*signal) - '0') == 2) ? static_cast<void>(0) : qt_assert("((int)(*signal) - '0') == QSIGNAL_CODE",
24-4132
940 __FILE__-
941 ,-
942 938-
943 )); signalIdx = QAbstractItemModel::staticMetaObject.indexOfSignal(signal+1); }
executed 24 times by 12 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
if (methodIdx < 0
methodIdx < 0Description
TRUEevaluated 24 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 4132 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
) { int code = ((int)(*method) - '0'); ((code == 1 || code == 2) ? static_cast<void>(0) : qt_assert("code == QSLOT_CODE || code == QSIGNAL_CODE",
24-4132
944 __FILE__-
945 ,-
946 938-
947 )); if (code == 1
code == 1Description
TRUEevaluated 24 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) methodIdx = QQmlDelegateModel::staticMetaObject.indexOfSlot(method+1);
executed 24 times by 12 tests: methodIdx = QQmlDelegateModel::staticMetaObject.indexOfSlot(method+1);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
else methodIdx = QQmlDelegateModel::staticMetaObject.indexOfSignal(method+1);
never executed: methodIdx = QQmlDelegateModel::staticMetaObject.indexOfSignal(method+1);
} ((signalIdx != -1 && methodIdx != -1) ? static_cast<void>(0) : qt_assert("signalIdx != -1 && methodIdx != -1",
0-24
948 __FILE__-
949 ,-
950 938-
951 )); QMetaObject::connect(sender, signalIdx, receiver, methodIdx, Qt::DirectConnection); }-
952 ;-
953 { QAbstractItemModel *sender = (model); QQmlDelegateModel *receiver = (vdm); const char *signal = (qFlagLocation("2""dataChanged(QModelIndex,QModelIndex,QVector<int>)" "\0" __FILE__ ":" "940")); const char *method = (qFlagLocation("1""_q_dataChanged(QModelIndex,QModelIndex,QVector<int>)" "\0" __FILE__ ":" "940")); static int signalIdx = -1; static int methodIdx = -1; if (signalIdx < 0
signalIdx < 0Description
TRUEevaluated 24 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 4132 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
) { ((((int)(*signal) - '0') == 2) ? static_cast<void>(0) : qt_assert("((int)(*signal) - '0') == QSIGNAL_CODE",
24-4132
954 __FILE__-
955 ,-
956 940-
957 )); signalIdx = QAbstractItemModel::staticMetaObject.indexOfSignal(signal+1); }
executed 24 times by 12 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
if (methodIdx < 0
methodIdx < 0Description
TRUEevaluated 24 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 4132 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
) { int code = ((int)(*method) - '0'); ((code == 1 || code == 2) ? static_cast<void>(0) : qt_assert("code == QSLOT_CODE || code == QSIGNAL_CODE",
24-4132
958 __FILE__-
959 ,-
960 940-
961 )); if (code == 1
code == 1Description
TRUEevaluated 24 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) methodIdx = QQmlDelegateModel::staticMetaObject.indexOfSlot(method+1);
executed 24 times by 12 tests: methodIdx = QQmlDelegateModel::staticMetaObject.indexOfSlot(method+1);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
else methodIdx = QQmlDelegateModel::staticMetaObject.indexOfSignal(method+1);
never executed: methodIdx = QQmlDelegateModel::staticMetaObject.indexOfSignal(method+1);
} ((signalIdx != -1 && methodIdx != -1) ? static_cast<void>(0) : qt_assert("signalIdx != -1 && methodIdx != -1",
0-24
962 __FILE__-
963 ,-
964 940-
965 )); QMetaObject::connect(sender, signalIdx, receiver, methodIdx, Qt::DirectConnection); }-
966 ;-
967 { QAbstractItemModel *sender = (model); QQmlDelegateModel *receiver = (vdm); const char *signal = (qFlagLocation("2""rowsMoved(QModelIndex,int,int,QModelIndex,int)" "\0" __FILE__ ":" "942")); const char *method = (qFlagLocation("1""_q_rowsMoved(QModelIndex,int,int,QModelIndex,int)" "\0" __FILE__ ":" "942")); static int signalIdx = -1; static int methodIdx = -1; if (signalIdx < 0
signalIdx < 0Description
TRUEevaluated 24 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 4132 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
) { ((((int)(*signal) - '0') == 2) ? static_cast<void>(0) : qt_assert("((int)(*signal) - '0') == QSIGNAL_CODE",
24-4132
968 __FILE__-
969 ,-
970 942-
971 )); signalIdx = QAbstractItemModel::staticMetaObject.indexOfSignal(signal+1); }
executed 24 times by 12 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
if (methodIdx < 0
methodIdx < 0Description
TRUEevaluated 24 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 4132 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
) { int code = ((int)(*method) - '0'); ((code == 1 || code == 2) ? static_cast<void>(0) : qt_assert("code == QSLOT_CODE || code == QSIGNAL_CODE",
24-4132
972 __FILE__-
973 ,-
974 942-
975 )); if (code == 1
code == 1Description
TRUEevaluated 24 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) methodIdx = QQmlDelegateModel::staticMetaObject.indexOfSlot(method+1);
executed 24 times by 12 tests: methodIdx = QQmlDelegateModel::staticMetaObject.indexOfSlot(method+1);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
else methodIdx = QQmlDelegateModel::staticMetaObject.indexOfSignal(method+1);
never executed: methodIdx = QQmlDelegateModel::staticMetaObject.indexOfSignal(method+1);
} ((signalIdx != -1 && methodIdx != -1) ? static_cast<void>(0) : qt_assert("signalIdx != -1 && methodIdx != -1",
0-24
976 __FILE__-
977 ,-
978 942-
979 )); QMetaObject::connect(sender, signalIdx, receiver, methodIdx, Qt::DirectConnection); }-
980 ;-
981 { QAbstractItemModel *sender = (model); QQmlDelegateModel *receiver = (vdm); const char *signal = (qFlagLocation("2""modelReset()" "\0" __FILE__ ":" "944")); const char *method = (qFlagLocation("1""_q_modelReset()" "\0" __FILE__ ":" "944")); static int signalIdx = -1; static int methodIdx = -1; if (signalIdx < 0
signalIdx < 0Description
TRUEevaluated 24 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 4132 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
) { ((((int)(*signal) - '0') == 2) ? static_cast<void>(0) : qt_assert("((int)(*signal) - '0') == QSIGNAL_CODE",
24-4132
982 __FILE__-
983 ,-
984 944-
985 )); signalIdx = QAbstractItemModel::staticMetaObject.indexOfSignal(signal+1); }
executed 24 times by 12 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
if (methodIdx < 0
methodIdx < 0Description
TRUEevaluated 24 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 4132 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
) { int code = ((int)(*method) - '0'); ((code == 1 || code == 2) ? static_cast<void>(0) : qt_assert("code == QSLOT_CODE || code == QSIGNAL_CODE",
24-4132
986 __FILE__-
987 ,-
988 944-
989 )); if (code == 1
code == 1Description
TRUEevaluated 24 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) methodIdx = QQmlDelegateModel::staticMetaObject.indexOfSlot(method+1);
executed 24 times by 12 tests: methodIdx = QQmlDelegateModel::staticMetaObject.indexOfSlot(method+1);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
else methodIdx = QQmlDelegateModel::staticMetaObject.indexOfSignal(method+1);
never executed: methodIdx = QQmlDelegateModel::staticMetaObject.indexOfSignal(method+1);
} ((signalIdx != -1 && methodIdx != -1) ? static_cast<void>(0) : qt_assert("signalIdx != -1 && methodIdx != -1",
0-24
990 __FILE__-
991 ,-
992 944-
993 )); QMetaObject::connect(sender, signalIdx, receiver, methodIdx, Qt::DirectConnection); }-
994 ;-
995 { QAbstractItemModel *sender = (model); QQmlDelegateModel *receiver = (vdm); const char *signal = (qFlagLocation("2""layoutChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)" "\0" __FILE__ ":" "946")); const char *method = (qFlagLocation("1""_q_layoutChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)" "\0" __FILE__ ":" "946")); static int signalIdx = -1; static int methodIdx = -1; if (signalIdx < 0
signalIdx < 0Description
TRUEevaluated 24 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 4132 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
) { ((((int)(*signal) - '0') == 2) ? static_cast<void>(0) : qt_assert("((int)(*signal) - '0') == QSIGNAL_CODE",
24-4132
996 __FILE__-
997 ,-
998 946-
999 )); signalIdx = QAbstractItemModel::staticMetaObject.indexOfSignal(signal+1); }
executed 24 times by 12 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
if (methodIdx < 0
methodIdx < 0Description
TRUEevaluated 24 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEevaluated 4132 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
) { int code = ((int)(*method) - '0'); ((code == 1 || code == 2) ? static_cast<void>(0) : qt_assert("code == QSLOT_CODE || code == QSIGNAL_CODE",
24-4132
1000 __FILE__-
1001 ,-
1002 946-
1003 )); if (code == 1
code == 1Description
TRUEevaluated 24 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) methodIdx = QQmlDelegateModel::staticMetaObject.indexOfSlot(method+1);
executed 24 times by 12 tests: methodIdx = QQmlDelegateModel::staticMetaObject.indexOfSlot(method+1);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
else methodIdx = QQmlDelegateModel::staticMetaObject.indexOfSignal(method+1);
never executed: methodIdx = QQmlDelegateModel::staticMetaObject.indexOfSignal(method+1);
} ((signalIdx != -1 && methodIdx != -1) ? static_cast<void>(0) : qt_assert("signalIdx != -1 && methodIdx != -1",
0-24
1004 __FILE__-
1005 ,-
1006 946-
1007 )); QMetaObject::connect(sender, signalIdx, receiver, methodIdx, Qt::DirectConnection); }-
1008 ;-
1009 }
executed 4156 times by 12 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
else {
4156
1010 accessors = new VDMObjectDelegateDataType;-
1011 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickvisualdatamodel
2
1012 } else if (list.type() == QQmlListAccessor::ListProperty
list.type() ==...::ListPropertyDescription
TRUEevaluated 22 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEevaluated 1302 times by 22 tests
Evaluated by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickvisualdatamodel
  • tst_scenegraph
) {
22-1302
1013 setObject(static_cast<const QQmlListReference *>(variant.constData())->object(), vdm);-
1014 accessors = new VDMObjectDelegateDataType;-
1015 }
executed 22 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
else if (list.type() != QQmlListAccessor::Invalid
list.type() !=...essor::InvalidDescription
TRUEevaluated 754 times by 22 tests
Evaluated by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickvisualdatamodel
  • tst_scenegraph
FALSEevaluated 548 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
22-754
1016 && list.type() != QQmlListAccessor::Instance
list.type() !=...ssor::InstanceDescription
TRUEevaluated 750 times by 22 tests
Evaluated by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickvisualdatamodel
  • tst_scenegraph
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qquicklistview
) {
4-750
1017 setObject(nullptr, vdm);-
1018 accessors = &qt_vdm_list_accessors;-
1019 }
executed 750 times by 22 tests: end of block
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickvisualdatamodel
  • tst_scenegraph
else {
750
1020 setObject(nullptr, vdm);-
1021 accessors = &qt_vdm_null_accessors;-
1022 }
executed 552 times by 7 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
552
1023}-
1024-
1025void QQmlAdaptorModel::invalidateModel(QQmlDelegateModel *vdm)-
1026{-
1027 accessors->cleanup(*this, vdm);-
1028 accessors = &qt_vdm_null_accessors;-
1029-
1030-
1031}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickvisualdatamodel
2
1032-
1033bool QQmlAdaptorModel::isValid() const-
1034{-
1035 return
executed 132 times by 4 tests: return accessors != &qt_vdm_null_accessors;
Executed by:
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
accessors != &qt_vdm_null_accessors;
executed 132 times by 4 tests: return accessors != &qt_vdm_null_accessors;
Executed by:
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
132
1036}-
1037-
1038int QQmlAdaptorModel::count() const-
1039{-
1040 return
never executed: return rowCount() * columnCount();
rowCount() * columnCount();
never executed: return rowCount() * columnCount();
0
1041}-
1042-
1043int QQmlAdaptorModel::rowCount() const-
1044{-
1045 return
executed 282606 times by 27 tests: return qMax(0, accessors->rowCount(*this));
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • ...
qMax(0, accessors->rowCount(*this));
executed 282606 times by 27 tests: return qMax(0, accessors->rowCount(*this));
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • ...
282606
1046}-
1047-
1048int QQmlAdaptorModel::columnCount() const-
1049{-
1050 return
executed 102 times by 1 test: return qMax(isValid() ? 1 : 0, accessors->columnCount(*this));
Executed by:
  • tst_qquicktableview
qMax(isValid() ? 1 : 0, accessors->columnCount(*this));
executed 102 times by 1 test: return qMax(isValid() ? 1 : 0, accessors->columnCount(*this));
Executed by:
  • tst_qquicktableview
102
1051}-
1052-
1053int QQmlAdaptorModel::rowAt(int index) const-
1054{-
1055 int count = rowCount();-
1056 return
executed 137920 times by 25 tests: return count <= 0 ? -1 : index % count;
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
  • tst_scenegraph
count <= 0 ? -1 : index % count;
executed 137920 times by 25 tests: return count <= 0 ? -1 : index % count;
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
  • tst_scenegraph
137920
1057}-
1058-
1059int QQmlAdaptorModel::columnAt(int index) const-
1060{-
1061 int count = rowCount();-
1062 return
executed 137920 times by 25 tests: return count <= 0 ? -1 : index / count;
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
  • tst_scenegraph
count <= 0 ? -1 : index / count;
executed 137920 times by 25 tests: return count <= 0 ? -1 : index / count;
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
  • tst_scenegraph
137920
1063}-
1064-
1065int QQmlAdaptorModel::indexAt(int row, int column) const-
1066{-
1067 return
executed 316 times by 5 tests: return row + (column * rowCount());
Executed by:
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
row + (column * rowCount());
executed 316 times by 5 tests: return row + (column * rowCount());
Executed by:
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
316
1068}-
1069-
1070void QQmlAdaptorModel::objectDestroyed(QObject *)-
1071{-
1072 setModel(QVariant(), nullptr, nullptr);-
1073}
executed 516 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
516
1074-
1075QQmlAdaptorModelEngineData::QQmlAdaptorModelEngineData(QV4::ExecutionEngine *v4)-
1076 : v4(v4)-
1077{-
1078 QV4::Scope scope(v4);-
1079 QV4::ScopedObject proto(scope, v4->newObject());-
1080 proto->defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "index")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "index" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 8 times by 2 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qquickvisualdatamodel
qstring_literal_temp;
executed 8 times by 2 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qquickvisualdatamodel
}()), get_index, nullptr);
8
1081 proto->defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "modelData")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "modelData" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 8 times by 2 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qquickvisualdatamodel
qstring_literal_temp;
executed 8 times by 2 tests: return qstring_literal_temp;
Executed by:
  • tst_examples
  • tst_qquickvisualdatamodel
}()),
8
1082 QQmlDMListAccessorData::get_modelData, QQmlDMListAccessorData::set_modelData);-
1083 listItemProto.set(v4, proto);-
1084}
executed 8 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickvisualdatamodel
8
1085-
1086QQmlAdaptorModelEngineData::~QQmlAdaptorModelEngineData()-
1087{-
1088}-
1089-
1090-
1091-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0