OpenCoverage

qqmlopenmetaobject.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/qml/qqmlopenmetaobject.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Contact: https://www.qt.io/licensing/-
5**-
6** This file is part of the QtQml module of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL$-
9** Commercial License Usage-
10** Licensees holding valid commercial Qt licenses may use this file in-
11** accordance with the commercial license agreement provided with the-
12** Software or, alternatively, in accordance with the terms contained in-
13** a written agreement between you and The Qt Company. For licensing terms-
14** and conditions see https://www.qt.io/terms-conditions. For further-
15** information use the contact form at https://www.qt.io/contact-us.-
16**-
17** GNU Lesser General Public License Usage-
18** Alternatively, this file may be used under the terms of the GNU Lesser-
19** General Public License version 3 as published by the Free Software-
20** Foundation and appearing in the file LICENSE.LGPL3 included in the-
21** packaging of this file. Please review the following information to-
22** ensure the GNU Lesser General Public License version 3 requirements-
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
24**-
25** GNU General Public License Usage-
26** Alternatively, this file may be used under the terms of the GNU-
27** General Public License version 2.0 or (at your option) the GNU General-
28** Public license version 3 or any later version approved by the KDE Free-
29** Qt Foundation. The licenses are as published by the Free Software-
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
31** included in the packaging of this file. Please review the following-
32** information to ensure the GNU General Public License requirements will-
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
34** https://www.gnu.org/licenses/gpl-3.0.html.-
35**-
36** $QT_END_LICENSE$-
37**-
38****************************************************************************/-
39-
40#include "qqmlopenmetaobject_p.h"-
41#include <private/qqmlpropertycache_p.h>-
42#include <private/qqmldata_p.h>-
43#include <private/qmetaobjectbuilder_p.h>-
44#include <private/qv8engine_p.h>-
45#include <qqmlengine.h>-
46#include <qdebug.h>-
47-
48QT_BEGIN_NAMESPACE-
49-
50-
51class QQmlOpenMetaObjectTypePrivate-
52{-
53public:-
54 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
55-
56 void init(const QMetaObject *metaObj);-
57-
58 int propertyOffset;-
59 int signalOffset;-
60 QHash<QByteArray, int> names;-
61 QMetaObjectBuilder mob;-
62 QMetaObject *mem;-
63 QQmlPropertyCache *cache;-
64 QQmlEngine *engine;-
65 QSet<QQmlOpenMetaObject*> referers;-
66};-
67-
68QQmlOpenMetaObjectType::QQmlOpenMetaObjectType(const QMetaObject *base, QQmlEngine *engine)-
69 : QQmlCleanup(engine), d(new QQmlOpenMetaObjectTypePrivate)-
70{-
71 d->engine = engine;-
72 d->init(base);-
73}
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
74-
75QQmlOpenMetaObjectType::~QQmlOpenMetaObjectType()-
76{-
77 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
78 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
79 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
80 d->cache->release();
executed 166 times by 3 tests: d->cache->release();
Executed by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
166
81 delete d;-
82}
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
83-
84void QQmlOpenMetaObjectType::clear()-
85{-
86 d->engine = nullptr;-
87}
executed 81 times by 3 tests: end of block
Executed by:
  • tst_qqmlopenmetaobject
  • tst_qquickdesignersupport
  • tst_qquickpathview
81
88-
89int QQmlOpenMetaObjectType::propertyOffset() const-
90{-
91 return d->propertyOffset;
executed 22 times by 1 test: return d->propertyOffset;
Executed by:
  • tst_qquickdesignersupport
22
92}-
93-
94int QQmlOpenMetaObjectType::signalOffset() const-
95{-
96 return d->signalOffset;
executed 4 times by 1 test: return d->signalOffset;
Executed by:
  • tst_qquickdesignersupport
4
97}-
98-
99int QQmlOpenMetaObjectType::propertyCount() const-
100{-
101 return d->names.count();
never executed: return d->names.count();
0
102}-
103-
104QByteArray QQmlOpenMetaObjectType::propertyName(int idx) const-
105{-
106 Q_ASSERT(idx >= 0 && idx < d->names.count());-
107-
108 return d->mob.property(idx).name();
never executed: return d->mob.property(idx).name();
0
109}-
110-
111QMetaObject *QQmlOpenMetaObjectType::metaObject() const-
112{-
113 return d->mem;-
114}-
115-
116void QQmlOpenMetaObjectType::createProperties(const QVector<QByteArray> &names)-
117{-
118 for (int i = 0; i < names.count(); ++i) {
i < names.count()Description
TRUEevaluated 104 times by 1 test
Evaluated by:
  • tst_qqmllistmodel
FALSEevaluated 36 times by 1 test
Evaluated by:
  • tst_qqmllistmodel
36-104
119 const QByteArray &name = names.at(i);-
120 const int id = d->mob.propertyCount();-
121 d->mob.addSignal("__" + QByteArray::number(id) + "()");-
122 QMetaPropertyBuilder build = d->mob.addProperty(name, "QVariant", id);-
123 propertyCreated(id, build);-
124 d->names.insert(name, id);-
125 }
executed 104 times by 1 test: end of block
Executed by:
  • tst_qqmllistmodel
104
126 free(d->mem);-
127 d->mem = d->mob.toMetaObject();-
128 QSet<QQmlOpenMetaObject*>::iterator it = d->referers.begin();-
129 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
130 QQmlOpenMetaObject *omo = *it;-
131 *static_cast<QMetaObject *>(omo) = *d->mem;-
132 if (d->cache)
d->cacheDescription
TRUEnever evaluated
FALSEevaluated 36 times by 1 test
Evaluated by:
  • tst_qqmllistmodel
0-36
133 d->cache->update(omo);
never executed: d->cache->update(omo);
0
134 ++it;-
135 }
executed 36 times by 1 test: end of block
Executed by:
  • tst_qqmllistmodel
36
136}
executed 36 times by 1 test: end of block
Executed by:
  • tst_qqmllistmodel
36
137-
138int QQmlOpenMetaObjectType::createProperty(const QByteArray &name)-
139{-
140 int id = d->mob.propertyCount();-
141 d->mob.addSignal("__" + QByteArray::number(id) + "()");-
142 QMetaPropertyBuilder build = d->mob.addProperty(name, "QVariant", id);-
143 propertyCreated(id, build);-
144 free(d->mem);-
145 d->mem = d->mob.toMetaObject();-
146 d->names.insert(name, id);-
147 QSet<QQmlOpenMetaObject*>::iterator it = d->referers.begin();-
148 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
149 QQmlOpenMetaObject *omo = *it;-
150 *static_cast<QMetaObject *>(omo) = *d->mem;-
151 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
152 d->cache->update(omo);
executed 10 times by 2 tests: d->cache->update(omo);
Executed by:
  • tst_qqmlopenmetaobject
  • tst_qquickpathview
10
153 ++it;-
154 }
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
155-
156 return 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
157}-
158-
159void QQmlOpenMetaObjectType::propertyCreated(int id, QMetaPropertyBuilder &builder)-
160{-
161 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
162 (*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
163}
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
164-
165void QQmlOpenMetaObjectTypePrivate::init(const QMetaObject *metaObj)-
166{-
167 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
168 mob.setSuperClass(metaObj);-
169 mob.setClassName(metaObj->className());-
170 mob.setFlags(QMetaObjectBuilder::DynamicMetaObject);-
171-
172 mem = mob.toMetaObject();-
173-
174 propertyOffset = mem->propertyOffset();-
175 signalOffset = mem->methodOffset();-
176 }
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
177}
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
178-
179//-----------------------------------------------------------------------------
180-
181class QQmlOpenMetaObjectPrivate-
182{-
183public:-
184 QQmlOpenMetaObjectPrivate(QQmlOpenMetaObject *_q, bool _autoCreate, QObject *obj)-
185 : 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
186-
187 struct Property {-
188 private:-
189 QVariant m_value;-
190 QPointer<QObject> qobjectTracker;-
191 public:-
192 bool valueSet = false;-
193-
194 QVariant value() const {-
195 if (QMetaType::typeFlags(m_value.userType()) & QMetaType::PointerToQObject-
196 && 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
197 return QVariant::fromValue<QObject*>(nullptr);
executed 50 times by 2 tests: return QVariant::fromValue<QObject*>(nullptr);
Executed by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
50
198 return 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
199 }-
200 QVariant &valueRef() { return m_value; }
executed 6 times by 1 test: return m_value;
Executed by:
  • tst_qqmlpropertymap
6
201 void setValue(const QVariant &v) {-
202 m_value = v;-
203 valueSet = true;-
204 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
205 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
206 }
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
207 };-
208-
209 inline void setPropertyValue(int idx, const QVariant &value) {-
210 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
211 data.resize(idx + 1);
executed 18 times by 2 tests: data.resize(idx + 1);
Executed by:
  • tst_qqmllistmodel
  • tst_qqmlpropertymap
18
212 data[idx].setValue(value);-
213 }
executed 6736 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickpathview
6736
214-
215 inline Property &propertyRef(int idx) {-
216 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
217 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
218 Property &prop = data[idx];-
219 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
220 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
221 return 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
222 }-
223-
224 inline QVariant propertyValue(int idx) {-
225 auto &prop = propertyRef(idx);-
226 return 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
227 }-
228-
229 inline QVariant &propertyValueRef(int idx) {-
230 auto &prop = propertyRef(idx);-
231 return prop.valueRef();
executed 6 times by 1 test: return prop.valueRef();
Executed by:
  • tst_qqmlpropertymap
6
232 }-
233-
234 inline bool hasProperty(int idx) const {-
235 if (idx >= data.count())
idx >= data.count()Description
TRUEnever evaluated
FALSEnever evaluated
0
236 return false;
never executed: return false;
0
237 return data[idx].valueSet;
never executed: return data[idx].valueSet;
0
238 }-
239-
240 QQmlOpenMetaObject *q;-
241 QAbstractDynamicMetaObject *parent = nullptr;-
242 QVector<Property> data;-
243 QObject *object;-
244 QQmlRefPointer<QQmlOpenMetaObjectType> type;-
245 bool autoCreate;-
246 bool cacheProperties = false;-
247};-
248-
249QQmlOpenMetaObject::QQmlOpenMetaObject(QObject *obj, const QMetaObject *base, bool automatic)-
250: d(new QQmlOpenMetaObjectPrivate(this, automatic, obj))-
251{-
252 d->type.adopt(new QQmlOpenMetaObjectType(base ? base : obj->metaObject(), nullptr));-
253 d->type->d->referers.insert(this);-
254-
255 QObjectPrivate *op = QObjectPrivate::get(obj);-
256 d->parent = static_cast<QAbstractDynamicMetaObject *>(op->metaObject);-
257 *static_cast<QMetaObject *>(this) = *d->type->d->mem;-
258 op->metaObject = this;-
259}
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
260-
261QQmlOpenMetaObject::QQmlOpenMetaObject(QObject *obj, QQmlOpenMetaObjectType *type, bool automatic)-
262: d(new QQmlOpenMetaObjectPrivate(this, automatic, obj))-
263{-
264 d->type = type;-
265 d->type->d->referers.insert(this);-
266-
267 QObjectPrivate *op = QObjectPrivate::get(obj);-
268 d->parent = static_cast<QAbstractDynamicMetaObject *>(op->metaObject);-
269 *static_cast<QMetaObject *>(this) = *d->type->d->mem;-
270 op->metaObject = this;-
271}
executed 1890 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlopenmetaobject
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
1890
272-
273QQmlOpenMetaObject::~QQmlOpenMetaObject()-
274{-
275 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
276 delete d->parent;
never executed: delete d->parent;
0
277 d->type->d->referers.remove(this);-
278 delete d;-
279}
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
280-
281QQmlOpenMetaObjectType *QQmlOpenMetaObject::type() const-
282{-
283 return d->type.data();
executed 36 times by 1 test: return d->type.data();
Executed by:
  • tst_qqmllistmodel
36
284}-
285-
286void QQmlOpenMetaObject::emitPropertyNotification(const QByteArray &propertyName)-
287{-
288 QHash<QByteArray, int>::ConstIterator iter = d->type->d->names.constFind(propertyName);-
289 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
290 return;
never executed: return;
0
291 activate(d->object, *iter + d->type->d->signalOffset, nullptr);-
292}
executed 4 times by 1 test: end of block
Executed by:
  • tst_qqmllistmodel
4
293-
294int QQmlOpenMetaObject::metaCall(QObject *o, QMetaObject::Call c, int id, void **a)-
295{-
296 Q_ASSERT(d->object == o);-
297-
298 if (( c == QMetaObject::ReadProperty || c == QMetaObject::WriteProperty)
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 == 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
299 && 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
300 int propId = id - d->type->d->propertyOffset;-
301 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
302 propertyRead(propId);-
303 *reinterpret_cast<QVariant *>(a[0]) = d->propertyValue(propId);-
304 } else if (c == QMetaObject::WriteProperty) {
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
c == QMetaObje...:WritePropertyDescription
TRUEevaluated 72 times by 3 tests
Evaluated by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
FALSEnever evaluated
0-1410
305 if (propId >= d->data.count() || d->data.at(propId).value() != *reinterpret_cast<QVariant *>(a[0])) {
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(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
306 propertyWrite(propId);-
307 d->setPropertyValue(propId, propertyWriteValue(propId, *reinterpret_cast<QVariant *>(a[0])));-
308 propertyWritten(propId);-
309 activate(o, d->type->d->signalOffset + propId, nullptr);-
310 }
executed 68 times by 3 tests: end of block
Executed by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
68
311 }
executed 72 times by 3 tests: end of block
Executed by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
72
312 return -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
313 } else {-
314 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
315 return d->parent->metaCall(o, c, id, a);
never executed: return d->parent->metaCall(o, c, id, a);
0
316 else-
317 return 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
318 }-
319}-
320-
321QAbstractDynamicMetaObject *QQmlOpenMetaObject::parent() const-
322{-
323 return d->parent;
never executed: return d->parent;
0
324}-
325-
326QVariant QQmlOpenMetaObject::value(int id) const-
327{-
328 return d->propertyValue(id);
executed 5454 times by 3 tests: return d->propertyValue(id);
Executed by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
5454
329}-
330-
331void QQmlOpenMetaObject::setValue(int id, const QVariant &value)-
332{-
333 d->setPropertyValue(id, propertyWriteValue(id, value));-
334 activate(d->object, id + d->type->d->signalOffset, nullptr);-
335}
executed 12 times by 2 tests: end of block
Executed by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
12
336-
337QVariant QQmlOpenMetaObject::value(const QByteArray &name) const-
338{-
339 QHash<QByteArray, int>::ConstIterator iter = d->type->d->names.constFind(name);-
340 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
341 return QVariant();
executed 2162 times by 3 tests: return QVariant();
Executed by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
2162
342-
343 return d->propertyValue(*iter);
executed 268 times by 3 tests: return d->propertyValue(*iter);
Executed by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
268
344}-
345-
346QVariant &QQmlOpenMetaObject::valueRef(const QByteArray &name)-
347{-
348 QHash<QByteArray, int>::ConstIterator iter = d->type->d->names.constFind(name);-
349 Q_ASSERT(iter != d->type->d->names.cend());-
350-
351 return d->propertyValueRef(*iter);
executed 6 times by 1 test: return d->propertyValueRef(*iter);
Executed by:
  • tst_qqmlpropertymap
6
352}-
353-
354bool QQmlOpenMetaObject::setValue(const QByteArray &name, const QVariant &val, bool force)-
355{-
356 QHash<QByteArray, int>::ConstIterator iter = d->type->d->names.constFind(name);-
357-
358 int id = -1;-
359 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
360 id = createProperty(name.constData(), "") - d->type->d->propertyOffset;-
361 } else {
executed 3138 times by 4 tests: end of block
Executed by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickpathview
3138
362 id = *iter;-
363 }
executed 5654 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickpathview
5654
364-
365 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
366 if (!force && d->propertyValue(id) == val)
!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) == 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
367 return false;
executed 2136 times by 5 tests: return false;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickpathview
2136
368-
369 d->setPropertyValue(id, val);-
370 activate(d->object, id + d->type->d->signalOffset, nullptr);-
371 return true;
executed 6656 times by 5 tests: return true;
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickpathview
6656
372 }-
373-
374 return false;
never executed: return false;
0
375}-
376-
377// returns true if this value has been initialized by a call to either value() or setValue()-
378bool QQmlOpenMetaObject::hasValue(int id) const-
379{-
380 return d->hasProperty(id);
never executed: return d->hasProperty(id);
0
381}-
382-
383void QQmlOpenMetaObject::setCached(bool c)-
384{-
385 if (c == d->cacheProperties || !d->type->d->engine)
c == d->cachePropertiesDescription
TRUEnever evaluated
FALSEevaluated 1890 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qqmlopenmetaobject
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
!d->type->d->engineDescription
TRUEnever evaluated
FALSEevaluated 1890 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qqmlopenmetaobject
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
0-1890
386 return;
never executed: return;
0
387-
388 d->cacheProperties = c;-
389-
390 QQmlData *qmldata = QQmlData::get(d->object, true);-
391 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
392 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
393 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
394 qmldata->propertyCache = d->type->d->cache;-
395 d->type->d->cache->addref();-
396 } else {
executed 1890 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlopenmetaobject
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
1890
397 if (d->type->d->cache)
d->type->d->cacheDescription
TRUEnever evaluated
FALSEnever evaluated
0
398 d->type->d->cache->release();
never executed: d->type->d->cache->release();
0
399 qmldata->propertyCache = nullptr;-
400 }
never executed: end of block
0
401}-
402-
403-
404int QQmlOpenMetaObject::createProperty(const char *name, const char *)-
405{-
406 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
407 int result = d->type->createProperty(name);-
408-
409 if (QQmlData *ddata = QQmlData::get(d->object, /*create*/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
410 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
411 ddata->propertyCache->release();-
412 ddata->propertyCache = nullptr;-
413 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickpathview
2
414 }
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
415-
416 return 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
417 } else-
418 return -1;
never executed: return -1;
0
419}-
420-
421void QQmlOpenMetaObject::propertyRead(int)-
422{-
423}-
424-
425void QQmlOpenMetaObject::propertyWrite(int)-
426{-
427}-
428-
429QVariant QQmlOpenMetaObject::propertyWriteValue(int, const QVariant &value)-
430{-
431 return value;
executed 70 times by 2 tests: return value;
Executed by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
70
432}-
433-
434void QQmlOpenMetaObject::propertyWritten(int)-
435{-
436}-
437-
438void QQmlOpenMetaObject::propertyCreated(int, QMetaPropertyBuilder &)-
439{-
440}-
441-
442QVariant QQmlOpenMetaObject::initialValue(int)-
443{-
444 return QVariant();
executed 4996 times by 5 tests: return QVariant();
Executed by:
  • tst_examples
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlpropertymap
  • tst_qquickpathview
4996
445}-
446-
447int QQmlOpenMetaObject::count() const-
448{-
449 return d->type->d->names.count();
executed 7274 times by 2 tests: return d->type->d->names.count();
Executed by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
7274
450}-
451-
452QByteArray QQmlOpenMetaObject::name(int idx) const-
453{-
454 Q_ASSERT(idx >= 0 && idx < d->type->d->names.count());-
455-
456 return 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
457}-
458-
459QObject *QQmlOpenMetaObject::object() const-
460{-
461 return 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
462}-
463-
464QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.0