kernel/qmetaobjectbuilder.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4 -
5 -
6namespace QtPrivate { -
7__attribute__((visibility("default"))) bool isBuiltinType(const QByteArray &type) -
8{ -
9 int id = QMetaType::type(type); -
10 if (!id && !type.isEmpty() && type != "void")
evaluated: !id
TRUEFALSE
yes
Evaluation Count:82
yes
Evaluation Count:444
evaluated: !type.isEmpty()
TRUEFALSE
yes
Evaluation Count:36
yes
Evaluation Count:46
partially evaluated: type != "void"
TRUEFALSE
yes
Evaluation Count:36
no
Evaluation Count:0
0-444
11 return false;
executed: return false;
Execution Count:36
36
12 return (id < QMetaType::User);
executed: return (id < QMetaType::User);
Execution Count:490
490
13} -
14} -
15 -
16 -
17static inline const QMetaObjectPrivate *priv(const uint* data) -
18{ return reinterpret_cast<const QMetaObjectPrivate*>(data); }
never executed: return reinterpret_cast<const QMetaObjectPrivate*>(data);
0
19 -
20class QMetaMethodBuilderPrivate -
21{ -
22public: -
23 QMetaMethodBuilderPrivate -
24 (QMetaMethod::MethodType _methodType, -
25 const QByteArray& _signature, -
26 const QByteArray& _returnType = QByteArray("void"), -
27 QMetaMethod::Access _access = QMetaMethod::Public, -
28 int _revision = 0) -
29 : signature(QMetaObject::normalizedSignature(_signature.constData())), -
30 returnType(QMetaObject::normalizedType(_returnType)), -
31 attributes(((int)_access) | (((int)_methodType) << 2)), -
32 revision(_revision) -
33 { -
34 qt_noop(); -
35 }
executed: }
Execution Count:128
128
36 -
37 QByteArray signature; -
38 QByteArray returnType; -
39 QList<QByteArray> parameterNames; -
40 QByteArray tag; -
41 int attributes; -
42 int revision; -
43 -
44 QMetaMethod::MethodType methodType() const -
45 { -
46 return (QMetaMethod::MethodType)((attributes & MethodTypeMask) >> 2);
executed: return (QMetaMethod::MethodType)((attributes & MethodTypeMask) >> 2);
Execution Count:190
190
47 } -
48 -
49 QMetaMethod::Access access() const -
50 { -
51 return (QMetaMethod::Access)(attributes & AccessMask);
executed: return (QMetaMethod::Access)(attributes & AccessMask);
Execution Count:19
19
52 } -
53 -
54 void setAccess(QMetaMethod::Access value) -
55 { -
56 attributes = ((attributes & ~AccessMask) | (int)value); -
57 }
executed: }
Execution Count:51
51
58 -
59 QList<QByteArray> parameterTypes() const -
60 { -
61 return QMetaObjectPrivate::parameterTypeNamesFromSignature(signature);
executed: return QMetaObjectPrivate::parameterTypeNamesFromSignature(signature);
Execution Count:721
721
62 } -
63 -
64 int parameterCount() const -
65 { -
66 return parameterTypes().size();
executed: return parameterTypes().size();
Execution Count:468
468
67 } -
68 -
69 QByteArray name() const -
70 { -
71 return signature.left(qMax(signature.indexOf('('), 0));
executed: return signature.left(qMax(signature.indexOf('('), 0));
Execution Count:234
234
72 } -
73}; -
74 -
75class QMetaPropertyBuilderPrivate -
76{ -
77public: -
78 QMetaPropertyBuilderPrivate -
79 (const QByteArray& _name, const QByteArray& _type, int notifierIdx=-1, -
80 int _revision = 0) -
81 : name(_name), -
82 type(QMetaObject::normalizedType(_type.constData())), -
83 flags(Readable | Writable | Scriptable), notifySignal(-1), -
84 revision(_revision) -
85 { -
86 if (notifierIdx >= 0) {
partially evaluated: notifierIdx >= 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:37
0-37
87 flags |= Notify; -
88 notifySignal = notifierIdx; -
89 }
never executed: }
0
90 }
executed: }
Execution Count:37
37
91 -
92 QByteArray name; -
93 QByteArray type; -
94 int flags; -
95 int notifySignal; -
96 int revision; -
97 -
98 bool flag(int f) const -
99 { -
100 return ((flags & f) != 0);
executed: return ((flags & f) != 0);
Execution Count:368
368
101 } -
102 -
103 void setFlag(int f, bool value) -
104 { -
105 if (value)
evaluated: value
TRUEFALSE
yes
Evaluation Count:115
yes
Evaluation Count:256
115-256
106 flags |= f;
executed: flags |= f;
Execution Count:115
115
107 else -
108 flags &= ~f;
executed: flags &= ~f;
Execution Count:256
256
109 } -
110}; -
111 -
112class QMetaEnumBuilderPrivate -
113{ -
114public: -
115 QMetaEnumBuilderPrivate(const QByteArray& _name) -
116 : name(_name), isFlag(false) -
117 { -
118 }
executed: }
Execution Count:8
8
119 -
120 QByteArray name; -
121 bool isFlag; -
122 QList<QByteArray> keys; -
123 QList<int> values; -
124}; -
125 -
126class QMetaObjectBuilderPrivate -
127{ -
128public: -
129 QMetaObjectBuilderPrivate() -
130 : flags(0) -
131 { -
132 superClass = &QObject::staticMetaObject; -
133 staticMetacallFunction = 0; -
134 }
executed: }
Execution Count:34
34
135 -
136 bool hasRevisionedProperties() const; -
137 bool hasRevisionedMethods() const; -
138 -
139 QByteArray className; -
140 const QMetaObject *superClass; -
141 QMetaObjectBuilder::StaticMetacallFunction staticMetacallFunction; -
142 QList<QMetaMethodBuilderPrivate> methods; -
143 QList<QMetaMethodBuilderPrivate> constructors; -
144 QList<QMetaPropertyBuilderPrivate> properties; -
145 QList<QByteArray> classInfoNames; -
146 QList<QByteArray> classInfoValues; -
147 QList<QMetaEnumBuilderPrivate> enumerators; -
148 QList<const QMetaObject *> relatedMetaObjects; -
149 int flags; -
150}; -
151 -
152bool QMetaObjectBuilderPrivate::hasRevisionedProperties() const -
153{ -
154 for (int i = 0; i < properties.size(); ++i) {
evaluated: i < properties.size()
TRUEFALSE
yes
Evaluation Count:44
yes
Evaluation Count:28
28-44
155 if (properties.at(i).revision)
evaluated: properties.at(i).revision
TRUEFALSE
yes
Evaluation Count:6
yes
Evaluation Count:38
6-38
156 return true;
executed: return true;
Execution Count:6
6
157 }
executed: }
Execution Count:38
38
158 return false;
executed: return false;
Execution Count:28
28
159} -
160 -
161bool QMetaObjectBuilderPrivate::hasRevisionedMethods() const -
162{ -
163 for (int i = 0; i < methods.size(); ++i) {
evaluated: i < methods.size()
TRUEFALSE
yes
Evaluation Count:164
yes
Evaluation Count:28
28-164
164 if (methods.at(i).revision)
evaluated: methods.at(i).revision
TRUEFALSE
yes
Evaluation Count:6
yes
Evaluation Count:158
6-158
165 return true;
executed: return true;
Execution Count:6
6
166 }
executed: }
Execution Count:158
158
167 return false;
executed: return false;
Execution Count:28
28
168} -
169 -
170 -
171 -
172 -
173QMetaObjectBuilder::QMetaObjectBuilder() -
174{ -
175 d = new QMetaObjectBuilderPrivate(); -
176}
executed: }
Execution Count:30
30
177QMetaObjectBuilder::QMetaObjectBuilder -
178 (const QMetaObject *prototype, QMetaObjectBuilder::AddMembers members) -
179{ -
180 d = new QMetaObjectBuilderPrivate(); -
181 addMetaObject(prototype, members); -
182}
executed: }
Execution Count:4
4
183 -
184 -
185 -
186 -
187QMetaObjectBuilder::~QMetaObjectBuilder() -
188{ -
189 delete d; -
190}
executed: }
Execution Count:34
34
191 -
192 -
193 -
194 -
195 -
196 -
197 -
198QByteArray QMetaObjectBuilder::className() const -
199{ -
200 return d->className; -
201} -
202 -
203 -
204 -
205 -
206 -
207 -
208 -
209void QMetaObjectBuilder::setClassName(const QByteArray& name) -
210{ -
211 d->className = name; -
212}
executed: }
Execution Count:13
13
213const QMetaObject *QMetaObjectBuilder::superClass() const -
214{ -
215 return d->superClass;
executed: return d->superClass;
Execution Count:18
18
216} -
217void QMetaObjectBuilder::setSuperClass(const QMetaObject *meta) -
218{ -
219 qt_noop(); -
220 d->superClass = meta; -
221}
executed: }
Execution Count:2
2
222 -
223 -
224 -
225 -
226 -
227 -
228 -
229QMetaObjectBuilder::MetaObjectFlags QMetaObjectBuilder::flags() const -
230{ -
231 return (QMetaObjectBuilder::MetaObjectFlags)d->flags;
executed: return (QMetaObjectBuilder::MetaObjectFlags)d->flags;
Execution Count:2
2
232} -
233 -
234 -
235 -
236 -
237 -
238 -
239 -
240void QMetaObjectBuilder::setFlags(MetaObjectFlags flags) -
241{ -
242 d->flags = flags; -
243}
executed: }
Execution Count:1
1
244int QMetaObjectBuilder::methodCount() const -
245{ -
246 return d->methods.size();
executed: return d->methods.size();
Execution Count:20
20
247} -
248 -
249 -
250 -
251 -
252 -
253 -
254int QMetaObjectBuilder::constructorCount() const -
255{ -
256 return d->constructors.size();
executed: return d->constructors.size();
Execution Count:18
18
257} -
258 -
259 -
260 -
261 -
262 -
263 -
264 -
265int QMetaObjectBuilder::propertyCount() const -
266{ -
267 return d->properties.size();
executed: return d->properties.size();
Execution Count:17
17
268} -
269int QMetaObjectBuilder::enumeratorCount() const -
270{ -
271 return d->enumerators.size();
executed: return d->enumerators.size();
Execution Count:15
15
272} -
273int QMetaObjectBuilder::classInfoCount() const -
274{ -
275 return d->classInfoNames.size();
executed: return d->classInfoNames.size();
Execution Count:14
14
276} -
277int QMetaObjectBuilder::relatedMetaObjectCount() const -
278{ -
279 return d->relatedMetaObjects.size();
executed: return d->relatedMetaObjects.size();
Execution Count:14
14
280} -
281QMetaMethodBuilder QMetaObjectBuilder::addMethod(const QByteArray& signature) -
282{ -
283 int index = d->methods.size(); -
284 d->methods.append(QMetaMethodBuilderPrivate(QMetaMethod::Method, signature)); -
285 return QMetaMethodBuilder(this, index);
executed: return QMetaMethodBuilder(this, index);
Execution Count:23
23
286} -
287QMetaMethodBuilder QMetaObjectBuilder::addMethod -
288 (const QByteArray& signature, const QByteArray& returnType) -
289{ -
290 int index = d->methods.size(); -
291 d->methods.append(QMetaMethodBuilderPrivate -
292 (QMetaMethod::Method, signature, returnType)); -
293 return QMetaMethodBuilder(this, index);
executed: return QMetaMethodBuilder(this, index);
Execution Count:1
1
294} -
295QMetaMethodBuilder QMetaObjectBuilder::addMethod(const QMetaMethod& prototype) -
296{ -
297 QMetaMethodBuilder method; -
298 if (prototype.methodType() == QMetaMethod::Method)
evaluated: prototype.methodType() == QMetaMethod::Method
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:51
2-51
299 method = addMethod(prototype.methodSignature());
executed: method = addMethod(prototype.methodSignature());
Execution Count:2
2
300 else if (prototype.methodType() == QMetaMethod::Signal)
evaluated: prototype.methodType() == QMetaMethod::Signal
TRUEFALSE
yes
Evaluation Count:10
yes
Evaluation Count:41
10-41
301 method = addSignal(prototype.methodSignature());
executed: method = addSignal(prototype.methodSignature());
Execution Count:10
10
302 else if (prototype.methodType() == QMetaMethod::Slot)
evaluated: prototype.methodType() == QMetaMethod::Slot
TRUEFALSE
yes
Evaluation Count:40
yes
Evaluation Count:1
1-40
303 method = addSlot(prototype.methodSignature());
executed: method = addSlot(prototype.methodSignature());
Execution Count:40
40
304 else if (prototype.methodType() == QMetaMethod::Constructor)
partially evaluated: prototype.methodType() == QMetaMethod::Constructor
TRUEFALSE
yes
Evaluation Count:1
no
Evaluation Count:0
0-1
305 method = addConstructor(prototype.methodSignature());
executed: method = addConstructor(prototype.methodSignature());
Execution Count:1
1
306 method.setReturnType(prototype.typeName()); -
307 method.setParameterNames(prototype.parameterNames()); -
308 method.setTag(prototype.tag()); -
309 method.setAccess(prototype.access()); -
310 method.setAttributes(prototype.attributes()); -
311 method.setRevision(prototype.revision()); -
312 return method;
executed: return method;
Execution Count:53
53
313} -
314QMetaMethodBuilder QMetaObjectBuilder::addSlot(const QByteArray& signature) -
315{ -
316 int index = d->methods.size(); -
317 d->methods.append(QMetaMethodBuilderPrivate(QMetaMethod::Slot, signature)); -
318 return QMetaMethodBuilder(this, index);
executed: return QMetaMethodBuilder(this, index);
Execution Count:53
53
319} -
320QMetaMethodBuilder QMetaObjectBuilder::addSignal(const QByteArray& signature) -
321{ -
322 int index = d->methods.size(); -
323 d->methods.append(QMetaMethodBuilderPrivate -
324 (QMetaMethod::Signal, signature, QByteArray("void"), QMetaMethod::Protected)); -
325 return QMetaMethodBuilder(this, index);
executed: return QMetaMethodBuilder(this, index);
Execution Count:25
25
326} -
327QMetaMethodBuilder QMetaObjectBuilder::addConstructor(const QByteArray& signature) -
328{ -
329 int index = d->constructors.size(); -
330 d->constructors.append(QMetaMethodBuilderPrivate(QMetaMethod::Constructor, signature, -
331 QByteArray())); -
332 return QMetaMethodBuilder(this, -(index + 1));
executed: return QMetaMethodBuilder(this, -(index + 1));
Execution Count:26
26
333} -
334QMetaMethodBuilder QMetaObjectBuilder::addConstructor(const QMetaMethod& prototype) -
335{ -
336 qt_noop(); -
337 QMetaMethodBuilder ctor = addConstructor(prototype.methodSignature()); -
338 ctor.setReturnType(prototype.typeName()); -
339 ctor.setParameterNames(prototype.parameterNames()); -
340 ctor.setTag(prototype.tag()); -
341 ctor.setAccess(prototype.access()); -
342 ctor.setAttributes(prototype.attributes()); -
343 return ctor;
executed: return ctor;
Execution Count:4
4
344} -
345QMetaPropertyBuilder QMetaObjectBuilder::addProperty -
346 (const QByteArray& name, const QByteArray& type, int notifierId) -
347{ -
348 int index = d->properties.size(); -
349 d->properties.append(QMetaPropertyBuilderPrivate(name, type, notifierId)); -
350 return QMetaPropertyBuilder(this, index);
executed: return QMetaPropertyBuilder(this, index);
Execution Count:37
37
351} -
352QMetaPropertyBuilder QMetaObjectBuilder::addProperty(const QMetaProperty& prototype) -
353{ -
354 QMetaPropertyBuilder property = addProperty(prototype.name(), prototype.typeName()); -
355 property.setReadable(prototype.isReadable()); -
356 property.setWritable(prototype.isWritable()); -
357 property.setResettable(prototype.isResettable()); -
358 property.setDesignable(prototype.isDesignable()); -
359 property.setScriptable(prototype.isScriptable()); -
360 property.setStored(prototype.isStored()); -
361 property.setEditable(prototype.isEditable()); -
362 property.setUser(prototype.isUser()); -
363 property.setStdCppSet(prototype.hasStdCppSet()); -
364 property.setEnumOrFlag(prototype.isEnumType()); -
365 property.setConstant(prototype.isConstant()); -
366 property.setFinal(prototype.isFinal()); -
367 property.setRevision(prototype.revision()); -
368 if (prototype.hasNotifySignal()) {
evaluated: prototype.hasNotifySignal()
TRUEFALSE
yes
Evaluation Count:4
yes
Evaluation Count:10
4-10
369 -
370 QMetaMethod method = prototype.notifySignal(); -
371 int index = indexOfMethod(method.methodSignature()); -
372 if (index == -1)
evaluated: index == -1
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:3
1-3
373 index = addMethod(method).index();
executed: index = addMethod(method).index();
Execution Count:1
1
374 d->properties[property._index].notifySignal = index; -
375 d->properties[property._index].setFlag(Notify, true); -
376 }
executed: }
Execution Count:4
4
377 return property;
executed: return property;
Execution Count:14
14
378} -
379QMetaEnumBuilder QMetaObjectBuilder::addEnumerator(const QByteArray& name) -
380{ -
381 int index = d->enumerators.size(); -
382 d->enumerators.append(QMetaEnumBuilderPrivate(name)); -
383 return QMetaEnumBuilder(this, index);
executed: return QMetaEnumBuilder(this, index);
Execution Count:8
8
384} -
385QMetaEnumBuilder QMetaObjectBuilder::addEnumerator(const QMetaEnum& prototype) -
386{ -
387 QMetaEnumBuilder en = addEnumerator(prototype.name()); -
388 en.setIsFlag(prototype.isFlag()); -
389 int count = prototype.keyCount(); -
390 for (int index = 0; index < count; ++index)
evaluated: index < count
TRUEFALSE
yes
Evaluation Count:8
yes
Evaluation Count:4
4-8
391 en.addKey(prototype.key(index), prototype.value(index));
executed: en.addKey(prototype.key(index), prototype.value(index));
Execution Count:8
8
392 return en;
executed: return en;
Execution Count:4
4
393} -
394int QMetaObjectBuilder::addClassInfo(const QByteArray& name, const QByteArray& value) -
395{ -
396 int index = d->classInfoNames.size(); -
397 d->classInfoNames += name; -
398 d->classInfoValues += value; -
399 return index;
executed: return index;
Execution Count:8
8
400} -
401int QMetaObjectBuilder::addRelatedMetaObject(const QMetaObject *meta) -
402{ -
403 qt_noop(); -
404 int index = d->relatedMetaObjects.size(); -
405 d->relatedMetaObjects.append(meta); -
406 return index;
executed: return index;
Execution Count:5
5
407} -
408void QMetaObjectBuilder::addMetaObject -
409 (const QMetaObject *prototype, QMetaObjectBuilder::AddMembers members) -
410{ -
411 qt_noop(); -
412 int index; -
413 -
414 if ((members & ClassName) != 0)
evaluated: (members & ClassName) != 0
TRUEFALSE
yes
Evaluation Count:5
yes
Evaluation Count:2
2-5
415 d->className = prototype->className();
executed: d->className = prototype->className();
Execution Count:5
5
416 -
417 if ((members & SuperClass) != 0)
evaluated: (members & SuperClass) != 0
TRUEFALSE
yes
Evaluation Count:6
yes
Evaluation Count:1
1-6
418 d->superClass = prototype->superClass();
executed: d->superClass = prototype->superClass();
Execution Count:6
6
419 -
420 if ((members & (Methods | Signals | Slots)) != 0) {
evaluated: (members & (Methods | Signals | Slots)) != 0
TRUEFALSE
yes
Evaluation Count:4
yes
Evaluation Count:3
3-4
421 for (index = prototype->methodOffset(); index < prototype->methodCount(); ++index) {
evaluated: index < prototype->methodCount()
TRUEFALSE
yes
Evaluation Count:51
yes
Evaluation Count:4
4-51
422 QMetaMethod method = prototype->method(index); -
423 if (method.methodType() != QMetaMethod::Signal) {
evaluated: method.methodType() != QMetaMethod::Signal
TRUEFALSE
yes
Evaluation Count:42
yes
Evaluation Count:9
9-42
424 if (method.access() == QMetaMethod::Public && (members & PublicMethods) == 0)
evaluated: method.access() == QMetaMethod::Public
TRUEFALSE
yes
Evaluation Count:9
yes
Evaluation Count:33
partially evaluated: (members & PublicMethods) == 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:9
0-33
425 continue;
never executed: continue;
0
426 if (method.access() == QMetaMethod::Private && (members & PrivateMethods) == 0)
evaluated: method.access() == QMetaMethod::Private
TRUEFALSE
yes
Evaluation Count:29
yes
Evaluation Count:13
partially evaluated: (members & PrivateMethods) == 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:29
0-29
427 continue;
never executed: continue;
0
428 if (method.access() == QMetaMethod::Protected && (members & ProtectedMethods) == 0)
evaluated: method.access() == QMetaMethod::Protected
TRUEFALSE
yes
Evaluation Count:4
yes
Evaluation Count:38
partially evaluated: (members & ProtectedMethods) == 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:4
0-38
429 continue;
never executed: continue;
0
430 }
executed: }
Execution Count:42
42
431 if (method.methodType() == QMetaMethod::Method && (members & Methods) != 0) {
evaluated: method.methodType() == QMetaMethod::Method
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:49
partially evaluated: (members & Methods) != 0
TRUEFALSE
yes
Evaluation Count:2
no
Evaluation Count:0
0-49
432 addMethod(method); -
433 } else if (method.methodType() == QMetaMethod::Signal &&
evaluated: method.methodType() == QMetaMethod::Signal
TRUEFALSE
yes
Evaluation Count:9
yes
Evaluation Count:40
executed: }
Execution Count:2
2-40
434 (members & Signals) != 0) {
partially evaluated: (members & Signals) != 0
TRUEFALSE
yes
Evaluation Count:9
no
Evaluation Count:0
0-9
435 addMethod(method); -
436 } else if (method.methodType() == QMetaMethod::Slot &&
partially evaluated: method.methodType() == QMetaMethod::Slot
TRUEFALSE
yes
Evaluation Count:40
no
Evaluation Count:0
executed: }
Execution Count:9
0-40
437 (members & Slots) != 0) {
partially evaluated: (members & Slots) != 0
TRUEFALSE
yes
Evaluation Count:40
no
Evaluation Count:0
0-40
438 addMethod(method); -
439 }
executed: }
Execution Count:40
40
440 } -
441 }
executed: }
Execution Count:4
4
442 -
443 if ((members & Constructors) != 0) {
evaluated: (members & Constructors) != 0
TRUEFALSE
yes
Evaluation Count:4
yes
Evaluation Count:3
3-4
444 for (index = 0; index < prototype->constructorCount(); ++index)
evaluated: index < prototype->constructorCount()
TRUEFALSE
yes
Evaluation Count:4
yes
Evaluation Count:4
4
445 addConstructor(prototype->constructor(index));
executed: addConstructor(prototype->constructor(index));
Execution Count:4
4
446 }
executed: }
Execution Count:4
4
447 -
448 if ((members & Properties) != 0) {
evaluated: (members & Properties) != 0
TRUEFALSE
yes
Evaluation Count:4
yes
Evaluation Count:3
3-4
449 for (index = prototype->propertyOffset(); index < prototype->propertyCount(); ++index)
evaluated: index < prototype->propertyCount()
TRUEFALSE
yes
Evaluation Count:13
yes
Evaluation Count:4
4-13
450 addProperty(prototype->property(index));
executed: addProperty(prototype->property(index));
Execution Count:13
13
451 }
executed: }
Execution Count:4
4
452 -
453 if ((members & Enumerators) != 0) {
evaluated: (members & Enumerators) != 0
TRUEFALSE
yes
Evaluation Count:4
yes
Evaluation Count:3
3-4
454 for (index = prototype->enumeratorOffset(); index < prototype->enumeratorCount(); ++index)
evaluated: index < prototype->enumeratorCount()
TRUEFALSE
yes
Evaluation Count:4
yes
Evaluation Count:4
4
455 addEnumerator(prototype->enumerator(index));
executed: addEnumerator(prototype->enumerator(index));
Execution Count:4
4
456 }
executed: }
Execution Count:4
4
457 -
458 if ((members & ClassInfos) != 0) {
evaluated: (members & ClassInfos) != 0
TRUEFALSE
yes
Evaluation Count:4
yes
Evaluation Count:3
3-4
459 for (index = prototype->classInfoOffset(); index < prototype->classInfoCount(); ++index) {
evaluated: index < prototype->classInfoCount()
TRUEFALSE
yes
Evaluation Count:4
yes
Evaluation Count:4
4
460 QMetaClassInfo ci = prototype->classInfo(index); -
461 addClassInfo(ci.name(), ci.value()); -
462 }
executed: }
Execution Count:4
4
463 }
executed: }
Execution Count:4
4
464 -
465 if ((members & RelatedMetaObjects) != 0) {
evaluated: (members & RelatedMetaObjects) != 0
TRUEFALSE
yes
Evaluation Count:4
yes
Evaluation Count:3
3-4
466 qt_noop(); -
467 const QMetaObject **objects = prototype->d.relatedMetaObjects; -
468 if (objects) {
evaluated: objects
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:2
2
469 while (*objects != 0) {
evaluated: *objects != 0
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:2
2
470 addRelatedMetaObject(*objects); -
471 ++objects; -
472 }
executed: }
Execution Count:2
2
473 }
executed: }
Execution Count:2
2
474 }
executed: }
Execution Count:4
4
475 -
476 if ((members & StaticMetacall) != 0) {
evaluated: (members & StaticMetacall) != 0
TRUEFALSE
yes
Evaluation Count:4
yes
Evaluation Count:3
3-4
477 qt_noop(); -
478 if (prototype->d.static_metacall)
partially evaluated: prototype->d.static_metacall
TRUEFALSE
yes
Evaluation Count:4
no
Evaluation Count:0
0-4
479 setStaticMetacallFunction(prototype->d.static_metacall);
executed: setStaticMetacallFunction(prototype->d.static_metacall);
Execution Count:4
4
480 }
executed: }
Execution Count:4
4
481}
executed: }
Execution Count:7
7
482 -
483 -
484 -
485 -
486 -
487 -
488QMetaMethodBuilder QMetaObjectBuilder::method(int index) const -
489{ -
490 if (index >= 0 && index < d->methods.size())
partially evaluated: index >= 0
TRUEFALSE
yes
Evaluation Count:4
no
Evaluation Count:0
evaluated: index < d->methods.size()
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:1
0-4
491 return QMetaMethodBuilder(this, index);
executed: return QMetaMethodBuilder(this, index);
Execution Count:3
3
492 else -
493 return QMetaMethodBuilder();
executed: return QMetaMethodBuilder();
Execution Count:1
1
494} -
495 -
496 -
497 -
498 -
499 -
500 -
501QMetaMethodBuilder QMetaObjectBuilder::constructor(int index) const -
502{ -
503 if (index >= 0 && index < d->constructors.size())
partially evaluated: index >= 0
TRUEFALSE
yes
Evaluation Count:3
no
Evaluation Count:0
evaluated: index < d->constructors.size()
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:1
0-3
504 return QMetaMethodBuilder(this, -(index + 1));
executed: return QMetaMethodBuilder(this, -(index + 1));
Execution Count:2
2
505 else -
506 return QMetaMethodBuilder();
executed: return QMetaMethodBuilder();
Execution Count:1
1
507} -
508 -
509 -
510 -
511 -
512 -
513 -
514QMetaPropertyBuilder QMetaObjectBuilder::property(int index) const -
515{ -
516 if (index >= 0 && index < d->properties.size())
partially evaluated: index >= 0
TRUEFALSE
yes
Evaluation Count:7
no
Evaluation Count:0
evaluated: index < d->properties.size()
TRUEFALSE
yes
Evaluation Count:6
yes
Evaluation Count:1
0-7
517 return QMetaPropertyBuilder(this, index);
executed: return QMetaPropertyBuilder(this, index);
Execution Count:6
6
518 else -
519 return QMetaPropertyBuilder();
executed: return QMetaPropertyBuilder();
Execution Count:1
1
520} -
521 -
522 -
523 -
524 -
525 -
526 -
527 -
528QMetaEnumBuilder QMetaObjectBuilder::enumerator(int index) const -
529{ -
530 if (index >= 0 && index < d->enumerators.size())
partially evaluated: index >= 0
TRUEFALSE
yes
Evaluation Count:3
no
Evaluation Count:0
evaluated: index < d->enumerators.size()
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:1
0-3
531 return QMetaEnumBuilder(this, index);
executed: return QMetaEnumBuilder(this, index);
Execution Count:2
2
532 else -
533 return QMetaEnumBuilder();
executed: return QMetaEnumBuilder();
Execution Count:1
1
534} -
535const QMetaObject *QMetaObjectBuilder::relatedMetaObject(int index) const -
536{ -
537 if (index >= 0 && index < d->relatedMetaObjects.size())
partially evaluated: index >= 0
TRUEFALSE
yes
Evaluation Count:3
no
Evaluation Count:0
partially evaluated: index < d->relatedMetaObjects.size()
TRUEFALSE
yes
Evaluation Count:3
no
Evaluation Count:0
0-3
538 return d->relatedMetaObjects[index];
executed: return d->relatedMetaObjects[index];
Execution Count:3
3
539 else -
540 return 0;
never executed: return 0;
0
541} -
542QByteArray QMetaObjectBuilder::classInfoName(int index) const -
543{ -
544 if (index >= 0 && index < d->classInfoNames.size())
partially evaluated: index >= 0
TRUEFALSE
yes
Evaluation Count:4
no
Evaluation Count:0
evaluated: index < d->classInfoNames.size()
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:1
0-4
545 return d->classInfoNames[index];
executed: return d->classInfoNames[index];
Execution Count:3
3
546 else -
547 return QByteArray();
executed: return QByteArray();
Execution Count:1
1
548} -
549QByteArray QMetaObjectBuilder::classInfoValue(int index) const -
550{ -
551 if (index >= 0 && index < d->classInfoValues.size())
partially evaluated: index >= 0
TRUEFALSE
yes
Evaluation Count:4
no
Evaluation Count:0
evaluated: index < d->classInfoValues.size()
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:1
0-4
552 return d->classInfoValues[index];
executed: return d->classInfoValues[index];
Execution Count:3
3
553 else -
554 return QByteArray();
executed: return QByteArray();
Execution Count:1
1
555} -
556void QMetaObjectBuilder::removeMethod(int index) -
557{ -
558 if (index >= 0 && index < d->methods.size()) {
partially evaluated: index >= 0
TRUEFALSE
yes
Evaluation Count:3
no
Evaluation Count:0
partially evaluated: index < d->methods.size()
TRUEFALSE
yes
Evaluation Count:3
no
Evaluation Count:0
0-3
559 d->methods.removeAt(index); -
560 for (int prop = 0; prop < d->properties.size(); ++prop) {
evaluated: prop < d->properties.size()
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:3
2-3
561 -
562 if (d->properties[prop].notifySignal == index) {
evaluated: d->properties[prop].notifySignal == index
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:1
1
563 d->properties[prop].notifySignal = -1; -
564 d->properties[prop].setFlag(Notify, false); -
565 } else if (d->properties[prop].notifySignal > index)
partially evaluated: d->properties[prop].notifySignal > index
TRUEFALSE
yes
Evaluation Count:1
no
Evaluation Count:0
executed: }
Execution Count:1
0-1
566 (d->properties[prop].notifySignal)--;
executed: (d->properties[prop].notifySignal)--;
Execution Count:1
1
567 } -
568 }
executed: }
Execution Count:3
3
569}
executed: }
Execution Count:3
3
570void QMetaObjectBuilder::removeConstructor(int index) -
571{ -
572 if (index >= 0 && index < d->constructors.size())
partially evaluated: index >= 0
TRUEFALSE
yes
Evaluation Count:1
no
Evaluation Count:0
partially evaluated: index < d->constructors.size()
TRUEFALSE
yes
Evaluation Count:1
no
Evaluation Count:0
0-1
573 d->constructors.removeAt(index);
executed: d->constructors.removeAt(index);
Execution Count:1
1
574}
executed: }
Execution Count:1
1
575 -
576 -
577 -
578 -
579 -
580 -
581 -
582void QMetaObjectBuilder::removeProperty(int index) -
583{ -
584 if (index >= 0 && index < d->properties.size())
partially evaluated: index >= 0
TRUEFALSE
yes
Evaluation Count:1
no
Evaluation Count:0
partially evaluated: index < d->properties.size()
TRUEFALSE
yes
Evaluation Count:1
no
Evaluation Count:0
0-1
585 d->properties.removeAt(index);
executed: d->properties.removeAt(index);
Execution Count:1
1
586}
executed: }
Execution Count:1
1
587void QMetaObjectBuilder::removeEnumerator(int index) -
588{ -
589 if (index >= 0 && index < d->enumerators.size())
partially evaluated: index >= 0
TRUEFALSE
yes
Evaluation Count:1
no
Evaluation Count:0
partially evaluated: index < d->enumerators.size()
TRUEFALSE
yes
Evaluation Count:1
no
Evaluation Count:0
0-1
590 d->enumerators.removeAt(index);
executed: d->enumerators.removeAt(index);
Execution Count:1
1
591}
executed: }
Execution Count:1
1
592void QMetaObjectBuilder::removeClassInfo(int index) -
593{ -
594 if (index >= 0 && index < d->classInfoNames.size()) {
partially evaluated: index >= 0
TRUEFALSE
yes
Evaluation Count:1
no
Evaluation Count:0
partially evaluated: index < d->classInfoNames.size()
TRUEFALSE
yes
Evaluation Count:1
no
Evaluation Count:0
0-1
595 d->classInfoNames.removeAt(index); -
596 d->classInfoValues.removeAt(index); -
597 }
executed: }
Execution Count:1
1
598}
executed: }
Execution Count:1
1
599void QMetaObjectBuilder::removeRelatedMetaObject(int index) -
600{ -
601 if (index >= 0 && index < d->relatedMetaObjects.size())
partially evaluated: index >= 0
TRUEFALSE
yes
Evaluation Count:1
no
Evaluation Count:0
partially evaluated: index < d->relatedMetaObjects.size()
TRUEFALSE
yes
Evaluation Count:1
no
Evaluation Count:0
0-1
602 d->relatedMetaObjects.removeAt(index);
executed: d->relatedMetaObjects.removeAt(index);
Execution Count:1
1
603}
executed: }
Execution Count:1
1
604 -
605 -
606 -
607 -
608 -
609 -
610 -
611int QMetaObjectBuilder::indexOfMethod(const QByteArray& signature) -
612{ -
613 QByteArray sig = QMetaObject::normalizedSignature(signature); -
614 for (int index = 0; index < d->methods.size(); ++index) {
evaluated: index < d->methods.size()
TRUEFALSE
yes
Evaluation Count:17
yes
Evaluation Count:4
4-17
615 if (sig == d->methods[index].signature)
evaluated: sig == d->methods[index].signature
TRUEFALSE
yes
Evaluation Count:6
yes
Evaluation Count:11
6-11
616 return index;
executed: return index;
Execution Count:6
6
617 }
executed: }
Execution Count:11
11
618 return -1;
executed: return -1;
Execution Count:4
4
619} -
620 -
621 -
622 -
623 -
624 -
625 -
626 -
627int QMetaObjectBuilder::indexOfSignal(const QByteArray& signature) -
628{ -
629 QByteArray sig = QMetaObject::normalizedSignature(signature); -
630 for (int index = 0; index < d->methods.size(); ++index) {
evaluated: index < d->methods.size()
TRUEFALSE
yes
Evaluation Count:5
yes
Evaluation Count:1
1-5
631 if (sig == d->methods[index].signature &&
evaluated: sig == d->methods[index].signature
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:3
2-3
632 d->methods[index].methodType() == QMetaMethod::Signal)
partially evaluated: d->methods[index].methodType() == QMetaMethod::Signal
TRUEFALSE
yes
Evaluation Count:2
no
Evaluation Count:0
0-2
633 return index;
executed: return index;
Execution Count:2
2
634 }
executed: }
Execution Count:3
3
635 return -1;
executed: return -1;
Execution Count:1
1
636} -
637 -
638 -
639 -
640 -
641 -
642 -
643 -
644int QMetaObjectBuilder::indexOfSlot(const QByteArray& signature) -
645{ -
646 QByteArray sig = QMetaObject::normalizedSignature(signature); -
647 for (int index = 0; index < d->methods.size(); ++index) {
evaluated: index < d->methods.size()
TRUEFALSE
yes
Evaluation Count:5
yes
Evaluation Count:1
1-5
648 if (sig == d->methods[index].signature &&
evaluated: sig == d->methods[index].signature
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:3
2-3
649 d->methods[index].methodType() == QMetaMethod::Slot)
partially evaluated: d->methods[index].methodType() == QMetaMethod::Slot
TRUEFALSE
yes
Evaluation Count:2
no
Evaluation Count:0
0-2
650 return index;
executed: return index;
Execution Count:2
2
651 }
executed: }
Execution Count:3
3
652 return -1;
executed: return -1;
Execution Count:1
1
653} -
654 -
655 -
656 -
657 -
658 -
659 -
660 -
661int QMetaObjectBuilder::indexOfConstructor(const QByteArray& signature) -
662{ -
663 QByteArray sig = QMetaObject::normalizedSignature(signature); -
664 for (int index = 0; index < d->constructors.size(); ++index) {
evaluated: index < d->constructors.size()
TRUEFALSE
yes
Evaluation Count:8
yes
Evaluation Count:3
3-8
665 if (sig == d->constructors[index].signature)
evaluated: sig == d->constructors[index].signature
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:5
3-5
666 return index;
executed: return index;
Execution Count:3
3
667 }
executed: }
Execution Count:5
5
668 return -1;
executed: return -1;
Execution Count:3
3
669} -
670 -
671 -
672 -
673 -
674 -
675 -
676 -
677int QMetaObjectBuilder::indexOfProperty(const QByteArray& name) -
678{ -
679 for (int index = 0; index < d->properties.size(); ++index) {
evaluated: index < d->properties.size()
TRUEFALSE
yes
Evaluation Count:8
yes
Evaluation Count:3
3-8
680 if (name == d->properties[index].name)
evaluated: name == d->properties[index].name
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:5
3-5
681 return index;
executed: return index;
Execution Count:3
3
682 }
executed: }
Execution Count:5
5
683 return -1;
executed: return -1;
Execution Count:3
3
684} -
685 -
686 -
687 -
688 -
689 -
690 -
691 -
692int QMetaObjectBuilder::indexOfEnumerator(const QByteArray& name) -
693{ -
694 for (int index = 0; index < d->enumerators.size(); ++index) {
evaluated: index < d->enumerators.size()
TRUEFALSE
yes
Evaluation Count:8
yes
Evaluation Count:3
3-8
695 if (name == d->enumerators[index].name)
evaluated: name == d->enumerators[index].name
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:5
3-5
696 return index;
executed: return index;
Execution Count:3
3
697 }
executed: }
Execution Count:5
5
698 return -1;
executed: return -1;
Execution Count:3
3
699} -
700int QMetaObjectBuilder::indexOfClassInfo(const QByteArray& name) -
701{ -
702 for (int index = 0; index < d->classInfoNames.size(); ++index) {
evaluated: index < d->classInfoNames.size()
TRUEFALSE
yes
Evaluation Count:8
yes
Evaluation Count:3
3-8
703 if (name == d->classInfoNames[index])
evaluated: name == d->classInfoNames[index]
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:5
3-5
704 return index;
executed: return index;
Execution Count:3
3
705 }
executed: }
Execution Count:5
5
706 return -1;
executed: return -1;
Execution Count:3
3
707} -
708QMetaStringTable::QMetaStringTable() -
709 : m_index(0) {}
executed: }
Execution Count:168
168
710 -
711 -
712 -
713int QMetaStringTable::enter(const QByteArray &value) -
714{ -
715 Entries::iterator it = m_entries.find(value); -
716 if (it != m_entries.end())
evaluated: it != m_entries.end()
TRUEFALSE
yes
Evaluation Count:1440
yes
Evaluation Count:2231
1440-2231
717 return it.value();
executed: return it.value();
Execution Count:1440
1440
718 int pos = m_index; -
719 m_entries.insert(value, pos); -
720 ++m_index; -
721 return pos;
executed: return pos;
Execution Count:2231
2231
722} -
723 -
724int QMetaStringTable::preferredAlignment() -
725{ -
726 return __alignof__(QByteArrayData);
never executed: return __alignof__(QByteArrayData);
0
727} -
728 -
729 -
730int QMetaStringTable::blobSize() const -
731{ -
732 int size = m_entries.size() * sizeof(QByteArrayData); -
733 Entries::const_iterator it; -
734 for (it = m_entries.constBegin(); it != m_entries.constEnd(); ++it)
evaluated: it != m_entries.constEnd()
TRUEFALSE
yes
Evaluation Count:2231
yes
Evaluation Count:168
168-2231
735 size += it.key().size() + 1;
executed: size += it.key().size() + 1;
Execution Count:2231
2231
736 return size;
executed: return size;
Execution Count:168
168
737} -
738 -
739 -
740 -
741 -
742 -
743void QMetaStringTable::writeBlob(char *out) -
744{ -
745 qt_noop(); -
746 -
747 int offsetOfStringdataMember = m_entries.size() * sizeof(QByteArrayData); -
748 int stringdataOffset = 0; -
749 for (int i = 0; i < m_entries.size(); ++i) {
evaluated: i < m_entries.size()
TRUEFALSE
yes
Evaluation Count:1984
yes
Evaluation Count:151
151-1984
750 const QByteArray &str = m_entries.key(i); -
751 int size = str.size(); -
752 qptrdiff offset = offsetOfStringdataMember + stringdataOffset -
753 - i * sizeof(QByteArrayData); -
754 const QByteArrayData data = -
755 { { { (-1) } }, size, 0, 0, offset }; -
756 -
757 memcpy(out + i * sizeof(QByteArrayData), &data, sizeof(QByteArrayData)); -
758 -
759 memcpy(out + offsetOfStringdataMember + stringdataOffset, str.constData(), size); -
760 out[offsetOfStringdataMember + stringdataOffset + size] = '\0'; -
761 -
762 stringdataOffset += size + 1; -
763 }
executed: }
Execution Count:1984
1984
764}
executed: }
Execution Count:151
151
765 -
766 -
767 -
768 -
769static int aggregateParameterCount(const QList<QMetaMethodBuilderPrivate> &methods) -
770{ -
771 int sum = 0; -
772 for (int i = 0; i < methods.size(); ++i)
evaluated: i < methods.size()
TRUEFALSE
yes
Evaluation Count:234
yes
Evaluation Count:68
68-234
773 sum += methods.at(i).parameterCount() + 1;
executed: sum += methods.at(i).parameterCount() + 1;
Execution Count:234
234
774 return sum;
executed: return sum;
Execution Count:68
68
775} -
776 -
777 -
778 -
779 -
780 -
781static int buildMetaObject(QMetaObjectBuilderPrivate *d, char *buf, -
782 int expectedSize, bool relocatable) -
783{ -
784 (void)expectedSize;; -
785 int size = 0; -
786 int dataIndex; -
787 int paramsIndex; -
788 int enumIndex; -
789 int index; -
790 bool hasRevisionedMethods = d->hasRevisionedMethods(); -
791 bool hasRevisionedProperties = d->hasRevisionedProperties(); -
792 bool hasNotifySignals = false; -
793 -
794 if (relocatable &&
evaluated: relocatable
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:32
2-32
795 (d->relatedMetaObjects.size() > 0 || d->staticMetacallFunction))
partially evaluated: d->relatedMetaObjects.size() > 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2
partially evaluated: d->staticMetacallFunction
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2
0-2
796 return -1;
never executed: return -1;
0
797 -
798 -
799 QMetaObject *meta = reinterpret_cast<QMetaObject *>(buf); -
800 size += sizeof(QMetaObject); -
801 (size) = ((size) + sizeof(int) - 1) & ~(sizeof(int) - 1); -
802 if (buf) {
evaluated: buf
TRUEFALSE
yes
Evaluation Count:17
yes
Evaluation Count:17
17
803 if (!relocatable) meta->d.superdata = d->superClass;
executed: meta->d.superdata = d->superClass;
Execution Count:16
evaluated: !relocatable
TRUEFALSE
yes
Evaluation Count:16
yes
Evaluation Count:1
1-16
804 meta->d.relatedMetaObjects = 0; -
805 meta->d.extradata = 0; -
806 meta->d.static_metacall = d->staticMetacallFunction; -
807 }
executed: }
Execution Count:17
17
808 -
809 -
810 QMetaObjectPrivate *pmeta -
811 = reinterpret_cast<QMetaObjectPrivate *>(buf + size); -
812 int pmetaSize = size; -
813 dataIndex = MetaObjectPrivateFieldCount; -
814 for (index = 0; index < d->properties.size(); ++index) {
evaluated: index < d->properties.size()
TRUEFALSE
yes
Evaluation Count:32
yes
Evaluation Count:4
4-32
815 if (d->properties[index].notifySignal != -1) {
evaluated: d->properties[index].notifySignal != -1
TRUEFALSE
yes
Evaluation Count:30
yes
Evaluation Count:2
2-30
816 hasNotifySignals = true; -
817 break;
executed: break;
Execution Count:30
30
818 } -
819 }
executed: }
Execution Count:2
2
820 int methodParametersDataSize = -
821 ((aggregateParameterCount(d->methods) -
822 + aggregateParameterCount(d->constructors)) * 2) -
823 - d->methods.size() -
824 - d->constructors.size(); -
825 if (buf) {
evaluated: buf
TRUEFALSE
yes
Evaluation Count:17
yes
Evaluation Count:17
17
826 static_assert(bool(QMetaObjectPrivate::OutputRevision == 7), "QMetaObjectBuilder should generate the same version as moc"); -
827 pmeta->revision = QMetaObjectPrivate::OutputRevision; -
828 pmeta->flags = d->flags; -
829 pmeta->className = 0; -
830 -
831 -
832 pmeta->classInfoCount = d->classInfoNames.size(); -
833 pmeta->classInfoData = dataIndex; -
834 dataIndex += 2 * d->classInfoNames.size(); -
835 -
836 pmeta->methodCount = d->methods.size(); -
837 pmeta->methodData = dataIndex; -
838 dataIndex += 5 * d->methods.size(); -
839 if (hasRevisionedMethods)
evaluated: hasRevisionedMethods
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:14
3-14
840 dataIndex += d->methods.size();
executed: dataIndex += d->methods.size();
Execution Count:3
3
841 paramsIndex = dataIndex; -
842 dataIndex += methodParametersDataSize; -
843 -
844 pmeta->propertyCount = d->properties.size(); -
845 pmeta->propertyData = dataIndex; -
846 dataIndex += 3 * d->properties.size(); -
847 if (hasNotifySignals)
evaluated: hasNotifySignals
TRUEFALSE
yes
Evaluation Count:15
yes
Evaluation Count:2
2-15
848 dataIndex += d->properties.size();
executed: dataIndex += d->properties.size();
Execution Count:15
15
849 if (hasRevisionedProperties)
evaluated: hasRevisionedProperties
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:14
3-14
850 dataIndex += d->properties.size();
executed: dataIndex += d->properties.size();
Execution Count:3
3
851 -
852 pmeta->enumeratorCount = d->enumerators.size(); -
853 pmeta->enumeratorData = dataIndex; -
854 dataIndex += 4 * d->enumerators.size(); -
855 -
856 pmeta->constructorCount = d->constructors.size(); -
857 pmeta->constructorData = dataIndex; -
858 dataIndex += 5 * d->constructors.size(); -
859 } else {
executed: }
Execution Count:17
17
860 dataIndex += 2 * d->classInfoNames.size(); -
861 dataIndex += 5 * d->methods.size(); -
862 if (hasRevisionedMethods)
evaluated: hasRevisionedMethods
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:14
3-14
863 dataIndex += d->methods.size();
executed: dataIndex += d->methods.size();
Execution Count:3
3
864 paramsIndex = dataIndex; -
865 dataIndex += methodParametersDataSize; -
866 dataIndex += 3 * d->properties.size(); -
867 if (hasNotifySignals)
evaluated: hasNotifySignals
TRUEFALSE
yes
Evaluation Count:15
yes
Evaluation Count:2
2-15
868 dataIndex += d->properties.size();
executed: dataIndex += d->properties.size();
Execution Count:15
15
869 if (hasRevisionedProperties)
evaluated: hasRevisionedProperties
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:14
3-14
870 dataIndex += d->properties.size();
executed: dataIndex += d->properties.size();
Execution Count:3
3
871 dataIndex += 4 * d->enumerators.size(); -
872 dataIndex += 5 * d->constructors.size(); -
873 }
executed: }
Execution Count:17
17
874 -
875 -
876 enumIndex = dataIndex; -
877 for (index = 0; index < d->enumerators.size(); ++index) {
evaluated: index < d->enumerators.size()
TRUEFALSE
yes
Evaluation Count:12
yes
Evaluation Count:34
12-34
878 QMetaEnumBuilderPrivate *enumerator = &(d->enumerators[index]); -
879 dataIndex += 2 * enumerator->keys.size(); -
880 }
executed: }
Execution Count:12
12
881 -
882 -
883 ++dataIndex; -
884 -
885 -
886 int *data = reinterpret_cast<int *>(pmeta); -
887 size += dataIndex * sizeof(int); -
888 (size) = ((size) + sizeof(void *) - 1) & ~(sizeof(void *) - 1); -
889 char *str = reinterpret_cast<char *>(buf + size); -
890 if (buf) {
evaluated: buf
TRUEFALSE
yes
Evaluation Count:17
yes
Evaluation Count:17
17
891 if (relocatable) {
evaluated: relocatable
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:16
1-16
892 meta->d.stringdata = reinterpret_cast<const QByteArrayData *>((quintptr)size); -
893 meta->d.data = reinterpret_cast<uint *>((quintptr)pmetaSize); -
894 } else {
executed: }
Execution Count:1
1
895 meta->d.stringdata = reinterpret_cast<const QByteArrayData *>(str); -
896 meta->d.data = reinterpret_cast<uint *>(data); -
897 }
executed: }
Execution Count:16
16
898 } -
899 -
900 -
901 dataIndex = MetaObjectPrivateFieldCount; -
902 -
903 QMetaStringTable strings; -
904 strings.enter(d->className); -
905 -
906 -
907 qt_noop(); -
908 for (index = 0; index < d->classInfoNames.size(); ++index) {
evaluated: index < d->classInfoNames.size()
TRUEFALSE
yes
Evaluation Count:12
yes
Evaluation Count:34
12-34
909 int name = strings.enter(d->classInfoNames[index]); -
910 int value = strings.enter(d->classInfoValues[index]); -
911 if (buf) {
evaluated: buf
TRUEFALSE
yes
Evaluation Count:6
yes
Evaluation Count:6
6
912 data[dataIndex] = name; -
913 data[dataIndex + 1] = value; -
914 }
executed: }
Execution Count:6
6
915 dataIndex += 2; -
916 }
executed: }
Execution Count:12
12
917 -
918 -
919 qt_noop(); -
920 for (index = 0; index < d->methods.size(); ++index) {
evaluated: index < d->methods.size()
TRUEFALSE
yes
Evaluation Count:188
yes
Evaluation Count:34
34-188
921 QMetaMethodBuilderPrivate *method = &(d->methods[index]); -
922 int name = strings.enter(method->name()); -
923 int argc = method->parameterCount(); -
924 int tag = strings.enter(method->tag); -
925 int attrs = method->attributes; -
926 if (buf) {
evaluated: buf
TRUEFALSE
yes
Evaluation Count:94
yes
Evaluation Count:94
94
927 data[dataIndex] = name; -
928 data[dataIndex + 1] = argc; -
929 data[dataIndex + 2] = paramsIndex; -
930 data[dataIndex + 3] = tag; -
931 data[dataIndex + 4] = attrs; -
932 if (method->methodType() == QMetaMethod::Signal)
evaluated: method->methodType() == QMetaMethod::Signal
TRUEFALSE
yes
Evaluation Count:23
yes
Evaluation Count:71
23-71
933 pmeta->signalCount++;
executed: pmeta->signalCount++;
Execution Count:23
23
934 }
executed: }
Execution Count:94
94
935 dataIndex += 5; -
936 paramsIndex += 1 + argc * 2; -
937 }
executed: }
Execution Count:188
188
938 if (hasRevisionedMethods) {
evaluated: hasRevisionedMethods
TRUEFALSE
yes
Evaluation Count:6
yes
Evaluation Count:28
6-28
939 for (index = 0; index < d->methods.size(); ++index) {
evaluated: index < d->methods.size()
TRUEFALSE
yes
Evaluation Count:60
yes
Evaluation Count:6
6-60
940 QMetaMethodBuilderPrivate *method = &(d->methods[index]); -
941 if (buf)
evaluated: buf
TRUEFALSE
yes
Evaluation Count:30
yes
Evaluation Count:30
30
942 data[dataIndex] = method->revision;
executed: data[dataIndex] = method->revision;
Execution Count:30
30
943 ++dataIndex; -
944 }
executed: }
Execution Count:60
60
945 }
executed: }
Execution Count:6
6
946 -
947 -
948 qt_noop(); -
949 -
950 for (int x = 0; x < 2; ++x) {
evaluated: x < 2
TRUEFALSE
yes
Evaluation Count:68
yes
Evaluation Count:34
34-68
951 QList<QMetaMethodBuilderPrivate> &methods = (x == 0) ? d->methods : d->constructors;
evaluated: (x == 0)
TRUEFALSE
yes
Evaluation Count:34
yes
Evaluation Count:34
34
952 for (index = 0; index < methods.size(); ++index) {
evaluated: index < methods.size()
TRUEFALSE
yes
Evaluation Count:234
yes
Evaluation Count:68
68-234
953 QMetaMethodBuilderPrivate *method = &(methods[index]); -
954 QList<QByteArray> paramTypeNames = method->parameterTypes(); -
955 int paramCount = paramTypeNames.size(); -
956 for (int i = -1; i < paramCount; ++i) {
evaluated: i < paramCount
TRUEFALSE
yes
Evaluation Count:402
yes
Evaluation Count:234
234-402
957 const QByteArray &typeName = (i < 0) ? method->returnType : paramTypeNames.at(i);
evaluated: (i < 0)
TRUEFALSE
yes
Evaluation Count:234
yes
Evaluation Count:168
168-234
958 int typeInfo; -
959 if (QtPrivate::isBuiltinType(typeName))
partially evaluated: QtPrivate::isBuiltinType(typeName)
TRUEFALSE
yes
Evaluation Count:402
no
Evaluation Count:0
0-402
960 typeInfo = QMetaType::type(typeName);
executed: typeInfo = QMetaType::type(typeName);
Execution Count:402
402
961 else -
962 typeInfo = IsUnresolvedType | strings.enter(typeName);
never executed: typeInfo = IsUnresolvedType | strings.enter(typeName);
0
963 if (buf)
evaluated: buf
TRUEFALSE
yes
Evaluation Count:201
yes
Evaluation Count:201
201
964 data[dataIndex] = typeInfo;
executed: data[dataIndex] = typeInfo;
Execution Count:201
201
965 ++dataIndex; -
966 }
executed: }
Execution Count:402
402
967 -
968 QList<QByteArray> paramNames = method->parameterNames; -
969 while (paramNames.size() < paramCount)
evaluated: paramNames.size() < paramCount
TRUEFALSE
yes
Evaluation Count:18
yes
Evaluation Count:234
18-234
970 paramNames.append(QByteArray());
executed: paramNames.append(QByteArray());
Execution Count:18
18
971 for (int i = 0; i < paramCount; ++i) {
evaluated: i < paramCount
TRUEFALSE
yes
Evaluation Count:168
yes
Evaluation Count:234
168-234
972 int stringIndex = strings.enter(paramNames.at(i)); -
973 if (buf)
evaluated: buf
TRUEFALSE
yes
Evaluation Count:84
yes
Evaluation Count:84
84
974 data[dataIndex] = stringIndex;
executed: data[dataIndex] = stringIndex;
Execution Count:84
84
975 ++dataIndex; -
976 }
executed: }
Execution Count:168
168
977 }
executed: }
Execution Count:234
234
978 }
executed: }
Execution Count:68
68
979 -
980 -
981 qt_noop(); -
982 for (index = 0; index < d->properties.size(); ++index) {
evaluated: index < d->properties.size()
TRUEFALSE
yes
Evaluation Count:62
yes
Evaluation Count:34
34-62
983 QMetaPropertyBuilderPrivate *prop = &(d->properties[index]); -
984 int name = strings.enter(prop->name); -
985 -
986 int typeInfo; -
987 if (QtPrivate::isBuiltinType(prop->type))
evaluated: QtPrivate::isBuiltinType(prop->type)
TRUEFALSE
yes
Evaluation Count:44
yes
Evaluation Count:18
18-44
988 typeInfo = QMetaType::type(prop->type);
executed: typeInfo = QMetaType::type(prop->type);
Execution Count:44
44
989 else -
990 typeInfo = IsUnresolvedType | strings.enter(prop->type);
executed: typeInfo = IsUnresolvedType | strings.enter(prop->type);
Execution Count:18
18
991 -
992 int flags = prop->flags; -
993 -
994 if (!QtPrivate::isBuiltinType(prop->type))
evaluated: !QtPrivate::isBuiltinType(prop->type)
TRUEFALSE
yes
Evaluation Count:18
yes
Evaluation Count:44
18-44
995 flags |= EnumOrFlag;
executed: flags |= EnumOrFlag;
Execution Count:18
18
996 -
997 if (buf) {
evaluated: buf
TRUEFALSE
yes
Evaluation Count:31
yes
Evaluation Count:31
31
998 data[dataIndex] = name; -
999 data[dataIndex + 1] = typeInfo; -
1000 data[dataIndex + 2] = flags; -
1001 }
executed: }
Execution Count:31
31
1002 dataIndex += 3; -
1003 }
executed: }
Execution Count:62
62
1004 if (hasNotifySignals) {
evaluated: hasNotifySignals
TRUEFALSE
yes
Evaluation Count:30
yes
Evaluation Count:4
4-30
1005 for (index = 0; index < d->properties.size(); ++index) {
evaluated: index < d->properties.size()
TRUEFALSE
yes
Evaluation Count:60
yes
Evaluation Count:30
30-60
1006 QMetaPropertyBuilderPrivate *prop = &(d->properties[index]); -
1007 if (buf) {
evaluated: buf
TRUEFALSE
yes
Evaluation Count:30
yes
Evaluation Count:30
30
1008 if (prop->notifySignal != -1)
evaluated: prop->notifySignal != -1
TRUEFALSE
yes
Evaluation Count:15
yes
Evaluation Count:15
15
1009 data[dataIndex] = prop->notifySignal;
executed: data[dataIndex] = prop->notifySignal;
Execution Count:15
15
1010 else -
1011 data[dataIndex] = 0;
executed: data[dataIndex] = 0;
Execution Count:15
15
1012 } -
1013 ++dataIndex; -
1014 }
executed: }
Execution Count:60
60
1015 }
executed: }
Execution Count:30
30
1016 if (hasRevisionedProperties) {
evaluated: hasRevisionedProperties
TRUEFALSE
yes
Evaluation Count:6
yes
Evaluation Count:28
6-28
1017 for (index = 0; index < d->properties.size(); ++index) {
evaluated: index < d->properties.size()
TRUEFALSE
yes
Evaluation Count:36
yes
Evaluation Count:6
6-36
1018 QMetaPropertyBuilderPrivate *prop = &(d->properties[index]); -
1019 if (buf)
evaluated: buf
TRUEFALSE
yes
Evaluation Count:18
yes
Evaluation Count:18
18
1020 data[dataIndex] = prop->revision;
executed: data[dataIndex] = prop->revision;
Execution Count:18
18
1021 ++dataIndex; -
1022 }
executed: }
Execution Count:36
36
1023 }
executed: }
Execution Count:6
6
1024 -
1025 -
1026 qt_noop(); -
1027 for (index = 0; index < d->enumerators.size(); ++index) {
evaluated: index < d->enumerators.size()
TRUEFALSE
yes
Evaluation Count:12
yes
Evaluation Count:34
12-34
1028 QMetaEnumBuilderPrivate *enumerator = &(d->enumerators[index]); -
1029 int name = strings.enter(enumerator->name); -
1030 int isFlag = (int)(enumerator->isFlag); -
1031 int count = enumerator->keys.size(); -
1032 int enumOffset = enumIndex; -
1033 if (buf) {
evaluated: buf
TRUEFALSE
yes
Evaluation Count:6
yes
Evaluation Count:6
6
1034 data[dataIndex] = name; -
1035 data[dataIndex + 1] = isFlag; -
1036 data[dataIndex + 2] = count; -
1037 data[dataIndex + 3] = enumOffset; -
1038 }
executed: }
Execution Count:6
6
1039 for (int key = 0; key < count; ++key) {
evaluated: key < count
TRUEFALSE
yes
Evaluation Count:24
yes
Evaluation Count:12
12-24
1040 int keyIndex = strings.enter(enumerator->keys[key]); -
1041 if (buf) {
evaluated: buf
TRUEFALSE
yes
Evaluation Count:12
yes
Evaluation Count:12
12
1042 data[enumOffset++] = keyIndex; -
1043 data[enumOffset++] = enumerator->values[key]; -
1044 }
executed: }
Execution Count:12
12
1045 }
executed: }
Execution Count:24
24
1046 dataIndex += 4; -
1047 enumIndex += 2 * count; -
1048 }
executed: }
Execution Count:12
12
1049 -
1050 -
1051 qt_noop(); -
1052 for (index = 0; index < d->constructors.size(); ++index) {
evaluated: index < d->constructors.size()
TRUEFALSE
yes
Evaluation Count:46
yes
Evaluation Count:34
34-46
1053 QMetaMethodBuilderPrivate *method = &(d->constructors[index]); -
1054 int name = strings.enter(method->name()); -
1055 int argc = method->parameterCount(); -
1056 int tag = strings.enter(method->tag); -
1057 int attrs = method->attributes; -
1058 if (buf) {
evaluated: buf
TRUEFALSE
yes
Evaluation Count:23
yes
Evaluation Count:23
23
1059 data[dataIndex] = name; -
1060 data[dataIndex + 1] = argc; -
1061 data[dataIndex + 2] = paramsIndex; -
1062 data[dataIndex + 3] = tag; -
1063 data[dataIndex + 4] = attrs; -
1064 }
executed: }
Execution Count:23
23
1065 dataIndex += 5; -
1066 paramsIndex += 1 + argc * 2; -
1067 }
executed: }
Execution Count:46
46
1068 -
1069 size += strings.blobSize(); -
1070 -
1071 if (buf)
evaluated: buf
TRUEFALSE
yes
Evaluation Count:17
yes
Evaluation Count:17
17
1072 strings.writeBlob(str);
executed: strings.writeBlob(str);
Execution Count:17
17
1073 -
1074 -
1075 if (buf)
evaluated: buf
TRUEFALSE
yes
Evaluation Count:17
yes
Evaluation Count:17
17
1076 data[enumIndex] = 0;
executed: data[enumIndex] = 0;
Execution Count:17
17
1077 -
1078 -
1079 if (d->relatedMetaObjects.size() > 0) {
evaluated: d->relatedMetaObjects.size() > 0
TRUEFALSE
yes
Evaluation Count:6
yes
Evaluation Count:28
6-28
1080 (size) = ((size) + sizeof(QMetaObject *) - 1) & ~(sizeof(QMetaObject *) - 1); -
1081 const QMetaObject **objects = -
1082 reinterpret_cast<const QMetaObject **>(buf + size); -
1083 if (buf) {
evaluated: buf
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:3
3
1084 meta->d.relatedMetaObjects = objects; -
1085 for (index = 0; index < d->relatedMetaObjects.size(); ++index)
evaluated: index < d->relatedMetaObjects.size()
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:3
3
1086 objects[index] = d->relatedMetaObjects[index];
executed: objects[index] = d->relatedMetaObjects[index];
Execution Count:3
3
1087 objects[index] = 0; -
1088 }
executed: }
Execution Count:3
3
1089 size += sizeof(QMetaObject *) * (d->relatedMetaObjects.size() + 1); -
1090 }
executed: }
Execution Count:6
6
1091 -
1092 -
1093 (size) = ((size) + sizeof(void *) - 1) & ~(sizeof(void *) - 1); -
1094 qt_noop(); -
1095 return size;
executed: return size;
Execution Count:34
34
1096} -
1097QMetaObject *QMetaObjectBuilder::toMetaObject() const -
1098{ -
1099 int size = buildMetaObject(d, 0, 0, false); -
1100 char *buf = reinterpret_cast<char *>(malloc(size)); -
1101 memset(buf, 0, size); -
1102 buildMetaObject(d, buf, size, false); -
1103 return reinterpret_cast<QMetaObject *>(buf);
executed: return reinterpret_cast<QMetaObject *>(buf);
Execution Count:16
16
1104} -
1105QByteArray QMetaObjectBuilder::toRelocatableData(bool *ok) const -
1106{ -
1107 int size = buildMetaObject(d, 0, 0, true); -
1108 if (size == -1) {
partially evaluated: size == -1
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1
0-1
1109 if (ok) *ok = false;
never executed: *ok = false;
never evaluated: ok
0
1110 return QByteArray();
never executed: return QByteArray();
0
1111 } -
1112 -
1113 QByteArray data; -
1114 data.resize(size); -
1115 char *buf = data.data(); -
1116 memset(buf, 0, size); -
1117 buildMetaObject(d, buf, size, true); -
1118 if (ok) *ok = true;
executed: *ok = true;
Execution Count:1
partially evaluated: ok
TRUEFALSE
yes
Evaluation Count:1
no
Evaluation Count:0
0-1
1119 return data;
executed: return data;
Execution Count:1
1
1120} -
1121void QMetaObjectBuilder::fromRelocatableData(QMetaObject *output, -
1122 const QMetaObject *superclass, -
1123 const QByteArray &data) -
1124{ -
1125 if (!output)
partially evaluated: !output
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1
0-1
1126 return;
never executed: return;
0
1127 -
1128 const char *buf = data.constData(); -
1129 const QMetaObject *dataMo = reinterpret_cast<const QMetaObject *>(buf); -
1130 -
1131 quintptr stringdataOffset = (quintptr)dataMo->d.stringdata; -
1132 quintptr dataOffset = (quintptr)dataMo->d.data; -
1133 -
1134 output->d.superdata = superclass; -
1135 output->d.stringdata = reinterpret_cast<const QByteArrayData *>(buf + stringdataOffset); -
1136 output->d.data = reinterpret_cast<const uint *>(buf + dataOffset); -
1137 output->d.extradata = 0; -
1138 output->d.relatedMetaObjects = 0; -
1139 output->d.static_metacall = 0; -
1140}
executed: }
Execution Count:1
1
1141QMetaObjectBuilder::StaticMetacallFunction QMetaObjectBuilder::staticMetacallFunction() const -
1142{ -
1143 return d->staticMetacallFunction;
executed: return d->staticMetacallFunction;
Execution Count:15
15
1144} -
1145 -
1146 -
1147 -
1148 -
1149 -
1150 -
1151 -
1152void QMetaObjectBuilder::setStaticMetacallFunction -
1153 (QMetaObjectBuilder::StaticMetacallFunction value) -
1154{ -
1155 d->staticMetacallFunction = value; -
1156}
executed: }
Execution Count:15
15
1157void QMetaObjectBuilder::serialize(QDataStream& stream) const -
1158{ -
1159 int index; -
1160 -
1161 -
1162 stream << d->className; -
1163 if (d->superClass)
partially evaluated: d->superClass
TRUEFALSE
yes
Evaluation Count:2
no
Evaluation Count:0
0-2
1164 stream << QByteArray(d->superClass->className());
executed: stream << QByteArray(d->superClass->className());
Execution Count:2
2
1165 else -
1166 stream << QByteArray();
never executed: stream << QByteArray();
0
1167 -
1168 -
1169 stream << d->classInfoNames.size(); -
1170 stream << d->methods.size(); -
1171 stream << d->properties.size(); -
1172 stream << d->enumerators.size(); -
1173 stream << d->constructors.size(); -
1174 stream << d->relatedMetaObjects.size(); -
1175 -
1176 -
1177 for (index = 0; index < d->classInfoNames.size(); ++index) {
evaluated: index < d->classInfoNames.size()
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:2
2
1178 stream << d->classInfoNames[index]; -
1179 stream << d->classInfoValues[index]; -
1180 }
executed: }
Execution Count:2
2
1181 -
1182 -
1183 for (index = 0; index < d->methods.size(); ++index) {
evaluated: index < d->methods.size()
TRUEFALSE
yes
Evaluation Count:10
yes
Evaluation Count:2
2-10
1184 const QMetaMethodBuilderPrivate *method = &(d->methods[index]); -
1185 stream << method->signature; -
1186 stream << method->returnType; -
1187 stream << method->parameterNames; -
1188 stream << method->tag; -
1189 stream << method->attributes; -
1190 if (method->revision)
evaluated: method->revision
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:9
1-9
1191 stream << method->revision;
executed: stream << method->revision;
Execution Count:1
1
1192 }
executed: }
Execution Count:10
10
1193 -
1194 -
1195 for (index = 0; index < d->properties.size(); ++index) {
evaluated: index < d->properties.size()
TRUEFALSE
yes
Evaluation Count:7
yes
Evaluation Count:2
2-7
1196 const QMetaPropertyBuilderPrivate *property = &(d->properties[index]); -
1197 stream << property->name; -
1198 stream << property->type; -
1199 stream << property->flags; -
1200 stream << property->notifySignal; -
1201 if (property->revision)
evaluated: property->revision
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:6
1-6
1202 stream << property->revision;
executed: stream << property->revision;
Execution Count:1
1
1203 }
executed: }
Execution Count:7
7
1204 -
1205 -
1206 for (index = 0; index < d->enumerators.size(); ++index) {
evaluated: index < d->enumerators.size()
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:2
2
1207 const QMetaEnumBuilderPrivate *enumerator = &(d->enumerators[index]); -
1208 stream << enumerator->name; -
1209 stream << enumerator->isFlag; -
1210 stream << enumerator->keys; -
1211 stream << enumerator->values; -
1212 }
executed: }
Execution Count:2
2
1213 -
1214 -
1215 for (index = 0; index < d->constructors.size(); ++index) {
evaluated: index < d->constructors.size()
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:2
1-2
1216 const QMetaMethodBuilderPrivate *method = &(d->constructors[index]); -
1217 stream << method->signature; -
1218 stream << method->returnType; -
1219 stream << method->parameterNames; -
1220 stream << method->tag; -
1221 stream << method->attributes; -
1222 }
executed: }
Execution Count:1
1
1223 -
1224 -
1225 for (index = 0; index < d->relatedMetaObjects.size(); ++index) {
evaluated: index < d->relatedMetaObjects.size()
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:2
1-2
1226 const QMetaObject *meta = d->relatedMetaObjects[index]; -
1227 stream << QByteArray(meta->className()); -
1228 }
executed: }
Execution Count:1
1
1229 -
1230 -
1231 -
1232 -
1233 stream << QByteArray(); -
1234}
executed: }
Execution Count:2
2
1235 -
1236 -
1237static const QMetaObject *resolveClassName -
1238 (const QMap<QByteArray, const QMetaObject *>& references, -
1239 const QByteArray& name) -
1240{ -
1241 if (name == QByteArray("QObject"))
evaluated: name == QByteArray("QObject")
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:1
1-2
1242 return &QObject::staticMetaObject;
executed: return &QObject::staticMetaObject;
Execution Count:2
2
1243 else -
1244 return references.value(name, 0);
executed: return references.value(name, 0);
Execution Count:1
1
1245} -
1246void QMetaObjectBuilder::deserialize -
1247 (QDataStream& stream, -
1248 const QMap<QByteArray, const QMetaObject *>& references) -
1249{ -
1250 QByteArray name; -
1251 const QMetaObject *cl; -
1252 int index; -
1253 -
1254 -
1255 d->className.clear(); -
1256 d->superClass = &QObject::staticMetaObject; -
1257 d->classInfoNames.clear(); -
1258 d->classInfoValues.clear(); -
1259 d->methods.clear(); -
1260 d->properties.clear(); -
1261 d->enumerators.clear(); -
1262 d->constructors.clear(); -
1263 d->relatedMetaObjects.clear(); -
1264 d->staticMetacallFunction = 0; -
1265 -
1266 -
1267 stream >> d->className; -
1268 stream >> name; -
1269 if (name.isEmpty()) {
partially evaluated: name.isEmpty()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2
0-2
1270 d->superClass = 0; -
1271 } else if ((cl = resolveClassName(references, name)) != 0) {
never executed: }
partially evaluated: (cl = resolveClassName(references, name)) != 0
TRUEFALSE
yes
Evaluation Count:2
no
Evaluation Count:0
0-2
1272 d->superClass = cl; -
1273 } else {
executed: }
Execution Count:2
2
1274 stream.setStatus(QDataStream::ReadCorruptData); -
1275 return;
never executed: return;
0
1276 } -
1277 -
1278 -
1279 int classInfoCount, methodCount, propertyCount; -
1280 int enumeratorCount, constructorCount, relatedMetaObjectCount; -
1281 stream >> classInfoCount; -
1282 stream >> methodCount; -
1283 stream >> propertyCount; -
1284 stream >> enumeratorCount; -
1285 stream >> constructorCount; -
1286 stream >> relatedMetaObjectCount; -
1287 if (classInfoCount < 0 || methodCount < 0 ||
partially evaluated: classInfoCount < 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2
partially evaluated: methodCount < 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2
0-2
1288 propertyCount < 0 || enumeratorCount < 0 ||
partially evaluated: propertyCount < 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2
partially evaluated: enumeratorCount < 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2
0-2
1289 constructorCount < 0 || relatedMetaObjectCount < 0) {
partially evaluated: constructorCount < 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2
partially evaluated: relatedMetaObjectCount < 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2
0-2
1290 stream.setStatus(QDataStream::ReadCorruptData); -
1291 return;
never executed: return;
0
1292 } -
1293 -
1294 -
1295 for (index = 0; index < classInfoCount; ++index) {
evaluated: index < classInfoCount
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:2
2
1296 if (stream.status() != QDataStream::Ok)
partially evaluated: stream.status() != QDataStream::Ok
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2
0-2
1297 return;
never executed: return;
0
1298 QByteArray value; -
1299 stream >> name; -
1300 stream >> value; -
1301 addClassInfo(name, value); -
1302 }
executed: }
Execution Count:2
2
1303 -
1304 -
1305 for (index = 0; index < methodCount; ++index) {
evaluated: index < methodCount
TRUEFALSE
yes
Evaluation Count:10
yes
Evaluation Count:2
2-10
1306 if (stream.status() != QDataStream::Ok)
partially evaluated: stream.status() != QDataStream::Ok
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:10
0-10
1307 return;
never executed: return;
0
1308 stream >> name; -
1309 addMethod(name); -
1310 QMetaMethodBuilderPrivate *method = &(d->methods[index]); -
1311 stream >> method->returnType; -
1312 stream >> method->parameterNames; -
1313 stream >> method->tag; -
1314 stream >> method->attributes; -
1315 if (method->attributes & MethodRevisioned)
evaluated: method->attributes & MethodRevisioned
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:9
1-9
1316 stream >> method->revision;
executed: stream >> method->revision;
Execution Count:1
1
1317 if (method->methodType() == QMetaMethod::Constructor) {
partially evaluated: method->methodType() == QMetaMethod::Constructor
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:10
0-10
1318 -
1319 stream.setStatus(QDataStream::ReadCorruptData); -
1320 return;
never executed: return;
0
1321 } -
1322 }
executed: }
Execution Count:10
10
1323 -
1324 -
1325 for (index = 0; index < propertyCount; ++index) {
evaluated: index < propertyCount
TRUEFALSE
yes
Evaluation Count:7
yes
Evaluation Count:2
2-7
1326 if (stream.status() != QDataStream::Ok)
partially evaluated: stream.status() != QDataStream::Ok
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:7
0-7
1327 return;
never executed: return;
0
1328 QByteArray type; -
1329 stream >> name; -
1330 stream >> type; -
1331 addProperty(name, type); -
1332 QMetaPropertyBuilderPrivate *property = &(d->properties[index]); -
1333 stream >> property->flags; -
1334 stream >> property->notifySignal; -
1335 if (property->notifySignal < -1 ||
partially evaluated: property->notifySignal < -1
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:7
0-7
1336 property->notifySignal >= d->methods.size()) {
partially evaluated: property->notifySignal >= d->methods.size()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:7
0-7
1337 -
1338 stream.setStatus(QDataStream::ReadCorruptData); -
1339 return;
never executed: return;
0
1340 } -
1341 if (property->notifySignal >= 0 &&
evaluated: property->notifySignal >= 0
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:6
1-6
1342 d->methods[property->notifySignal].methodType() != QMetaMethod::Signal) {
partially evaluated: d->methods[property->notifySignal].methodType() != QMetaMethod::Signal
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1
0-1
1343 -
1344 stream.setStatus(QDataStream::ReadCorruptData); -
1345 return;
never executed: return;
0
1346 } -
1347 if (property->flags & Revisioned)
evaluated: property->flags & Revisioned
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:6
1-6
1348 stream >> property->revision;
executed: stream >> property->revision;
Execution Count:1
1
1349 }
executed: }
Execution Count:7
7
1350 -
1351 -
1352 for (index = 0; index < enumeratorCount; ++index) {
evaluated: index < enumeratorCount
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:2
2
1353 if (stream.status() != QDataStream::Ok)
partially evaluated: stream.status() != QDataStream::Ok
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2
0-2
1354 return;
never executed: return;
0
1355 stream >> name; -
1356 addEnumerator(name); -
1357 QMetaEnumBuilderPrivate *enumerator = &(d->enumerators[index]); -
1358 stream >> enumerator->isFlag; -
1359 stream >> enumerator->keys; -
1360 stream >> enumerator->values; -
1361 if (enumerator->keys.size() != enumerator->values.size()) {
partially evaluated: enumerator->keys.size() != enumerator->values.size()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:2
0-2
1362 -
1363 stream.setStatus(QDataStream::ReadCorruptData); -
1364 return;
never executed: return;
0
1365 } -
1366 }
executed: }
Execution Count:2
2
1367 -
1368 -
1369 for (index = 0; index < constructorCount; ++index) {
evaluated: index < constructorCount
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:2
1-2
1370 if (stream.status() != QDataStream::Ok)
partially evaluated: stream.status() != QDataStream::Ok
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1
0-1
1371 return;
never executed: return;
0
1372 stream >> name; -
1373 addConstructor(name); -
1374 QMetaMethodBuilderPrivate *method = &(d->constructors[index]); -
1375 stream >> method->returnType; -
1376 stream >> method->parameterNames; -
1377 stream >> method->tag; -
1378 stream >> method->attributes; -
1379 if (method->methodType() != QMetaMethod::Constructor) {
partially evaluated: method->methodType() != QMetaMethod::Constructor
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1
0-1
1380 -
1381 stream.setStatus(QDataStream::ReadCorruptData); -
1382 return;
never executed: return;
0
1383 } -
1384 }
executed: }
Execution Count:1
1
1385 -
1386 -
1387 for (index = 0; index < relatedMetaObjectCount; ++index) {
evaluated: index < relatedMetaObjectCount
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:2
1-2
1388 if (stream.status() != QDataStream::Ok)
partially evaluated: stream.status() != QDataStream::Ok
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1
0-1
1389 return;
never executed: return;
0
1390 stream >> name; -
1391 cl = resolveClassName(references, name); -
1392 if (!cl) {
partially evaluated: !cl
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1
0-1
1393 stream.setStatus(QDataStream::ReadCorruptData); -
1394 return;
never executed: return;
0
1395 } -
1396 addRelatedMetaObject(cl); -
1397 }
executed: }
Execution Count:1
1
1398 -
1399 -
1400 stream >> name; -
1401}
executed: }
Execution Count:2
2
1402QMetaMethodBuilderPrivate *QMetaMethodBuilder::d_func() const -
1403{ -
1404 -
1405 if (_mobj && _index >= 0 && _index < _mobj->d->methods.size())
evaluated: _mobj
TRUEFALSE
yes
Evaluation Count:560
yes
Evaluation Count:11
evaluated: _index >= 0
TRUEFALSE
yes
Evaluation Count:462
yes
Evaluation Count:98
partially evaluated: _index < _mobj->d->methods.size()
TRUEFALSE
yes
Evaluation Count:462
no
Evaluation Count:0
0-560
1406 return &(_mobj->d->methods[_index]);
executed: return &(_mobj->d->methods[_index]);
Execution Count:462
462
1407 else if (_mobj && -_index >= 1 && -_index <= _mobj->d->constructors.size())
evaluated: _mobj
TRUEFALSE
yes
Evaluation Count:98
yes
Evaluation Count:11
partially evaluated: -_index >= 1
TRUEFALSE
yes
Evaluation Count:98
no
Evaluation Count:0
partially evaluated: -_index <= _mobj->d->constructors.size()
TRUEFALSE
yes
Evaluation Count:98
no
Evaluation Count:0
0-98
1408 return &(_mobj->d->constructors[(-_index) - 1]);
executed: return &(_mobj->d->constructors[(-_index) - 1]);
Execution Count:98
98
1409 else -
1410 return 0;
executed: return 0;
Execution Count:11
11
1411} -
1412int QMetaMethodBuilder::index() const -
1413{ -
1414 if (_index >= 0)
evaluated: _index >= 0
TRUEFALSE
yes
Evaluation Count:19
yes
Evaluation Count:8
8-19
1415 return _index;
executed: return _index;
Execution Count:19
19
1416 else -
1417 return (-_index) - 1;
executed: return (-_index) - 1;
Execution Count:8
8
1418} -
1419 -
1420 -
1421 -
1422 -
1423QMetaMethod::MethodType QMetaMethodBuilder::methodType() const -
1424{ -
1425 QMetaMethodBuilderPrivate *d = d_func(); -
1426 if (d)
evaluated: d
TRUEFALSE
yes
Evaluation Count:19
yes
Evaluation Count:1
1-19
1427 return d->methodType();
executed: return d->methodType();
Execution Count:19
19
1428 else -
1429 return QMetaMethod::Method;
executed: return QMetaMethod::Method;
Execution Count:1
1
1430} -
1431 -
1432 -
1433 -
1434 -
1435 -
1436 -
1437QByteArray QMetaMethodBuilder::signature() const -
1438{ -
1439 QMetaMethodBuilderPrivate *d = d_func(); -
1440 if (d)
evaluated: d
TRUEFALSE
yes
Evaluation Count:23
yes
Evaluation Count:3
3-23
1441 return d->signature;
executed: return d->signature;
Execution Count:23
23
1442 else -
1443 return QByteArray();
executed: return QByteArray();
Execution Count:3
3
1444} -
1445 -
1446 -
1447 -
1448 -
1449 -
1450 -
1451 -
1452QByteArray QMetaMethodBuilder::returnType() const -
1453{ -
1454 QMetaMethodBuilderPrivate *d = d_func(); -
1455 if (d)
evaluated: d
TRUEFALSE
yes
Evaluation Count:19
yes
Evaluation Count:1
1-19
1456 return d->returnType;
executed: return d->returnType;
Execution Count:19
19
1457 else -
1458 return QByteArray();
executed: return QByteArray();
Execution Count:1
1
1459} -
1460void QMetaMethodBuilder::setReturnType(const QByteArray& value) -
1461{ -
1462 QMetaMethodBuilderPrivate *d = d_func(); -
1463 if (d)
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:71
no
Evaluation Count:0
0-71
1464 d->returnType = QMetaObject::normalizedType(value);
executed: d->returnType = QMetaObject::normalizedType(value);
Execution Count:71
71
1465}
executed: }
Execution Count:71
71
1466 -
1467 -
1468 -
1469 -
1470 -
1471 -
1472QList<QByteArray> QMetaMethodBuilder::parameterTypes() const -
1473{ -
1474 QMetaMethodBuilderPrivate *d = d_func(); -
1475 if (d)
evaluated: d
TRUEFALSE
yes
Evaluation Count:19
yes
Evaluation Count:1
1-19
1476 return d->parameterTypes();
executed: return d->parameterTypes();
Execution Count:19
19
1477 else -
1478 return QList<QByteArray>();
executed: return QList<QByteArray>();
Execution Count:1
1
1479} -
1480 -
1481 -
1482 -
1483 -
1484 -
1485 -
1486QList<QByteArray> QMetaMethodBuilder::parameterNames() const -
1487{ -
1488 QMetaMethodBuilderPrivate *d = d_func(); -
1489 if (d)
evaluated: d
TRUEFALSE
yes
Evaluation Count:18
yes
Evaluation Count:1
1-18
1490 return d->parameterNames;
executed: return d->parameterNames;
Execution Count:18
18
1491 else -
1492 return QList<QByteArray>();
executed: return QList<QByteArray>();
Execution Count:1
1
1493} -
1494 -
1495 -
1496 -
1497 -
1498 -
1499 -
1500void QMetaMethodBuilder::setParameterNames(const QList<QByteArray>& value) -
1501{ -
1502 QMetaMethodBuilderPrivate *d = d_func(); -
1503 if (d)
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:91
no
Evaluation Count:0
0-91
1504 d->parameterNames = value;
executed: d->parameterNames = value;
Execution Count:91
91
1505}
executed: }
Execution Count:91
91
1506 -
1507 -
1508 -
1509 -
1510 -
1511 -
1512QByteArray QMetaMethodBuilder::tag() const -
1513{ -
1514 QMetaMethodBuilderPrivate *d = d_func(); -
1515 if (d)
evaluated: d
TRUEFALSE
yes
Evaluation Count:18
yes
Evaluation Count:1
1-18
1516 return d->tag;
executed: return d->tag;
Execution Count:18
18
1517 else -
1518 return QByteArray();
executed: return QByteArray();
Execution Count:1
1
1519} -
1520 -
1521 -
1522 -
1523 -
1524 -
1525 -
1526void QMetaMethodBuilder::setTag(const QByteArray& value) -
1527{ -
1528 QMetaMethodBuilderPrivate *d = d_func(); -
1529 if (d)
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:61
no
Evaluation Count:0
0-61
1530 d->tag = value;
executed: d->tag = value;
Execution Count:61
61
1531}
executed: }
Execution Count:61
61
1532QMetaMethod::Access QMetaMethodBuilder::access() const -
1533{ -
1534 QMetaMethodBuilderPrivate *d = d_func(); -
1535 if (d)
evaluated: d
TRUEFALSE
yes
Evaluation Count:19
yes
Evaluation Count:1
1-19
1536 return d->access();
executed: return d->access();
Execution Count:19
19
1537 else -
1538 return QMetaMethod::Public;
executed: return QMetaMethod::Public;
Execution Count:1
1
1539} -
1540void QMetaMethodBuilder::setAccess(QMetaMethod::Access value) -
1541{ -
1542 QMetaMethodBuilderPrivate *d = d_func(); -
1543 if (d && d->methodType() != QMetaMethod::Signal)
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:61
no
Evaluation Count:0
evaluated: d->methodType() != QMetaMethod::Signal
TRUEFALSE
yes
Evaluation Count:51
yes
Evaluation Count:10
0-61
1544 d->setAccess(value);
executed: d->setAccess(value);
Execution Count:51
51
1545}
executed: }
Execution Count:61
61
1546 -
1547 -
1548 -
1549 -
1550 -
1551 -
1552int QMetaMethodBuilder::attributes() const -
1553{ -
1554 QMetaMethodBuilderPrivate *d = d_func(); -
1555 if (d)
evaluated: d
TRUEFALSE
yes
Evaluation Count:18
yes
Evaluation Count:1
1-18
1556 return (d->attributes >> 4);
executed: return (d->attributes >> 4);
Execution Count:18
18
1557 else -
1558 return 0;
executed: return 0;
Execution Count:1
1
1559} -
1560 -
1561 -
1562 -
1563 -
1564 -
1565 -
1566void QMetaMethodBuilder::setAttributes(int value) -
1567{ -
1568 QMetaMethodBuilderPrivate *d = d_func(); -
1569 if (d)
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:61
no
Evaluation Count:0
0-61
1570 d->attributes = ((d->attributes & 0x0f) | (value << 4));
executed: d->attributes = ((d->attributes & 0x0f) | (value << 4));
Execution Count:61
61
1571}
executed: }
Execution Count:61
61
1572 -
1573 -
1574 -
1575 -
1576 -
1577 -
1578int QMetaMethodBuilder::revision() const -
1579{ -
1580 QMetaMethodBuilderPrivate *d = d_func(); -
1581 if (d)
evaluated: d
TRUEFALSE
yes
Evaluation Count:7
yes
Evaluation Count:1
1-7
1582 return d->revision;
executed: return d->revision;
Execution Count:7
7
1583 return 0;
executed: return 0;
Execution Count:1
1
1584 -
1585} -
1586 -
1587 -
1588 -
1589 -
1590 -
1591 -
1592void QMetaMethodBuilder::setRevision(int revision) -
1593{ -
1594 QMetaMethodBuilderPrivate *d = d_func(); -
1595 if (d) {
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:55
no
Evaluation Count:0
0-55
1596 d->revision = revision; -
1597 if (revision)
evaluated: revision
TRUEFALSE
yes
Evaluation Count:4
yes
Evaluation Count:51
4-51
1598 d->attributes |= MethodRevisioned;
executed: d->attributes |= MethodRevisioned;
Execution Count:4
4
1599 else -
1600 d->attributes &= ~MethodRevisioned;
executed: d->attributes &= ~MethodRevisioned;
Execution Count:51
51
1601 } -
1602}
executed: }
Execution Count:55
55
1603QMetaPropertyBuilderPrivate *QMetaPropertyBuilder::d_func() const -
1604{ -
1605 if (_mobj && _index >= 0 && _index < _mobj->d->properties.size())
evaluated: _mobj
TRUEFALSE
yes
Evaluation Count:762
yes
Evaluation Count:17
partially evaluated: _index >= 0
TRUEFALSE
yes
Evaluation Count:762
no
Evaluation Count:0
partially evaluated: _index < _mobj->d->properties.size()
TRUEFALSE
yes
Evaluation Count:762
no
Evaluation Count:0
0-762
1606 return &(_mobj->d->properties[_index]);
executed: return &(_mobj->d->properties[_index]);
Execution Count:762
762
1607 else -
1608 return 0;
executed: return 0;
Execution Count:17
17
1609} -
1610QByteArray QMetaPropertyBuilder::name() const -
1611{ -
1612 QMetaPropertyBuilderPrivate *d = d_func(); -
1613 if (d)
evaluated: d
TRUEFALSE
yes
Evaluation Count:9
yes
Evaluation Count:2
2-9
1614 return d->name;
executed: return d->name;
Execution Count:9
9
1615 else -
1616 return QByteArray();
executed: return QByteArray();
Execution Count:2
2
1617} -
1618 -
1619 -
1620 -
1621 -
1622 -
1623 -
1624QByteArray QMetaPropertyBuilder::type() const -
1625{ -
1626 QMetaPropertyBuilderPrivate *d = d_func(); -
1627 if (d)
evaluated: d
TRUEFALSE
yes
Evaluation Count:7
yes
Evaluation Count:1
1-7
1628 return d->type;
executed: return d->type;
Execution Count:7
7
1629 else -
1630 return QByteArray();
executed: return QByteArray();
Execution Count:1
1
1631} -
1632 -
1633 -
1634 -
1635 -
1636 -
1637 -
1638bool QMetaPropertyBuilder::hasNotifySignal() const -
1639{ -
1640 QMetaPropertyBuilderPrivate *d = d_func(); -
1641 if (d)
evaluated: d
TRUEFALSE
yes
Evaluation Count:10
yes
Evaluation Count:1
1-10
1642 return d->flag(Notify);
executed: return d->flag(Notify);
Execution Count:10
10
1643 else -
1644 return false;
executed: return false;
Execution Count:1
1
1645} -
1646 -
1647 -
1648 -
1649 -
1650 -
1651 -
1652QMetaMethodBuilder QMetaPropertyBuilder::notifySignal() const -
1653{ -
1654 QMetaPropertyBuilderPrivate *d = d_func(); -
1655 if (d && d->notifySignal >= 0)
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:7
no
Evaluation Count:0
evaluated: d->notifySignal >= 0
TRUEFALSE
yes
Evaluation Count:4
yes
Evaluation Count:3
0-7
1656 return QMetaMethodBuilder(_mobj, d->notifySignal);
executed: return QMetaMethodBuilder(_mobj, d->notifySignal);
Execution Count:4
4
1657 else -
1658 return QMetaMethodBuilder();
executed: return QMetaMethodBuilder();
Execution Count:3
3
1659} -
1660 -
1661 -
1662 -
1663 -
1664 -
1665 -
1666void QMetaPropertyBuilder::setNotifySignal(const QMetaMethodBuilder& value) -
1667{ -
1668 QMetaPropertyBuilderPrivate *d = d_func(); -
1669 if (d) {
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:14
no
Evaluation Count:0
0-14
1670 if (value._mobj) {
evaluated: value._mobj
TRUEFALSE
yes
Evaluation Count:13
yes
Evaluation Count:1
1-13
1671 d->notifySignal = value._index; -
1672 d->setFlag(Notify, true); -
1673 } else {
executed: }
Execution Count:13
13
1674 d->notifySignal = -1; -
1675 d->setFlag(Notify, false); -
1676 }
executed: }
Execution Count:1
1
1677 } -
1678}
executed: }
Execution Count:14
14
1679 -
1680 -
1681 -
1682 -
1683 -
1684 -
1685void QMetaPropertyBuilder::removeNotifySignal() -
1686{ -
1687 QMetaPropertyBuilderPrivate *d = d_func(); -
1688 if (d) {
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:1
no
Evaluation Count:0
0-1
1689 d->notifySignal = -1; -
1690 d->setFlag(Notify, false); -
1691 }
executed: }
Execution Count:1
1
1692}
executed: }
Execution Count:1
1
1693 -
1694 -
1695 -
1696 -
1697 -
1698 -
1699 -
1700bool QMetaPropertyBuilder::isReadable() const -
1701{ -
1702 QMetaPropertyBuilderPrivate *d = d_func(); -
1703 if (d)
evaluated: d
TRUEFALSE
yes
Evaluation Count:29
yes
Evaluation Count:1
1-29
1704 return d->flag(Readable);
executed: return d->flag(Readable);
Execution Count:29
29
1705 else -
1706 return false;
executed: return false;
Execution Count:1
1
1707} -
1708 -
1709 -
1710 -
1711 -
1712 -
1713 -
1714 -
1715bool QMetaPropertyBuilder::isWritable() const -
1716{ -
1717 QMetaPropertyBuilderPrivate *d = d_func(); -
1718 if (d)
evaluated: d
TRUEFALSE
yes
Evaluation Count:29
yes
Evaluation Count:1
1-29
1719 return d->flag(Writable);
executed: return d->flag(Writable);
Execution Count:29
29
1720 else -
1721 return false;
executed: return false;
Execution Count:1
1
1722} -
1723 -
1724 -
1725 -
1726 -
1727 -
1728 -
1729 -
1730bool QMetaPropertyBuilder::isResettable() const -
1731{ -
1732 QMetaPropertyBuilderPrivate *d = d_func(); -
1733 if (d)
evaluated: d
TRUEFALSE
yes
Evaluation Count:30
yes
Evaluation Count:1
1-30
1734 return d->flag(Resettable);
executed: return d->flag(Resettable);
Execution Count:30
30
1735 else -
1736 return false;
executed: return false;
Execution Count:1
1
1737} -
1738 -
1739 -
1740 -
1741 -
1742 -
1743 -
1744 -
1745bool QMetaPropertyBuilder::isDesignable() const -
1746{ -
1747 QMetaPropertyBuilderPrivate *d = d_func(); -
1748 if (d)
evaluated: d
TRUEFALSE
yes
Evaluation Count:30
yes
Evaluation Count:1
1-30
1749 return d->flag(Designable);
executed: return d->flag(Designable);
Execution Count:30
30
1750 else -
1751 return false;
executed: return false;
Execution Count:1
1
1752} -
1753 -
1754 -
1755 -
1756 -
1757 -
1758 -
1759 -
1760bool QMetaPropertyBuilder::isScriptable() const -
1761{ -
1762 QMetaPropertyBuilderPrivate *d = d_func(); -
1763 if (d)
evaluated: d
TRUEFALSE
yes
Evaluation Count:30
yes
Evaluation Count:1
1-30
1764 return d->flag(Scriptable);
executed: return d->flag(Scriptable);
Execution Count:30
30
1765 else -
1766 return false;
executed: return false;
Execution Count:1
1
1767} -
1768 -
1769 -
1770 -
1771 -
1772 -
1773 -
1774 -
1775bool QMetaPropertyBuilder::isStored() const -
1776{ -
1777 QMetaPropertyBuilderPrivate *d = d_func(); -
1778 if (d)
evaluated: d
TRUEFALSE
yes
Evaluation Count:30
yes
Evaluation Count:1
1-30
1779 return d->flag(Stored);
executed: return d->flag(Stored);
Execution Count:30
30
1780 else -
1781 return false;
executed: return false;
Execution Count:1
1
1782} -
1783 -
1784 -
1785 -
1786 -
1787 -
1788 -
1789 -
1790bool QMetaPropertyBuilder::isEditable() const -
1791{ -
1792 QMetaPropertyBuilderPrivate *d = d_func(); -
1793 if (d)
evaluated: d
TRUEFALSE
yes
Evaluation Count:30
yes
Evaluation Count:1
1-30
1794 return d->flag(Editable);
executed: return d->flag(Editable);
Execution Count:30
30
1795 else -
1796 return false;
executed: return false;
Execution Count:1
1
1797} -
1798bool QMetaPropertyBuilder::isUser() const -
1799{ -
1800 QMetaPropertyBuilderPrivate *d = d_func(); -
1801 if (d)
evaluated: d
TRUEFALSE
yes
Evaluation Count:30
yes
Evaluation Count:1
1-30
1802 return d->flag(User);
executed: return d->flag(User);
Execution Count:30
30
1803 else -
1804 return false;
executed: return false;
Execution Count:1
1
1805} -
1806bool QMetaPropertyBuilder::hasStdCppSet() const -
1807{ -
1808 QMetaPropertyBuilderPrivate *d = d_func(); -
1809 if (d)
evaluated: d
TRUEFALSE
yes
Evaluation Count:30
yes
Evaluation Count:1
1-30
1810 return d->flag(StdCppSet);
executed: return d->flag(StdCppSet);
Execution Count:30
30
1811 else -
1812 return false;
executed: return false;
Execution Count:1
1
1813} -
1814 -
1815 -
1816 -
1817 -
1818 -
1819 -
1820 -
1821bool QMetaPropertyBuilder::isEnumOrFlag() const -
1822{ -
1823 QMetaPropertyBuilderPrivate *d = d_func(); -
1824 if (d)
evaluated: d
TRUEFALSE
yes
Evaluation Count:30
yes
Evaluation Count:1
1-30
1825 return d->flag(EnumOrFlag);
executed: return d->flag(EnumOrFlag);
Execution Count:30
30
1826 else -
1827 return false;
executed: return false;
Execution Count:1
1
1828} -
1829 -
1830 -
1831 -
1832 -
1833 -
1834bool QMetaPropertyBuilder::isConstant() const -
1835{ -
1836 QMetaPropertyBuilderPrivate *d = d_func(); -
1837 if (d)
evaluated: d
TRUEFALSE
yes
Evaluation Count:30
yes
Evaluation Count:1
1-30
1838 return d->flag(Constant);
executed: return d->flag(Constant);
Execution Count:30
30
1839 else -
1840 return false;
executed: return false;
Execution Count:1
1
1841} -
1842 -
1843 -
1844 -
1845 -
1846 -
1847bool QMetaPropertyBuilder::isFinal() const -
1848{ -
1849 QMetaPropertyBuilderPrivate *d = d_func(); -
1850 if (d)
evaluated: d
TRUEFALSE
yes
Evaluation Count:30
yes
Evaluation Count:1
1-30
1851 return d->flag(Final);
executed: return d->flag(Final);
Execution Count:30
30
1852 else -
1853 return false;
executed: return false;
Execution Count:1
1
1854} -
1855 -
1856 -
1857 -
1858 -
1859 -
1860 -
1861void QMetaPropertyBuilder::setReadable(bool value) -
1862{ -
1863 QMetaPropertyBuilderPrivate *d = d_func(); -
1864 if (d)
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:28
no
Evaluation Count:0
0-28
1865 d->setFlag(Readable, value);
executed: d->setFlag(Readable, value);
Execution Count:28
28
1866}
executed: }
Execution Count:28
28
1867 -
1868 -
1869 -
1870 -
1871 -
1872 -
1873void QMetaPropertyBuilder::setWritable(bool value) -
1874{ -
1875 QMetaPropertyBuilderPrivate *d = d_func(); -
1876 if (d)
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:28
no
Evaluation Count:0
0-28
1877 d->setFlag(Writable, value);
executed: d->setFlag(Writable, value);
Execution Count:28
28
1878}
executed: }
Execution Count:28
28
1879 -
1880 -
1881 -
1882 -
1883 -
1884 -
1885void QMetaPropertyBuilder::setResettable(bool value) -
1886{ -
1887 QMetaPropertyBuilderPrivate *d = d_func(); -
1888 if (d)
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:28
no
Evaluation Count:0
0-28
1889 d->setFlag(Resettable, value);
executed: d->setFlag(Resettable, value);
Execution Count:28
28
1890}
executed: }
Execution Count:28
28
1891 -
1892 -
1893 -
1894 -
1895 -
1896 -
1897void QMetaPropertyBuilder::setDesignable(bool value) -
1898{ -
1899 QMetaPropertyBuilderPrivate *d = d_func(); -
1900 if (d)
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:28
no
Evaluation Count:0
0-28
1901 d->setFlag(Designable, value);
executed: d->setFlag(Designable, value);
Execution Count:28
28
1902}
executed: }
Execution Count:28
28
1903 -
1904 -
1905 -
1906 -
1907 -
1908 -
1909void QMetaPropertyBuilder::setScriptable(bool value) -
1910{ -
1911 QMetaPropertyBuilderPrivate *d = d_func(); -
1912 if (d)
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:28
no
Evaluation Count:0
0-28
1913 d->setFlag(Scriptable, value);
executed: d->setFlag(Scriptable, value);
Execution Count:28
28
1914}
executed: }
Execution Count:28
28
1915 -
1916 -
1917 -
1918 -
1919 -
1920 -
1921void QMetaPropertyBuilder::setStored(bool value) -
1922{ -
1923 QMetaPropertyBuilderPrivate *d = d_func(); -
1924 if (d)
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:28
no
Evaluation Count:0
0-28
1925 d->setFlag(Stored, value);
executed: d->setFlag(Stored, value);
Execution Count:28
28
1926}
executed: }
Execution Count:28
28
1927 -
1928 -
1929 -
1930 -
1931 -
1932 -
1933void QMetaPropertyBuilder::setEditable(bool value) -
1934{ -
1935 QMetaPropertyBuilderPrivate *d = d_func(); -
1936 if (d)
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:28
no
Evaluation Count:0
0-28
1937 d->setFlag(Editable, value);
executed: d->setFlag(Editable, value);
Execution Count:28
28
1938}
executed: }
Execution Count:28
28
1939 -
1940 -
1941 -
1942 -
1943 -
1944 -
1945void QMetaPropertyBuilder::setUser(bool value) -
1946{ -
1947 QMetaPropertyBuilderPrivate *d = d_func(); -
1948 if (d)
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:28
no
Evaluation Count:0
0-28
1949 d->setFlag(User, value);
executed: d->setFlag(User, value);
Execution Count:28
28
1950}
executed: }
Execution Count:28
28
1951void QMetaPropertyBuilder::setStdCppSet(bool value) -
1952{ -
1953 QMetaPropertyBuilderPrivate *d = d_func(); -
1954 if (d)
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:28
no
Evaluation Count:0
0-28
1955 d->setFlag(StdCppSet, value);
executed: d->setFlag(StdCppSet, value);
Execution Count:28
28
1956}
executed: }
Execution Count:28
28
1957 -
1958 -
1959 -
1960 -
1961 -
1962 -
1963 -
1964void QMetaPropertyBuilder::setEnumOrFlag(bool value) -
1965{ -
1966 QMetaPropertyBuilderPrivate *d = d_func(); -
1967 if (d)
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:28
no
Evaluation Count:0
0-28
1968 d->setFlag(EnumOrFlag, value);
executed: d->setFlag(EnumOrFlag, value);
Execution Count:28
28
1969}
executed: }
Execution Count:28
28
1970 -
1971 -
1972 -
1973 -
1974 -
1975 -
1976void QMetaPropertyBuilder::setConstant(bool value) -
1977{ -
1978 QMetaPropertyBuilderPrivate *d = d_func(); -
1979 if (d)
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:28
no
Evaluation Count:0
0-28
1980 d->setFlag(Constant, value);
executed: d->setFlag(Constant, value);
Execution Count:28
28
1981}
executed: }
Execution Count:28
28
1982 -
1983 -
1984 -
1985 -
1986 -
1987 -
1988void QMetaPropertyBuilder::setFinal(bool value) -
1989{ -
1990 QMetaPropertyBuilderPrivate *d = d_func(); -
1991 if (d)
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:28
no
Evaluation Count:0
0-28
1992 d->setFlag(Final, value);
executed: d->setFlag(Final, value);
Execution Count:28
28
1993}
executed: }
Execution Count:28
28
1994 -
1995 -
1996 -
1997 -
1998 -
1999 -
2000int QMetaPropertyBuilder::revision() const -
2001{ -
2002 QMetaPropertyBuilderPrivate *d = d_func(); -
2003 if (d)
evaluated: d
TRUEFALSE
yes
Evaluation Count:5
yes
Evaluation Count:1
1-5
2004 return d->revision;
executed: return d->revision;
Execution Count:5
5
2005 return 0;
executed: return 0;
Execution Count:1
1
2006 -
2007} -
2008 -
2009 -
2010 -
2011 -
2012 -
2013 -
2014void QMetaPropertyBuilder::setRevision(int revision) -
2015{ -
2016 QMetaPropertyBuilderPrivate *d = d_func(); -
2017 if (d) {
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:15
no
Evaluation Count:0
0-15
2018 d->revision = revision; -
2019 d->setFlag(Revisioned, revision != 0); -
2020 }
executed: }
Execution Count:15
15
2021}
executed: }
Execution Count:15
15
2022QMetaEnumBuilderPrivate *QMetaEnumBuilder::d_func() const -
2023{ -
2024 if (_mobj && _index >= 0 && _index < _mobj->d->enumerators.size())
evaluated: _mobj
TRUEFALSE
yes
Evaluation Count:83
yes
Evaluation Count:1
partially evaluated: _index >= 0
TRUEFALSE
yes
Evaluation Count:83
no
Evaluation Count:0
partially evaluated: _index < _mobj->d->enumerators.size()
TRUEFALSE
yes
Evaluation Count:83
no
Evaluation Count:0
0-83
2025 return &(_mobj->d->enumerators[_index]);
executed: return &(_mobj->d->enumerators[_index]);
Execution Count:83
83
2026 else -
2027 return 0;
executed: return 0;
Execution Count:1
1
2028} -
2029QByteArray QMetaEnumBuilder::name() const -
2030{ -
2031 QMetaEnumBuilderPrivate *d = d_func(); -
2032 if (d)
evaluated: d
TRUEFALSE
yes
Evaluation Count:10
yes
Evaluation Count:1
1-10
2033 return d->name;
executed: return d->name;
Execution Count:10
10
2034 else -
2035 return QByteArray();
executed: return QByteArray();
Execution Count:1
1
2036} -
2037 -
2038 -
2039 -
2040 -
2041 -
2042 -
2043 -
2044bool QMetaEnumBuilder::isFlag() const -
2045{ -
2046 QMetaEnumBuilderPrivate *d = d_func(); -
2047 if (d)
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:9
no
Evaluation Count:0
0-9
2048 return d->isFlag;
executed: return d->isFlag;
Execution Count:9
9
2049 else -
2050 return false;
never executed: return false;
0
2051} -
2052 -
2053 -
2054 -
2055 -
2056 -
2057 -
2058void QMetaEnumBuilder::setIsFlag(bool value) -
2059{ -
2060 QMetaEnumBuilderPrivate *d = d_func(); -
2061 if (d)
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:6
no
Evaluation Count:0
0-6
2062 d->isFlag = value;
executed: d->isFlag = value;
Execution Count:6
6
2063}
executed: }
Execution Count:6
6
2064 -
2065 -
2066 -
2067 -
2068 -
2069 -
2070int QMetaEnumBuilder::keyCount() const -
2071{ -
2072 QMetaEnumBuilderPrivate *d = d_func(); -
2073 if (d)
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:9
no
Evaluation Count:0
0-9
2074 return d->keys.size();
executed: return d->keys.size();
Execution Count:9
9
2075 else -
2076 return 0;
never executed: return 0;
0
2077} -
2078 -
2079 -
2080 -
2081 -
2082 -
2083 -
2084 -
2085QByteArray QMetaEnumBuilder::key(int index) const -
2086{ -
2087 QMetaEnumBuilderPrivate *d = d_func(); -
2088 if (d && index >= 0 && index < d->keys.size())
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:20
no
Evaluation Count:0
partially evaluated: index >= 0
TRUEFALSE
yes
Evaluation Count:20
no
Evaluation Count:0
evaluated: index < d->keys.size()
TRUEFALSE
yes
Evaluation Count:14
yes
Evaluation Count:6
0-20
2089 return d->keys[index];
executed: return d->keys[index];
Execution Count:14
14
2090 else -
2091 return QByteArray();
executed: return QByteArray();
Execution Count:6
6
2092} -
2093 -
2094 -
2095 -
2096 -
2097 -
2098 -
2099 -
2100int QMetaEnumBuilder::value(int index) const -
2101{ -
2102 QMetaEnumBuilderPrivate *d = d_func(); -
2103 if (d && index >= 0 && index < d->keys.size())
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:15
no
Evaluation Count:0
partially evaluated: index >= 0
TRUEFALSE
yes
Evaluation Count:15
no
Evaluation Count:0
evaluated: index < d->keys.size()
TRUEFALSE
yes
Evaluation Count:14
yes
Evaluation Count:1
0-15
2104 return d->values[index];
executed: return d->values[index];
Execution Count:14
14
2105 else -
2106 return -1;
executed: return -1;
Execution Count:1
1
2107} -
2108 -
2109 -
2110 -
2111 -
2112 -
2113 -
2114 -
2115int QMetaEnumBuilder::addKey(const QByteArray& name, int value) -
2116{ -
2117 QMetaEnumBuilderPrivate *d = d_func(); -
2118 if (d) {
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:13
no
Evaluation Count:0
0-13
2119 int index = d->keys.size(); -
2120 d->keys += name; -
2121 d->values += value; -
2122 return index;
executed: return index;
Execution Count:13
13
2123 } else { -
2124 return -1;
never executed: return -1;
0
2125 } -
2126} -
2127 -
2128 -
2129 -
2130 -
2131 -
2132 -
2133void QMetaEnumBuilder::removeKey(int index) -
2134{ -
2135 QMetaEnumBuilderPrivate *d = d_func(); -
2136 if (d && index >= 0 && index < d->keys.size()) {
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:1
no
Evaluation Count:0
partially evaluated: index >= 0
TRUEFALSE
yes
Evaluation Count:1
no
Evaluation Count:0
partially evaluated: index < d->keys.size()
TRUEFALSE
yes
Evaluation Count:1
no
Evaluation Count:0
0-1
2137 d->keys.removeAt(index); -
2138 d->values.removeAt(index); -
2139 }
executed: }
Execution Count:1
1
2140}
executed: }
Execution Count:1
1
2141 -
2142 -
2143 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial