qmetaobjectbuilder.cpp

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

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9