OpenCoverage

qqmlopenmetaobject.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/qml/qqmlopenmetaobject.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5class QQmlOpenMetaObjectTypePrivate-
6{-
7public:-
8 QQmlOpenMetaObjectTypePrivate() : mem(nullptr), cache(nullptr), engine(nullptr) {}
executed 5054 times by 19 tests: end of block
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlopenmetaobject
  • tst_qqmlpropertymap
  • tst_qqmltranslation
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickdesignersupport
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
5054
9-
10 void init(const QMetaObject *metaObj);-
11-
12 int propertyOffset;-
13 int signalOffset;-
14 QHash<QByteArray, int> names;-
15 QMetaObjectBuilder mob;-
16 QMetaObject *mem;-
17 QQmlPropertyCache *cache;-
18 QQmlEngine *engine;-
19 QSet<QQmlOpenMetaObject*> referers;-
20};-
21-
22QQmlOpenMetaObjectType::QQmlOpenMetaObjectType(const QMetaObject *base, QQmlEngine *engine)-
23 : QQmlCleanup(engine), d(new QQmlOpenMetaObjectTypePrivate)-
24{-
25 d->engine = engine;-
26 d->init(base);-
27}
executed 5054 times by 19 tests: end of block
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlopenmetaobject
  • tst_qqmlpropertymap
  • tst_qqmltranslation
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickdesignersupport
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
5054
28-
29QQmlOpenMetaObjectType::~QQmlOpenMetaObjectType()-
30{-
31 if (d->mem
d->memDescription
TRUEevaluated 5048 times by 17 tests
Evaluated by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qqmltranslation
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
FALSEnever evaluated
)
0-5048
32 free(d->mem);
executed 5048 times by 17 tests: free(d->mem);
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qqmltranslation
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
5048
33 if (d->cache
d->cacheDescription
TRUEevaluated 166 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
FALSEevaluated 4882 times by 17 tests
Evaluated by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qqmltranslation
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
)
166-4882
34 d->cache->release();
executed 166 times by 3 tests: d->cache->release();
Executed by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
166
35 delete d;-
36}
executed 5048 times by 17 tests: end of block
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qqmltranslation
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
5048
37-
38void QQmlOpenMetaObjectType::clear()-
39{-
40 d->engine = nullptr;-
41}
executed 81 times by 3 tests: end of block
Executed by:
  • tst_qqmlopenmetaobject
  • tst_qquickdesignersupport
  • tst_qquickpathview
81
42-
43int QQmlOpenMetaObjectType::propertyOffset() const-
44{-
45 return
executed 22 times by 1 test: return d->propertyOffset;
Executed by:
  • tst_qquickdesignersupport
d->propertyOffset;
executed 22 times by 1 test: return d->propertyOffset;
Executed by:
  • tst_qquickdesignersupport
22
46}-
47-
48int QQmlOpenMetaObjectType::signalOffset() const-
49{-
50 return
executed 4 times by 1 test: return d->signalOffset;
Executed by:
  • tst_qquickdesignersupport
d->signalOffset;
executed 4 times by 1 test: return d->signalOffset;
Executed by:
  • tst_qquickdesignersupport
4
51}-
52-
53int QQmlOpenMetaObjectType::propertyCount() const-
54{-
55 return
never executed: return d->names.count();
d->names.count();
never executed: return d->names.count();
0
56}-
57-
58QByteArray QQmlOpenMetaObjectType::propertyName(int idx) const-
59{-
60 ((idx >= 0 && idx < d->names.count()) ? static_cast<void>(0) : qt_assert("idx >= 0 && idx < d->names.count()", __FILE__, 106));-
61-
62 return
never executed: return d->mob.property(idx).name();
d->mob.property(idx).name();
never executed: return d->mob.property(idx).name();
0
63}-
64-
65QMetaObject *QQmlOpenMetaObjectType::metaObject() const-
66{-
67 return d->mem;-
68}-
69-
70void QQmlOpenMetaObjectType::createProperties(const QVector<QByteArray> &names)-
71{-
72 for (int i = 0; i < names.count()
i < names.count()Description
TRUEevaluated 104 times by 1 test
Evaluated by:
  • tst_qqmllistmodel
FALSEevaluated 36 times by 1 test
Evaluated by:
  • tst_qqmllistmodel
; ++i) {
36-104
73 const QByteArray &name = names.at(i);-
74 const int id = d->mob.propertyCount();-
75 d->mob.addSignal("__" + QByteArray::number(id) + "()");-
76 QMetaPropertyBuilder build = d->mob.addProperty(name, "QVariant", id);-
77 propertyCreated(id, build);-
78 d->names.insert(name, id);-
79 }
executed 104 times by 1 test: end of block
Executed by:
  • tst_qqmllistmodel
104
80 free(d->mem);-
81 d->mem = d->mob.toMetaObject();-
82 QSet<QQmlOpenMetaObject*>::iterator it = d->referers.begin();-
83 while (it != d->referers.end()
it != d->referers.end()Description
TRUEevaluated 36 times by 1 test
Evaluated by:
  • tst_qqmllistmodel
FALSEevaluated 36 times by 1 test
Evaluated by:
  • tst_qqmllistmodel
) {
36
84 QQmlOpenMetaObject *omo = *it;-
85 *static_cast<QMetaObject *>(omo) = *d->mem;-
86 if (d->cache
d->cacheDescription
TRUEnever evaluated
FALSEevaluated 36 times by 1 test
Evaluated by:
  • tst_qqmllistmodel
)
0-36
87 d->cache->update(omo);
never executed: d->cache->update(omo);
0
88 ++it;-
89 }
executed 36 times by 1 test: end of block
Executed by:
  • tst_qqmllistmodel
36
90}
executed 36 times by 1 test: end of block
Executed by:
  • tst_qqmllistmodel
36
91-
92int QQmlOpenMetaObjectType::createProperty(const QByteArray &name)-
93{-
94 int id = d->mob.propertyCount();-
95 d->mob.addSignal("__" + QByteArray::number(id) + "()");-
96 QMetaPropertyBuilder build = d->mob.addProperty(name, "QVariant", id);-
97 propertyCreated(id, build);-
98 free(d->mem);-
99 d->mem = d->mob.toMetaObject();-
100 d->names.insert(name, id);-
101 QSet<QQmlOpenMetaObject*>::iterator it = d->referers.begin();-
102 while (it != d->referers.end()
it != d->referers.end()Description
TRUEevaluated 3554 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlopenmetaobject
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEevaluated 3724 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlopenmetaobject
  • tst_qqmlpropertymap
  • tst_qquickdesignersupport
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
) {
3554-3724
103 QQmlOpenMetaObject *omo = *it;-
104 *static_cast<QMetaObject *>(omo) = *d->mem;-
105 if (d->cache
d->cacheDescription
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_qqmlopenmetaobject
  • tst_qquickpathview
FALSEevaluated 3544 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
)
10-3544
106 d->cache->update(omo);
executed 10 times by 2 tests: d->cache->update(omo);
Executed by:
  • tst_qqmlopenmetaobject
  • tst_qquickpathview
10
107 ++it;-
108 }
executed 3554 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlopenmetaobject
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
3554
109-
110 return
executed 3724 times by 11 tests: return d->propertyOffset + id;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlopenmetaobject
  • tst_qqmlpropertymap
  • tst_qquickdesignersupport
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
d->propertyOffset + id;
executed 3724 times by 11 tests: return d->propertyOffset + id;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlopenmetaobject
  • tst_qqmlpropertymap
  • tst_qquickdesignersupport
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
3724
111}-
112-
113void QQmlOpenMetaObjectType::propertyCreated(int id, QMetaPropertyBuilder &builder)-
114{-
115 if (d->referers.count()
d->referers.count()Description
TRUEevaluated 3652 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlopenmetaobject
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEevaluated 176 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickdesignersupport
  • tst_qquickpathview
)
176-3652
116 (*
executed 3652 times by 10 tests: (*d->referers.begin())->propertyCreated(id, builder);
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlopenmetaobject
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
d->referers.begin())->propertyCreated(id, builder);
executed 3652 times by 10 tests: (*d->referers.begin())->propertyCreated(id, builder);
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlopenmetaobject
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
3652
117}
executed 3828 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlopenmetaobject
  • tst_qqmlpropertymap
  • tst_qquickdesignersupport
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
3828
118-
119void QQmlOpenMetaObjectTypePrivate::init(const QMetaObject *metaObj)-
120{-
121 if (!mem
!memDescription
TRUEevaluated 5054 times by 19 tests
Evaluated by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlopenmetaobject
  • tst_qqmlpropertymap
  • tst_qqmltranslation
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickdesignersupport
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
FALSEnever evaluated
) {
0-5054
122 mob.setSuperClass(metaObj);-
123 mob.setClassName(metaObj->className());-
124 mob.setFlags(QMetaObjectBuilder::DynamicMetaObject);-
125-
126 mem = mob.toMetaObject();-
127-
128 propertyOffset = mem->propertyOffset();-
129 signalOffset = mem->methodOffset();-
130 }
executed 5054 times by 19 tests: end of block
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlopenmetaobject
  • tst_qqmlpropertymap
  • tst_qqmltranslation
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickdesignersupport
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
5054
131}
executed 5054 times by 19 tests: end of block
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlopenmetaobject
  • tst_qqmlpropertymap
  • tst_qqmltranslation
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickdesignersupport
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
5054
132-
133-
134-
135class QQmlOpenMetaObjectPrivate-
136{-
137public:-
138 QQmlOpenMetaObjectPrivate(QQmlOpenMetaObject *_q, bool _autoCreate, QObject *obj)-
139 : q(_q), object(obj), autoCreate(_autoCreate) {}
executed 6658 times by 18 tests: end of block
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlopenmetaobject
  • tst_qqmlpropertymap
  • tst_qqmltranslation
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
6658
140-
141 struct Property {-
142 private:-
143 QVariant m_value;-
144 QPointer<QObject> qobjectTracker;-
145 public:-
146 bool valueSet = false;-
147-
148 QVariant value() const {-
149 if (QMetaType::typeFlags(m_value.userType()) & QMetaType::PointerToQObject-
150 && qobjectTracker.isNull()
qobjectTracker.isNull()Description
TRUEevaluated 50 times by 2 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
FALSEevaluated 906 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
)
50-906
151 return
executed 50 times by 2 tests: return QVariant::fromValue<QObject*>(nullptr);
Executed by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
QVariant::fromValue<QObject*>(nullptr);
executed 50 times by 2 tests: return QVariant::fromValue<QObject*>(nullptr);
Executed by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
50
152 return
executed 15904 times by 9 tests: return m_value;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
m_value;
executed 15904 times by 9 tests: return m_value;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
15904
153 }-
154 QVariant &valueRef() { return
executed 6 times by 1 test: return m_value;
Executed by:
  • tst_qqmlpropertymap
m_value;
executed 6 times by 1 test: return m_value;
Executed by:
  • tst_qqmlpropertymap
}
6
155 void setValue(const QVariant &v) {-
156 m_value = v;-
157 valueSet = true;-
158 if (QMetaType::typeFlags(v.userType()) & QMetaType::PointerToQObject
QMetaType::typ...interToQObjectDescription
TRUEevaluated 648 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEevaluated 11452 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickpathview
)
648-11452
159 qobjectTracker = m_value.value<QObject*>();
executed 648 times by 8 tests: qobjectTracker = m_value.value<QObject*>();
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
648
160 }
executed 12100 times by 9 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
12100
161 };-
162-
163 inline void setPropertyValue(int idx, const QVariant &value) {-
164 if (data.count() <= idx
data.count() <= idxDescription
TRUEevaluated 18 times by 2 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qqmlpropertymap
FALSEevaluated 6718 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickpathview
)
18-6718
165 data.resize(idx + 1);
executed 18 times by 2 tests: data.resize(idx + 1);
Executed by:
  • tst_qqmllistmodel
  • tst_qqmlpropertymap
18
166 data[idx].setValue(value);-
167 }
executed 6736 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickpathview
6736
168-
169 inline Property &propertyRef(int idx) {-
170 if (data.count() <= idx
data.count() <= idxDescription
TRUEevaluated 5364 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEevaluated 10542 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
)
5364-10542
171 data.resize(idx + 1);
executed 5364 times by 9 tests: data.resize(idx + 1);
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
5364
172 Property &prop = data[idx];-
173 if (!prop.valueSet
!prop.valueSetDescription
TRUEevaluated 5364 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEevaluated 10542 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
)
5364-10542
174 prop.setValue(q->initialValue(idx));
executed 5364 times by 9 tests: prop.setValue(q->initialValue(idx));
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
5364
175 return
executed 15906 times by 9 tests: return prop;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
prop;
executed 15906 times by 9 tests: return prop;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
15906
176 }-
177-
178 inline QVariant propertyValue(int idx) {-
179 auto &prop = propertyRef(idx);-
180 return
executed 15900 times by 9 tests: return prop.value();
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
prop.value();
executed 15900 times by 9 tests: return prop.value();
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
15900
181 }-
182-
183 inline QVariant &propertyValueRef(int idx) {-
184 auto &prop = propertyRef(idx);-
185 return
executed 6 times by 1 test: return prop.valueRef();
Executed by:
  • tst_qqmlpropertymap
prop.valueRef();
executed 6 times by 1 test: return prop.valueRef();
Executed by:
  • tst_qqmlpropertymap
6
186 }-
187-
188 inline bool hasProperty(int idx) const {-
189 if (idx >= data.count()
idx >= data.count()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
190 return
never executed: return false;
false;
never executed: return false;
0
191 return
never executed: return data[idx].valueSet;
data[idx].valueSet;
never executed: return data[idx].valueSet;
0
192 }-
193-
194 QQmlOpenMetaObject *q;-
195 QAbstractDynamicMetaObject *parent = nullptr;-
196 QVector<Property> data;-
197 QObject *object;-
198 QQmlRefPointer<QQmlOpenMetaObjectType> type;-
199 bool autoCreate;-
200 bool cacheProperties = false;-
201};-
202-
203QQmlOpenMetaObject::QQmlOpenMetaObject(QObject *obj, const QMetaObject *base, bool automatic)-
204: d(new QQmlOpenMetaObjectPrivate(this, automatic, obj))-
205{-
206 d->type.adopt(new QQmlOpenMetaObjectType(base ? base : obj->metaObject(), nullptr));-
207 d->type->d->referers.insert(this);-
208-
209 QObjectPrivate *op = QObjectPrivate::get(obj);-
210 d->parent = static_cast<QAbstractDynamicMetaObject *>(op->metaObject);-
211 *static_cast<QMetaObject *>(this) = *d->type->d->mem;-
212 op->metaObject = this;-
213}
executed 4768 times by 17 tests: end of block
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qqmltranslation
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
4768
214-
215QQmlOpenMetaObject::QQmlOpenMetaObject(QObject *obj, QQmlOpenMetaObjectType *type, bool automatic)-
216: d(new QQmlOpenMetaObjectPrivate(this, automatic, obj))-
217{-
218 d->type = type;-
219 d->type->d->referers.insert(this);-
220-
221 QObjectPrivate *op = QObjectPrivate::get(obj);-
222 d->parent = static_cast<QAbstractDynamicMetaObject *>(op->metaObject);-
223 *static_cast<QMetaObject *>(this) = *d->type->d->mem;-
224 op->metaObject = this;-
225}
executed 1890 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlopenmetaobject
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
1890
226-
227QQmlOpenMetaObject::~QQmlOpenMetaObject()-
228{-
229 if (d->parent
d->parentDescription
TRUEnever evaluated
FALSEevaluated 6658 times by 18 tests
Evaluated by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlopenmetaobject
  • tst_qqmlpropertymap
  • tst_qqmltranslation
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
)
0-6658
230 delete d->parent;
never executed: delete d->parent;
0
231 d->type->d->referers.remove(this);-
232 delete d;-
233}
executed 6658 times by 18 tests: end of block
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlopenmetaobject
  • tst_qqmlpropertymap
  • tst_qqmltranslation
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
6658
234-
235QQmlOpenMetaObjectType *QQmlOpenMetaObject::type() const-
236{-
237 return
executed 36 times by 1 test: return d->type.data();
Executed by:
  • tst_qqmllistmodel
d->type.data();
executed 36 times by 1 test: return d->type.data();
Executed by:
  • tst_qqmllistmodel
36
238}-
239-
240void QQmlOpenMetaObject::emitPropertyNotification(const QByteArray &propertyName)-
241{-
242 QHash<QByteArray, int>::ConstIterator iter = d->type->d->names.constFind(propertyName);-
243 if (iter == d->type->d->names.constEnd()
iter == d->typ...mes.constEnd()Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmllistmodel
)
0-4
244 return;
never executed: return;
0
245 activate(d->object, *iter + d->type->d->signalOffset, nullptr);-
246}
executed 4 times by 1 test: end of block
Executed by:
  • tst_qqmllistmodel
4
247-
248int QQmlOpenMetaObject::metaCall(QObject *o, QMetaObject::Call c, int id, void **a)-
249{-
250 ((d->object == o) ? static_cast<void>(0) : qt_assert("d->object == o", __FILE__, 296));-
251-
252 if (( c == QMetaObject::ReadProperty
c == QMetaObject::ReadPropertyDescription
TRUEevaluated 5448 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEevaluated 76 times by 3 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
|| c == QMetaObject::WriteProperty
c == QMetaObje...:WritePropertyDescription
TRUEevaluated 72 times by 3 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlpropertymap
)
4-5448
253 && id >= d->type->d->propertyOffset
id >= d->type-...propertyOffsetDescription
TRUEevaluated 1482 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEevaluated 4038 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmlpropertymap
  • tst_qquickpathview
) {
1482-4038
254 int propId = id - d->type->d->propertyOffset;-
255 if (c == QMetaObject::ReadProperty
c == QMetaObject::ReadPropertyDescription
TRUEevaluated 1410 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEevaluated 72 times by 3 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
) {
72-1410
256 propertyRead(propId);-
257 *reinterpret_cast<QVariant *>(a[0]) = d->propertyValue(propId);-
258 }
executed 1410 times by 9 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
else if (c == QMetaObject::WriteProperty
c == QMetaObje...:WritePropertyDescription
TRUEevaluated 72 times by 3 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
FALSEnever evaluated
) {
0-1410
259 if (propId >= d->data.count()
propId >= d->data.count()Description
TRUEevaluated 18 times by 3 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
FALSEevaluated 54 times by 3 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
|| d->data.at(propId).value() != *reinterpret_cast<QVariant *>(a[0])
d->data.at(pro...riant *>(a[0])Description
TRUEevaluated 50 times by 3 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlpropertymap
) {
4-54
260 propertyWrite(propId);-
261 d->setPropertyValue(propId, propertyWriteValue(propId, *reinterpret_cast<QVariant *>(a[0])));-
262 propertyWritten(propId);-
263 activate(o, d->type->d->signalOffset + propId, nullptr);-
264 }
executed 68 times by 3 tests: end of block
Executed by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
68
265 }
executed 72 times by 3 tests: end of block
Executed by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
72
266 return
executed 1482 times by 9 tests: return -1;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
-1;
executed 1482 times by 9 tests: return -1;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
1482
267 } else {-
268 if (d->parent
d->parentDescription
TRUEnever evaluated
FALSEevaluated 4042 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmlpropertymap
  • tst_qquickpathview
)
0-4042
269 return
never executed: return d->parent->metaCall(o, c, id, a);
d->parent->metaCall(o, c, id, a);
never executed: return d->parent->metaCall(o, c, id, a);
0
270 else-
271 return
executed 4042 times by 4 tests: return o->qt_metacall(c, id, a);
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmlpropertymap
  • tst_qquickpathview
o->qt_metacall(c, id, a);
executed 4042 times by 4 tests: return o->qt_metacall(c, id, a);
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmlpropertymap
  • tst_qquickpathview
4042
272 }-
273}-
274-
275QAbstractDynamicMetaObject *QQmlOpenMetaObject::parent() const-
276{-
277 return
never executed: return d->parent;
d->parent;
never executed: return d->parent;
0
278}-
279-
280QVariant QQmlOpenMetaObject::value(int id) const-
281{-
282 return
executed 5454 times by 3 tests: return d->propertyValue(id);
Executed by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
d->propertyValue(id);
executed 5454 times by 3 tests: return d->propertyValue(id);
Executed by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
5454
283}-
284-
285void QQmlOpenMetaObject::setValue(int id, const QVariant &value)-
286{-
287 d->setPropertyValue(id, propertyWriteValue(id, value));-
288 activate(d->object, id + d->type->d->signalOffset, nullptr);-
289}
executed 12 times by 2 tests: end of block
Executed by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
12
290-
291QVariant QQmlOpenMetaObject::value(const QByteArray &name) const-
292{-
293 QHash<QByteArray, int>::ConstIterator iter = d->type->d->names.constFind(name);-
294 if (iter == d->type->d->names.cend()
iter == d->typ...->names.cend()Description
TRUEevaluated 2162 times by 3 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
FALSEevaluated 268 times by 3 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
)
268-2162
295 return
executed 2162 times by 3 tests: return QVariant();
Executed by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
QVariant();
executed 2162 times by 3 tests: return QVariant();
Executed by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
2162
296-
297 return
executed 268 times by 3 tests: return d->propertyValue(*iter);
Executed by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
d->propertyValue(*iter);
executed 268 times by 3 tests: return d->propertyValue(*iter);
Executed by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
268
298}-
299-
300QVariant &QQmlOpenMetaObject::valueRef(const QByteArray &name)-
301{-
302 QHash<QByteArray, int>::ConstIterator iter = d->type->d->names.constFind(name);-
303 ((iter != d->type->d->names.cend()) ? static_cast<void>(0) : qt_assert("iter != d->type->d->names.cend()", __FILE__, 349));-
304-
305 return
executed 6 times by 1 test: return d->propertyValueRef(*iter);
Executed by:
  • tst_qqmlpropertymap
d->propertyValueRef(*iter);
executed 6 times by 1 test: return d->propertyValueRef(*iter);
Executed by:
  • tst_qqmlpropertymap
6
306}-
307-
308bool QQmlOpenMetaObject::setValue(const QByteArray &name, const QVariant &val, bool force)-
309{-
310 QHash<QByteArray, int>::ConstIterator iter = d->type->d->names.constFind(name);-
311-
312 int id = -1;-
313 if (iter == d->type->d->names.cend()
iter == d->typ...->names.cend()Description
TRUEevaluated 3138 times by 4 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickpathview
FALSEevaluated 5654 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickpathview
) {
3138-5654
314 id = createProperty(name.constData(), "") - d->type->d->propertyOffset;-
315 }
executed 3138 times by 4 tests: end of block
Executed by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickpathview
else {
3138
316 id = *iter;-
317 }
executed 5654 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickpathview
5654
318-
319 if (id >= 0
id >= 0Description
TRUEevaluated 8792 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickpathview
FALSEnever evaluated
) {
0-8792
320 if (!force
!forceDescription
TRUEevaluated 8768 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickpathview
FALSEevaluated 24 times by 1 test
Evaluated by:
  • tst_qqmllistmodel
&& d->propertyValue(id) == val
d->propertyValue(id) == valDescription
TRUEevaluated 2136 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickpathview
FALSEevaluated 6632 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickpathview
)
24-8768
321 return
executed 2136 times by 5 tests: return false;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickpathview
false;
executed 2136 times by 5 tests: return false;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickpathview
2136
322-
323 d->setPropertyValue(id, val);-
324 activate(d->object, id + d->type->d->signalOffset, nullptr);-
325 return
executed 6656 times by 5 tests: return true;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickpathview
true;
executed 6656 times by 5 tests: return true;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickpathview
6656
326 }-
327-
328 return
never executed: return false;
false;
never executed: return false;
0
329}-
330-
331-
332bool QQmlOpenMetaObject::hasValue(int id) const-
333{-
334 return
never executed: return d->hasProperty(id);
d->hasProperty(id);
never executed: return d->hasProperty(id);
0
335}-
336-
337void QQmlOpenMetaObject::setCached(bool c)-
338{-
339 if (c == d->cacheProperties
c == d->cachePropertiesDescription
TRUEnever evaluated
FALSEevaluated 1890 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qqmlopenmetaobject
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
|| !d->type->d->engine
!d->type->d->engineDescription
TRUEnever evaluated
FALSEevaluated 1890 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qqmlopenmetaobject
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
)
0-1890
340 return;
never executed: return;
0
341-
342 d->cacheProperties = c;-
343-
344 QQmlData *qmldata = QQmlData::get(d->object, true);-
345 if (d->cacheProperties
d->cachePropertiesDescription
TRUEevaluated 1890 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qqmlopenmetaobject
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) {
0-1890
346 if (!d->type->d->cache
!d->type->d->cacheDescription
TRUEevaluated 168 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qqmlopenmetaobject
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
FALSEevaluated 1722 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
)
168-1722
347 d->type->d->cache = new QQmlPropertyCache(this);
executed 168 times by 4 tests: d->type->d->cache = new QQmlPropertyCache(this);
Executed by:
  • tst_examples
  • tst_qqmlopenmetaobject
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
168
348 qmldata->propertyCache = d->type->d->cache;-
349 d->type->d->cache->addref();-
350 }
executed 1890 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlopenmetaobject
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
else {
1890
351 if (d->type->d->cache
d->type->d->cacheDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
352 d->type->d->cache->release();
never executed: d->type->d->cache->release();
0
353 qmldata->propertyCache = nullptr;-
354 }
never executed: end of block
0
355}-
356-
357-
358int QQmlOpenMetaObject::createProperty(const char *name, const char *)-
359{-
360 if (d->autoCreate
d->autoCreateDescription
TRUEevaluated 3546 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) {
0-3546
361 int result = d->type->createProperty(name);-
362-
363 if (QQmlData *ddata = QQmlData::get(d->object, false)
QQmlData *ddat...object, false)Description
TRUEevaluated 422 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEevaluated 3124 times by 4 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickpathview
) {
422-3124
364 if (ddata->propertyCache
ddata->propertyCacheDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickpathview
FALSEevaluated 420 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
) {
2-420
365 ddata->propertyCache->release();-
366 ddata->propertyCache = nullptr;-
367 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickpathview
2
368 }
executed 422 times by 9 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
422
369-
370 return
executed 3546 times by 9 tests: return result;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
result;
executed 3546 times by 9 tests: return result;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
3546
371 } else-
372 return
never executed: return -1;
-1;
never executed: return -1;
0
373}-
374-
375void QQmlOpenMetaObject::propertyRead(int)-
376{-
377}-
378-
379void QQmlOpenMetaObject::propertyWrite(int)-
380{-
381}-
382-
383QVariant QQmlOpenMetaObject::propertyWriteValue(int, const QVariant &value)-
384{-
385 return
executed 70 times by 2 tests: return value;
Executed by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
value;
executed 70 times by 2 tests: return value;
Executed by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
70
386}-
387-
388void QQmlOpenMetaObject::propertyWritten(int)-
389{-
390}-
391-
392void QQmlOpenMetaObject::propertyCreated(int, QMetaPropertyBuilder &)-
393{-
394}-
395-
396QVariant QQmlOpenMetaObject::initialValue(int)-
397{-
398 return
executed 4996 times by 5 tests: return QVariant();
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickpathview
QVariant();
executed 4996 times by 5 tests: return QVariant();
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickpathview
4996
399}-
400-
401int QQmlOpenMetaObject::count() const-
402{-
403 return
executed 7274 times by 2 tests: return d->type->d->names.count();
Executed by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
d->type->d->names.count();
executed 7274 times by 2 tests: return d->type->d->names.count();
Executed by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
7274
404}-
405-
406QByteArray QQmlOpenMetaObject::name(int idx) const-
407{-
408 ((idx >= 0 && idx < d->type->d->names.count()) ? static_cast<void>(0) : qt_assert("idx >= 0 && idx < d->type->d->names.count()", __FILE__, 454));-
409-
410 return
executed 1542 times by 8 tests: return d->type->d->mob.property(idx).name();
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
d->type->d->mob.property(idx).name();
executed 1542 times by 8 tests: return d->type->d->mob.property(idx).name();
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
1542
411}-
412-
413QObject *QQmlOpenMetaObject::object() const-
414{-
415 return
executed 386 times by 8 tests: return d->object;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
d->object;
executed 386 times by 8 tests: return d->object;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
386
416}-
417-
418-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0