Line | Source Code | Coverage |
---|
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | | - |
8 | | - |
9 | static inline const QMetaObjectPrivate *priv(const uint* data) | - |
10 | { return reinterpret_cast<const QMetaObjectPrivate*>(data); } executed: return reinterpret_cast<const QMetaObjectPrivate*>(data); Execution Count:98354676 | 98354676 |
11 | | - |
12 | static inline const QByteArray stringData(const QMetaObject *mo, int index) | - |
13 | { | - |
14 | qt_noop(); | - |
15 | const QByteArrayDataPtr data = { const_cast<QByteArrayData*>(&mo->d.stringdata[index]) }; | - |
16 | qt_noop(); | - |
17 | qt_noop(); | - |
18 | qt_noop(); | - |
19 | qt_noop(); | - |
20 | return data; executed: return data; Execution Count:21792416 | 21792416 |
21 | } | - |
22 | | - |
23 | static inline const char *rawStringData(const QMetaObject *mo, int index) | - |
24 | { | - |
25 | return stringData(mo, index).data(); executed: return stringData(mo, index).data(); Execution Count:2961532 | 2961532 |
26 | } | - |
27 | | - |
28 | static inline int stringSize(const QMetaObject *mo, int index) | - |
29 | { | - |
30 | return stringData(mo, index).size(); executed: return stringData(mo, index).size(); Execution Count:39 | 39 |
31 | } | - |
32 | | - |
33 | static inline QByteArray typeNameFromTypeInfo(const QMetaObject *mo, uint typeInfo) | - |
34 | { | - |
35 | if (typeInfo & IsUnresolvedType) { evaluated: typeInfo & IsUnresolvedType yes Evaluation Count:114492 | yes Evaluation Count:19478 |
| 19478-114492 |
36 | return stringData(mo, typeInfo & TypeNameIndexMask); executed: return stringData(mo, typeInfo & TypeNameIndexMask); Execution Count:114492 | 114492 |
37 | } else { | - |
38 | | - |
39 | const char *t = QMetaType::typeName(typeInfo); | - |
40 | return QByteArray::fromRawData(t, qstrlen(t)); executed: return QByteArray::fromRawData(t, qstrlen(t)); Execution Count:19478 | 19478 |
41 | } | - |
42 | } | - |
43 | | - |
44 | static inline const char *rawTypeNameFromTypeInfo(const QMetaObject *mo, uint typeInfo) | - |
45 | { | - |
46 | return typeNameFromTypeInfo(mo, typeInfo).constData(); executed: return typeNameFromTypeInfo(mo, typeInfo).constData(); Execution Count:882 | 882 |
47 | } | - |
48 | | - |
49 | static inline int typeFromTypeInfo(const QMetaObject *mo, uint typeInfo) | - |
50 | { | - |
51 | if (!(typeInfo & IsUnresolvedType)) evaluated: !(typeInfo & IsUnresolvedType) yes Evaluation Count:1058055 | yes Evaluation Count:87112 |
| 87112-1058055 |
52 | return typeInfo; executed: return typeInfo; Execution Count:1058054 | 1058054 |
53 | return QMetaType::type(stringData(mo, typeInfo & TypeNameIndexMask)); executed: return QMetaType::type(stringData(mo, typeInfo & TypeNameIndexMask)); Execution Count:87112 | 87112 |
54 | } | - |
55 | | - |
56 | class QMetaMethodPrivate : public QMetaMethod | - |
57 | { | - |
58 | public: | - |
59 | static const QMetaMethodPrivate *get(const QMetaMethod *q) | - |
60 | { return static_cast<const QMetaMethodPrivate *>(q); } executed: return static_cast<const QMetaMethodPrivate *>(q); Execution Count:513169 | 513169 |
61 | | - |
62 | inline QByteArray signature() const; | - |
63 | inline QByteArray name() const; | - |
64 | inline int typesDataIndex() const; | - |
65 | inline const char *rawReturnTypeName() const; | - |
66 | inline int returnType() const; | - |
67 | inline int parameterCount() const; | - |
68 | inline int parametersDataIndex() const; | - |
69 | inline uint parameterTypeInfo(int index) const; | - |
70 | inline int parameterType(int index) const; | - |
71 | inline void getParameterTypes(int *types) const; | - |
72 | inline QList<QByteArray> parameterTypes() const; | - |
73 | inline QList<QByteArray> parameterNames() const; | - |
74 | inline QByteArray tag() const; | - |
75 | inline int ownMethodIndex() const; | - |
76 | | - |
77 | private: | - |
78 | QMetaMethodPrivate(); | - |
79 | }; | - |
80 | QObject *QMetaObject::newInstance(QGenericArgument val0, | - |
81 | QGenericArgument val1, | - |
82 | QGenericArgument val2, | - |
83 | QGenericArgument val3, | - |
84 | QGenericArgument val4, | - |
85 | QGenericArgument val5, | - |
86 | QGenericArgument val6, | - |
87 | QGenericArgument val7, | - |
88 | QGenericArgument val8, | - |
89 | QGenericArgument val9) const | - |
90 | { | - |
91 | QByteArray constructorName = className(); | - |
92 | { | - |
93 | int idx = constructorName.lastIndexOf(':'); | - |
94 | if (idx != -1) evaluated: idx != -1 yes Evaluation Count:1 | yes Evaluation Count:4 |
| 1-4 |
95 | constructorName.remove(0, idx+1); executed: constructorName.remove(0, idx+1); Execution Count:1 | 1 |
96 | } | - |
97 | QVarLengthArray<char, 512> sig; | - |
98 | sig.append(constructorName.constData(), constructorName.length()); | - |
99 | sig.append('('); | - |
100 | | - |
101 | enum { MaximumParamCount = 10 }; | - |
102 | const char *typeNames[] = {val0.name(), val1.name(), val2.name(), val3.name(), val4.name(), | - |
103 | val5.name(), val6.name(), val7.name(), val8.name(), val9.name()}; | - |
104 | | - |
105 | int paramCount; | - |
106 | for (paramCount = 0; paramCount < MaximumParamCount; ++paramCount) { partially evaluated: paramCount < MaximumParamCount yes Evaluation Count:8 | no Evaluation Count:0 |
| 0-8 |
107 | int len = qstrlen(typeNames[paramCount]); | - |
108 | if (len <= 0) evaluated: len <= 0 yes Evaluation Count:5 | yes Evaluation Count:3 |
| 3-5 |
109 | break; executed: break; Execution Count:5 | 5 |
110 | sig.append(typeNames[paramCount], len); | - |
111 | sig.append(','); | - |
112 | } executed: } Execution Count:3 | 3 |
113 | if (paramCount == 0) evaluated: paramCount == 0 yes Evaluation Count:2 | yes Evaluation Count:3 |
| 2-3 |
114 | sig.append(')'); executed: sig.append(')'); Execution Count:2 | 2 |
115 | else | - |
116 | sig[sig.size() - 1] = ')'; executed: sig[sig.size() - 1] = ')'; Execution Count:3 | 3 |
117 | sig.append('\0'); | - |
118 | | - |
119 | int idx = indexOfConstructor(sig.constData()); | - |
120 | if (idx < 0) { evaluated: idx < 0 yes Evaluation Count:1 | yes Evaluation Count:4 |
| 1-4 |
121 | QByteArray norm = QMetaObject::normalizedSignature(sig.constData()); | - |
122 | idx = indexOfConstructor(norm.constData()); | - |
123 | } executed: } Execution Count:1 | 1 |
124 | if (idx < 0) evaluated: idx < 0 yes Evaluation Count:1 | yes Evaluation Count:4 |
| 1-4 |
125 | return 0; executed: return 0; Execution Count:1 | 1 |
126 | | - |
127 | QObject *returnValue = 0; | - |
128 | void *param[] = {&returnValue, val0.data(), val1.data(), val2.data(), val3.data(), val4.data(), | - |
129 | val5.data(), val6.data(), val7.data(), val8.data(), val9.data()}; | - |
130 | | - |
131 | if (static_metacall(CreateInstance, idx, param) >= 0) partially evaluated: static_metacall(CreateInstance, idx, param) >= 0 no Evaluation Count:0 | yes Evaluation Count:4 |
| 0-4 |
132 | return 0; never executed: return 0; | 0 |
133 | return returnValue; executed: return returnValue; Execution Count:4 | 4 |
134 | } | - |
135 | | - |
136 | | - |
137 | | - |
138 | | - |
139 | int QMetaObject::static_metacall(Call cl, int idx, void **argv) const | - |
140 | { | - |
141 | qt_noop(); | - |
142 | if (!d.static_metacall) evaluated: !d.static_metacall yes Evaluation Count:3 | yes Evaluation Count:5531 |
| 3-5531 |
143 | return 0; executed: return 0; Execution Count:3 | 3 |
144 | d.static_metacall(0, cl, idx, argv); | - |
145 | return -1; executed: return -1; Execution Count:5531 | 5531 |
146 | } | - |
147 | | - |
148 | | - |
149 | | - |
150 | | - |
151 | int QMetaObject::metacall(QObject *object, Call cl, int idx, void **argv) | - |
152 | { | - |
153 | if (object->d_ptr->metaObject) partially evaluated: object->d_ptr->metaObject no Evaluation Count:0 | yes Evaluation Count:20113 |
| 0-20113 |
154 | return object->d_ptr->metaObject->metaCall(object, cl, idx, argv); never executed: return object->d_ptr->metaObject->metaCall(object, cl, idx, argv); | 0 |
155 | else | - |
156 | return object->qt_metacall(cl, idx, argv); executed: return object->qt_metacall(cl, idx, argv); Execution Count:20113 | 20113 |
157 | } | - |
158 | | - |
159 | | - |
160 | | - |
161 | | - |
162 | | - |
163 | | - |
164 | const char *QMetaObject::className() const | - |
165 | { | - |
166 | return rawStringData(this, 0); | - |
167 | } | - |
168 | QObject *QMetaObject::cast(QObject *obj) const | - |
169 | { | - |
170 | if (obj) { evaluated: obj yes Evaluation Count:1774741 | yes Evaluation Count:116722 |
| 116722-1774741 |
171 | const QMetaObject *m = obj->metaObject(); | - |
172 | do { | - |
173 | if (m == this) evaluated: m == this yes Evaluation Count:1483220 | yes Evaluation Count:974589 |
| 974589-1483220 |
174 | return obj; executed: return obj; Execution Count:1483210 | 1483210 |
175 | } while ((m = m->d.superdata)); executed: } Execution Count:974589 evaluated: (m = m->d.superdata) yes Evaluation Count:683077 | yes Evaluation Count:291512 |
| 291512-974589 |
176 | } executed: } Execution Count:291512 | 291512 |
177 | return 0; executed: return 0; Execution Count:408234 | 408234 |
178 | } | - |
179 | | - |
180 | | - |
181 | | - |
182 | | - |
183 | | - |
184 | | - |
185 | | - |
186 | const QObject *QMetaObject::cast(const QObject *obj) const | - |
187 | { | - |
188 | if (obj) { evaluated: obj yes Evaluation Count:191231 | yes Evaluation Count:9554 |
| 9554-191231 |
189 | const QMetaObject *m = obj->metaObject(); | - |
190 | do { | - |
191 | if (m == this) evaluated: m == this yes Evaluation Count:48258 | yes Evaluation Count:566541 |
| 48258-566541 |
192 | return obj; executed: return obj; Execution Count:48258 | 48258 |
193 | } while ((m = m->d.superdata)); executed: } Execution Count:566541 evaluated: (m = m->d.superdata) yes Evaluation Count:423568 | yes Evaluation Count:142973 |
| 142973-566541 |
194 | } executed: } Execution Count:142973 | 142973 |
195 | return 0; executed: return 0; Execution Count:152527 | 152527 |
196 | } | - |
197 | | - |
198 | | - |
199 | | - |
200 | | - |
201 | | - |
202 | QString QMetaObject::tr(const char *s, const char *c, int n) const | - |
203 | { | - |
204 | return QCoreApplication::translate(rawStringData(this, 0), s, c, n); | - |
205 | } | - |
206 | int QMetaObject::methodOffset() const | - |
207 | { | - |
208 | int offset = 0; | - |
209 | const QMetaObject *m = d.superdata; | - |
210 | while (m) { evaluated: m yes Evaluation Count:27706052 | yes Evaluation Count:10269247 |
| 10269247-27706052 |
211 | offset += priv(m->d.data)->methodCount; | - |
212 | m = m->d.superdata; | - |
213 | } executed: } Execution Count:27707220 | 27707220 |
214 | return offset; executed: return offset; Execution Count:10267844 | 10267844 |
215 | } | - |
216 | int QMetaObject::enumeratorOffset() const | - |
217 | { | - |
218 | int offset = 0; | - |
219 | const QMetaObject *m = d.superdata; | - |
220 | while (m) { evaluated: m yes Evaluation Count:7847 | yes Evaluation Count:5751 |
| 5751-7847 |
221 | offset += priv(m->d.data)->enumeratorCount; | - |
222 | m = m->d.superdata; | - |
223 | } executed: } Execution Count:7847 | 7847 |
224 | return offset; executed: return offset; Execution Count:5751 | 5751 |
225 | } | - |
226 | int QMetaObject::propertyOffset() const | - |
227 | { | - |
228 | int offset = 0; | - |
229 | const QMetaObject *m = d.superdata; | - |
230 | while (m) { evaluated: m yes Evaluation Count:88704 | yes Evaluation Count:47530 |
| 47530-88704 |
231 | offset += priv(m->d.data)->propertyCount; | - |
232 | m = m->d.superdata; | - |
233 | } executed: } Execution Count:88704 | 88704 |
234 | return offset; executed: return offset; Execution Count:47530 | 47530 |
235 | } | - |
236 | int QMetaObject::classInfoOffset() const | - |
237 | { | - |
238 | int offset = 0; | - |
239 | const QMetaObject *m = d.superdata; | - |
240 | while (m) { evaluated: m yes Evaluation Count:1612 | yes Evaluation Count:972 |
| 972-1612 |
241 | offset += priv(m->d.data)->classInfoCount; | - |
242 | m = m->d.superdata; | - |
243 | } executed: } Execution Count:1612 | 1612 |
244 | return offset; executed: return offset; Execution Count:972 | 972 |
245 | } | - |
246 | int QMetaObject::constructorCount() const | - |
247 | { | - |
248 | qt_noop(); | - |
249 | return priv(d.data)->constructorCount; executed: return priv(d.data)->constructorCount; Execution Count:38 | 38 |
250 | } | - |
251 | int QMetaObject::methodCount() const | - |
252 | { | - |
253 | int n = priv(d.data)->methodCount; | - |
254 | const QMetaObject *m = d.superdata; | - |
255 | while (m) { evaluated: m yes Evaluation Count:252372 | yes Evaluation Count:383020 |
| 252372-383020 |
256 | n += priv(m->d.data)->methodCount; | - |
257 | m = m->d.superdata; | - |
258 | } executed: } Execution Count:252372 | 252372 |
259 | return n; executed: return n; Execution Count:383020 | 383020 |
260 | } | - |
261 | | - |
262 | | - |
263 | | - |
264 | | - |
265 | | - |
266 | | - |
267 | int QMetaObject::enumeratorCount() const | - |
268 | { | - |
269 | int n = priv(d.data)->enumeratorCount; | - |
270 | const QMetaObject *m = d.superdata; | - |
271 | while (m) { evaluated: m yes Evaluation Count:137 | yes Evaluation Count:84 |
| 84-137 |
272 | n += priv(m->d.data)->enumeratorCount; | - |
273 | m = m->d.superdata; | - |
274 | } executed: } Execution Count:137 | 137 |
275 | return n; executed: return n; Execution Count:84 | 84 |
276 | } | - |
277 | int QMetaObject::propertyCount() const | - |
278 | { | - |
279 | int n = priv(d.data)->propertyCount; | - |
280 | const QMetaObject *m = d.superdata; | - |
281 | while (m) { evaluated: m yes Evaluation Count:1326 | yes Evaluation Count:704 |
| 704-1326 |
282 | n += priv(m->d.data)->propertyCount; | - |
283 | m = m->d.superdata; | - |
284 | } executed: } Execution Count:1326 | 1326 |
285 | return n; executed: return n; Execution Count:704 | 704 |
286 | } | - |
287 | | - |
288 | | - |
289 | | - |
290 | | - |
291 | | - |
292 | | - |
293 | int QMetaObject::classInfoCount() const | - |
294 | { | - |
295 | int n = priv(d.data)->classInfoCount; | - |
296 | const QMetaObject *m = d.superdata; | - |
297 | while (m) { evaluated: m yes Evaluation Count:137 | yes Evaluation Count:84 |
| 84-137 |
298 | n += priv(m->d.data)->classInfoCount; | - |
299 | m = m->d.superdata; | - |
300 | } executed: } Execution Count:137 | 137 |
301 | return n; executed: return n; Execution Count:84 | 84 |
302 | } | - |
303 | | - |
304 | | - |
305 | | - |
306 | | - |
307 | static bool methodMatch(const QMetaObject *m, int handle, | - |
308 | const QByteArray &name, int argc, | - |
309 | const QArgumentType *types) | - |
310 | { | - |
311 | qt_noop(); | - |
312 | if (int(m->d.data[handle + 1]) != argc) evaluated: int(m->d.data[handle + 1]) != argc yes Evaluation Count:13938467 | yes Evaluation Count:18580597 |
| 13938467-18580597 |
313 | return false; executed: return false; Execution Count:13938477 | 13938477 |
314 | | - |
315 | if (stringData(m, m->d.data[handle]) != name) evaluated: stringData(m, m->d.data[handle]) != name yes Evaluation Count:17445134 | yes Evaluation Count:1135870 |
| 1135870-17445134 |
316 | return false; executed: return false; Execution Count:17445138 | 17445138 |
317 | | - |
318 | int paramsIndex = m->d.data[handle + 2] + 1; | - |
319 | for (int i = 0; i < argc; ++i) { evaluated: i < argc yes Evaluation Count:1246653 | yes Evaluation Count:1135224 |
| 1135224-1246653 |
320 | uint typeInfo = m->d.data[paramsIndex + i]; | - |
321 | if (types[i].type()) { evaluated: types[i].type() yes Evaluation Count:1134686 | yes Evaluation Count:111966 |
| 111966-1134686 |
322 | if (types[i].type() != typeFromTypeInfo(m, typeInfo)) evaluated: types[i].type() != typeFromTypeInfo(m, typeInfo) yes Evaluation Count:551 | yes Evaluation Count:1134142 |
| 551-1134142 |
323 | return false; executed: return false; Execution Count:551 | 551 |
324 | } else { executed: } Execution Count:1134141 | 1134141 |
325 | if (types[i].name() != typeNameFromTypeInfo(m, typeInfo)) evaluated: types[i].name() != typeNameFromTypeInfo(m, typeInfo) yes Evaluation Count:101 | yes Evaluation Count:111864 |
| 101-111864 |
326 | return false; executed: return false; Execution Count:101 | 101 |
327 | } executed: } Execution Count:111864 | 111864 |
328 | } | - |
329 | | - |
330 | return true; executed: return true; Execution Count:1135223 | 1135223 |
331 | } | - |
332 | | - |
333 | | - |
334 | | - |
335 | | - |
336 | | - |
337 | | - |
338 | | - |
339 | template<int MethodType> | - |
340 | static inline int indexOfMethodRelative(const QMetaObject **baseObject, | - |
341 | const QByteArray &name, int argc, | - |
342 | const QArgumentType *types) | - |
343 | { | - |
344 | for (const QMetaObject *m = *baseObject; m; m = m->d.superdata) { evaluated: m yes Evaluation Count:3449721 | yes Evaluation Count:494988 |
| 494988-3449721 |
345 | qt_noop(); | - |
346 | int i = (MethodType == MethodSignal) evaluated: (MethodType == MethodSignal) yes Evaluation Count:1030325 | yes Evaluation Count:2419502 |
| 1030325-2419502 |
347 | ? (priv(m->d.data)->signalCount - 1) : (priv(m->d.data)->methodCount - 1); | - |
348 | const int end = (MethodType == MethodSlot) evaluated: (MethodType == MethodSlot) yes Evaluation Count:1948545 | yes Evaluation Count:1501265 |
| 1501265-1948545 |
349 | ? (priv(m->d.data)->signalCount) : 0; | - |
350 | | - |
351 | for (; i >= end; --i) { evaluated: i >= end yes Evaluation Count:32517506 | yes Evaluation Count:2314533 |
| 2314533-32517506 |
352 | int handle = priv(m->d.data)->methodData + 5*i; | - |
353 | if (methodMatch(m, handle, name, argc, types)) { evaluated: methodMatch(m, handle, name, argc, types) yes Evaluation Count:1135206 | yes Evaluation Count:31382870 |
| 1135206-31382870 |
354 | *baseObject = m; | - |
355 | return i; executed: return i; Execution Count:1135208 | 1135208 |
356 | } | - |
357 | } executed: } Execution Count:31382681 | 31382681 |
358 | } executed: } Execution Count:2314535 | 2314535 |
359 | return -1; executed: return -1; Execution Count:494987 | 494987 |
360 | } | - |
361 | int QMetaObject::indexOfConstructor(const char *constructor) const | - |
362 | { | - |
363 | qt_noop(); | - |
364 | QArgumentTypeArray types; | - |
365 | QByteArray name = QMetaObjectPrivate::decodeMethodSignature(constructor, types); | - |
366 | return QMetaObjectPrivate::indexOfConstructor(this, name, types.size(), types.constData()); executed: return QMetaObjectPrivate::indexOfConstructor(this, name, types.size(), types.constData()); Execution Count:16 | 16 |
367 | } | - |
368 | int QMetaObject::indexOfMethod(const char *method) const | - |
369 | { | - |
370 | const QMetaObject *m = this; | - |
371 | int i; | - |
372 | qt_noop(); | - |
373 | QArgumentTypeArray types; | - |
374 | QByteArray name = QMetaObjectPrivate::decodeMethodSignature(method, types); | - |
375 | i = indexOfMethodRelative<0>(&m, name, types.size(), types.constData()); | - |
376 | if (i >= 0) evaluated: i >= 0 yes Evaluation Count:221348 | yes Evaluation Count:66922 |
| 66922-221348 |
377 | i += m->methodOffset(); executed: i += m->methodOffset(); Execution Count:221348 | 221348 |
378 | return i; executed: return i; Execution Count:288270 | 288270 |
379 | } | - |
380 | | - |
381 | | - |
382 | | - |
383 | static void argumentTypesFromString(const char *str, const char *end, | - |
384 | QArgumentTypeArray &types) | - |
385 | { | - |
386 | qt_noop(); | - |
387 | while (str != end) { evaluated: str != end yes Evaluation Count:1245806 | yes Evaluation Count:1201992 |
| 1201992-1245806 |
388 | if (!types.isEmpty()) evaluated: !types.isEmpty() yes Evaluation Count:615432 | yes Evaluation Count:630374 |
| 615432-630374 |
389 | ++str; executed: ++str; Execution Count:615432 | 615432 |
390 | const char *begin = str; | - |
391 | int level = 0; | - |
392 | while (str != end && (level > 0 || *str != ',')) { evaluated: str != end yes Evaluation Count:10556921 | yes Evaluation Count:630363 |
evaluated: level > 0 yes Evaluation Count:583179 | yes Evaluation Count:9973882 |
evaluated: *str != ',' yes Evaluation Count:9358490 | yes Evaluation Count:615427 |
| 583179-10556921 |
393 | if (*str == '<') evaluated: *str == '<' yes Evaluation Count:40010 | yes Evaluation Count:9901510 |
| 40010-9901510 |
394 | ++level; executed: ++level; Execution Count:40010 | 40010 |
395 | else if (*str == '>') evaluated: *str == '>' yes Evaluation Count:40009 | yes Evaluation Count:9861508 |
| 40009-9861508 |
396 | --level; executed: --level; Execution Count:40009 | 40009 |
397 | ++str; | - |
398 | } executed: } Execution Count:9941505 | 9941505 |
399 | types += QArgumentType(QByteArray(begin, str - begin)); | - |
400 | } executed: } Execution Count:1245805 | 1245805 |
401 | } executed: } Execution Count:1201988 | 1201988 |
402 | | - |
403 | | - |
404 | | - |
405 | QByteArray QMetaObjectPrivate::decodeMethodSignature( | - |
406 | const char *signature, QArgumentTypeArray &types) | - |
407 | { | - |
408 | qt_noop(); | - |
409 | const char *lparens = strchr(signature, '('); | - |
410 | if (!lparens) partially evaluated: !lparens no Evaluation Count:0 | yes Evaluation Count:1201999 |
| 0-1201999 |
411 | return QByteArray(); never executed: return QByteArray(); | 0 |
412 | const char *rparens = strchr(lparens + 1, ')'); | - |
413 | if (!rparens || *(rparens+1)) partially evaluated: !rparens no Evaluation Count:0 | yes Evaluation Count:1201995 |
evaluated: *(rparens+1) yes Evaluation Count:4 | yes Evaluation Count:1202002 |
| 0-1202002 |
414 | return QByteArray(); executed: return QByteArray(); Execution Count:4 | 4 |
415 | int nameLength = lparens - signature; | - |
416 | argumentTypesFromString(lparens + 1, rparens, types); | - |
417 | return QByteArray::fromRawData(signature, nameLength); executed: return QByteArray::fromRawData(signature, nameLength); Execution Count:1201991 | 1201991 |
418 | } | - |
419 | int QMetaObject::indexOfSignal(const char *signal) const | - |
420 | { | - |
421 | const QMetaObject *m = this; | - |
422 | int i; | - |
423 | qt_noop(); | - |
424 | QArgumentTypeArray types; | - |
425 | QByteArray name = QMetaObjectPrivate::decodeMethodSignature(signal, types); | - |
426 | i = QMetaObjectPrivate::indexOfSignalRelative(&m, name, types.size(), types.constData()); | - |
427 | if (i >= 0) evaluated: i >= 0 yes Evaluation Count:100244 | yes Evaluation Count:142 |
| 142-100244 |
428 | i += m->methodOffset(); executed: i += m->methodOffset(); Execution Count:100244 | 100244 |
429 | return i; executed: return i; Execution Count:100386 | 100386 |
430 | } | - |
431 | | - |
432 | | - |
433 | | - |
434 | | - |
435 | | - |
436 | | - |
437 | | - |
438 | int QMetaObjectPrivate::indexOfSignalRelative(const QMetaObject **baseObject, | - |
439 | const QByteArray &name, int argc, | - |
440 | const QArgumentType *types) | - |
441 | { | - |
442 | int i = indexOfMethodRelative<MethodSignal>(baseObject, name, argc, types); | - |
443 | return i; executed: return i; Execution Count:556958 | 556958 |
444 | } | - |
445 | int QMetaObject::indexOfSlot(const char *slot) const | - |
446 | { | - |
447 | const QMetaObject *m = this; | - |
448 | int i; | - |
449 | qt_noop(); | - |
450 | QArgumentTypeArray types; | - |
451 | QByteArray name = QMetaObjectPrivate::decodeMethodSignature(slot, types); | - |
452 | i = QMetaObjectPrivate::indexOfSlotRelative(&m, name, types.size(), types.constData()); | - |
453 | if (i >= 0) evaluated: i >= 0 yes Evaluation Count:1971 | yes Evaluation Count:4 |
| 4-1971 |
454 | i += m->methodOffset(); executed: i += m->methodOffset(); Execution Count:1971 | 1971 |
455 | return i; executed: return i; Execution Count:1975 | 1975 |
456 | } | - |
457 | | - |
458 | | - |
459 | int QMetaObjectPrivate::indexOfSlotRelative(const QMetaObject **m, | - |
460 | const QByteArray &name, int argc, | - |
461 | const QArgumentType *types) | - |
462 | { | - |
463 | return indexOfMethodRelative<MethodSlot>(m, name, argc, types); executed: return indexOfMethodRelative<MethodSlot>(m, name, argc, types); Execution Count:738536 | 738536 |
464 | } | - |
465 | | - |
466 | int QMetaObjectPrivate::indexOfSignal(const QMetaObject *m, const QByteArray &name, | - |
467 | int argc, const QArgumentType *types) | - |
468 | { | - |
469 | int i = indexOfSignalRelative(&m, name, argc, types); | - |
470 | if (i >= 0) | 0 |
471 | i += m->methodOffset(); never executed: i += m->methodOffset(); | 0 |
472 | return i; never executed: return i; | 0 |
473 | } | - |
474 | | - |
475 | int QMetaObjectPrivate::indexOfSlot(const QMetaObject *m, const QByteArray &name, | - |
476 | int argc, const QArgumentType *types) | - |
477 | { | - |
478 | int i = indexOfSlotRelative(&m, name, argc, types); | - |
479 | if (i >= 0) | 0 |
480 | i += m->methodOffset(); never executed: i += m->methodOffset(); | 0 |
481 | return i; never executed: return i; | 0 |
482 | } | - |
483 | | - |
484 | int QMetaObjectPrivate::indexOfMethod(const QMetaObject *m, const QByteArray &name, | - |
485 | int argc, const QArgumentType *types) | - |
486 | { | - |
487 | int i = indexOfMethodRelative<0>(&m, name, argc, types); | - |
488 | if (i >= 0) evaluated: i >= 0 yes Evaluation Count:23440 | yes Evaluation Count:23008 |
| 23008-23440 |
489 | i += m->methodOffset(); executed: i += m->methodOffset(); Execution Count:23440 | 23440 |
490 | return i; executed: return i; Execution Count:46448 | 46448 |
491 | } | - |
492 | | - |
493 | int QMetaObjectPrivate::indexOfConstructor(const QMetaObject *m, const QByteArray &name, | - |
494 | int argc, const QArgumentType *types) | - |
495 | { | - |
496 | for (int i = priv(m->d.data)->constructorCount-1; i >= 0; --i) { evaluated: i >= 0 yes Evaluation Count:51 | yes Evaluation Count:2 |
| 2-51 |
497 | int handle = priv(m->d.data)->constructorData + 5*i; | - |
498 | if (methodMatch(m, handle, name, argc, types)) evaluated: methodMatch(m, handle, name, argc, types) yes Evaluation Count:14 | yes Evaluation Count:37 |
| 14-37 |
499 | return i; executed: return i; Execution Count:14 | 14 |
500 | } executed: } Execution Count:37 | 37 |
501 | return -1; executed: return -1; Execution Count:2 | 2 |
502 | } | - |
503 | int QMetaObjectPrivate::signalOffset(const QMetaObject *m) | - |
504 | { | - |
505 | qt_noop(); | - |
506 | int offset = 0; | - |
507 | for (m = m->d.superdata; m; m = m->d.superdata) evaluated: m yes Evaluation Count:29400047 | yes Evaluation Count:21889642 |
| 21889642-29400047 |
508 | offset += priv(m->d.data)->signalCount; executed: offset += priv(m->d.data)->signalCount; Execution Count:29400047 | 29400047 |
509 | return offset; executed: return offset; Execution Count:21889669 | 21889669 |
510 | } | - |
511 | int QMetaObjectPrivate::absoluteSignalCount(const QMetaObject *m) | - |
512 | { | - |
513 | qt_noop(); | - |
514 | int n = priv(m->d.data)->signalCount; | - |
515 | for (m = m->d.superdata; m; m = m->d.superdata) evaluated: m yes Evaluation Count:9 | yes Evaluation Count:10 |
| 9-10 |
516 | n += priv(m->d.data)->signalCount; executed: n += priv(m->d.data)->signalCount; Execution Count:9 | 9 |
517 | return n; executed: return n; Execution Count:10 | 10 |
518 | } | - |
519 | int QMetaObjectPrivate::signalIndex(const QMetaMethod &m) | - |
520 | { | - |
521 | if (!m.mobj) partially evaluated: !m.mobj no Evaluation Count:0 | yes Evaluation Count:14 |
| 0-14 |
522 | return -1; never executed: return -1; | 0 |
523 | return QMetaMethodPrivate::get(&m)->ownMethodIndex() + signalOffset(m.mobj); executed: return QMetaMethodPrivate::get(&m)->ownMethodIndex() + signalOffset(m.mobj); Execution Count:14 | 14 |
524 | } | - |
525 | QMetaMethod QMetaObjectPrivate::signal(const QMetaObject *m, int signal_index) | - |
526 | { | - |
527 | QMetaMethod result; | - |
528 | if (signal_index < 0) evaluated: signal_index < 0 yes Evaluation Count:1814 | yes Evaluation Count:869032 |
| 1814-869032 |
529 | return result; executed: return result; Execution Count:1814 | 1814 |
530 | qt_noop(); | - |
531 | int i = signal_index; | - |
532 | i -= signalOffset(m); | - |
533 | if (i < 0 && m->d.superdata) evaluated: i < 0 yes Evaluation Count:120458 | yes Evaluation Count:748568 |
partially evaluated: m->d.superdata yes Evaluation Count:120458 | no Evaluation Count:0 |
| 0-748568 |
534 | return signal(m->d.superdata, signal_index); executed: return signal(m->d.superdata, signal_index); Execution Count:120458 | 120458 |
535 | | - |
536 | if (i >= 0 && i < priv(m->d.data)->signalCount) { partially evaluated: i >= 0 yes Evaluation Count:748568 | no Evaluation Count:0 |
evaluated: i < priv(m->d.data)->signalCount yes Evaluation Count:748266 | yes Evaluation Count:298 |
| 0-748568 |
537 | result.mobj = m; | - |
538 | result.handle = priv(m->d.data)->methodData + 5*i; | - |
539 | } executed: } Execution Count:748266 | 748266 |
540 | return result; executed: return result; Execution Count:748564 | 748564 |
541 | } | - |
542 | | - |
543 | | - |
544 | | - |
545 | | - |
546 | | - |
547 | | - |
548 | | - |
549 | bool QMetaObjectPrivate::checkConnectArgs(int signalArgc, const QArgumentType *signalTypes, | - |
550 | int methodArgc, const QArgumentType *methodTypes) | - |
551 | { | - |
552 | if (signalArgc < methodArgc) partially evaluated: signalArgc < methodArgc no Evaluation Count:0 | yes Evaluation Count:380473 |
| 0-380473 |
553 | return false; never executed: return false; | 0 |
554 | for (int i = 0; i < methodArgc; ++i) { evaluated: i < methodArgc yes Evaluation Count:419729 | yes Evaluation Count:380474 |
| 380474-419729 |
555 | if (signalTypes[i] != methodTypes[i]) evaluated: signalTypes[i] != methodTypes[i] yes Evaluation Count:1 | yes Evaluation Count:419728 |
| 1-419728 |
556 | return false; executed: return false; Execution Count:1 | 1 |
557 | } executed: } Execution Count:419728 | 419728 |
558 | return true; executed: return true; Execution Count:380473 | 380473 |
559 | } | - |
560 | | - |
561 | | - |
562 | | - |
563 | | - |
564 | | - |
565 | | - |
566 | | - |
567 | bool QMetaObjectPrivate::checkConnectArgs(const QMetaMethodPrivate *signal, | - |
568 | const QMetaMethodPrivate *method) | - |
569 | { | - |
570 | if (signal->methodType() != QMetaMethod::Signal) never evaluated: signal->methodType() != QMetaMethod::Signal | 0 |
571 | return false; never executed: return false; | 0 |
572 | if (signal->parameterCount() < method->parameterCount()) never evaluated: signal->parameterCount() < method->parameterCount() | 0 |
573 | return false; never executed: return false; | 0 |
574 | const QMetaObject *smeta = signal->enclosingMetaObject(); | - |
575 | const QMetaObject *rmeta = method->enclosingMetaObject(); | - |
576 | for (int i = 0; i < method->parameterCount(); ++i) { never evaluated: i < method->parameterCount() | 0 |
577 | uint sourceTypeInfo = signal->parameterTypeInfo(i); | - |
578 | uint targetTypeInfo = method->parameterTypeInfo(i); | - |
579 | if ((sourceTypeInfo & IsUnresolvedType) never evaluated: (sourceTypeInfo & IsUnresolvedType) | 0 |
580 | || (targetTypeInfo & IsUnresolvedType)) { never evaluated: (targetTypeInfo & IsUnresolvedType) | 0 |
581 | QByteArray sourceName = typeNameFromTypeInfo(smeta, sourceTypeInfo); | - |
582 | QByteArray targetName = typeNameFromTypeInfo(rmeta, targetTypeInfo); | - |
583 | if (sourceName != targetName) never evaluated: sourceName != targetName | 0 |
584 | return false; never executed: return false; | 0 |
585 | } else { | 0 |
586 | int sourceType = typeFromTypeInfo(smeta, sourceTypeInfo); | - |
587 | int targetType = typeFromTypeInfo(rmeta, targetTypeInfo); | - |
588 | if (sourceType != targetType) never evaluated: sourceType != targetType | 0 |
589 | return false; never executed: return false; | 0 |
590 | } | 0 |
591 | } | - |
592 | return true; never executed: return true; | 0 |
593 | } | - |
594 | | - |
595 | static const QMetaObject *QMetaObject_findMetaObject(const QMetaObject *self, const char *name) | - |
596 | { | - |
597 | while (self) { partially evaluated: self yes Evaluation Count:86 | no Evaluation Count:0 |
| 0-86 |
598 | if (strcmp(rawStringData(self, 0), name) == 0) evaluated: strcmp(rawStringData(self, 0), name) == 0 yes Evaluation Count:80 | yes Evaluation Count:6 |
| 6-80 |
599 | return self; executed: return self; Execution Count:80 | 80 |
600 | if (self->d.relatedMetaObjects) { partially evaluated: self->d.relatedMetaObjects yes Evaluation Count:6 | no Evaluation Count:0 |
| 0-6 |
601 | qt_noop(); | - |
602 | const QMetaObject **e = self->d.relatedMetaObjects; | - |
603 | if (e) { partially evaluated: e yes Evaluation Count:6 | no Evaluation Count:0 |
| 0-6 |
604 | while (*e) { partially evaluated: *e yes Evaluation Count:6 | no Evaluation Count:0 |
| 0-6 |
605 | if (const QMetaObject *m =QMetaObject_findMetaObject((*e), name)) partially evaluated: const QMetaObject *m =QMetaObject_findMetaObject((*e), name) yes Evaluation Count:6 | no Evaluation Count:0 |
| 0-6 |
606 | return m; executed: return m; Execution Count:6 | 6 |
607 | ++e; | - |
608 | } | 0 |
609 | } | 0 |
610 | } | 0 |
611 | self = self->d.superdata; | - |
612 | } | 0 |
613 | return self; never executed: return self; | 0 |
614 | } | - |
615 | | - |
616 | | - |
617 | | - |
618 | | - |
619 | | - |
620 | | - |
621 | | - |
622 | int QMetaObject::indexOfEnumerator(const char *name) const | - |
623 | { | - |
624 | const QMetaObject *m = this; | - |
625 | while (m) { evaluated: m yes Evaluation Count:3736 | yes Evaluation Count:600 |
| 600-3736 |
626 | const QMetaObjectPrivate *d = priv(m->d.data); | - |
627 | for (int i = d->enumeratorCount - 1; i >= 0; --i) { evaluated: i >= 0 yes Evaluation Count:15673 | yes Evaluation Count:1734 |
| 1734-15673 |
628 | const char *prop = rawStringData(m, m->d.data[d->enumeratorData + 4*i]); | - |
629 | if (name[0] == prop[0] && strcmp(name + 1, prop + 1) == 0) { evaluated: name[0] == prop[0] yes Evaluation Count:2900 | yes Evaluation Count:12773 |
evaluated: strcmp(name + 1, prop + 1) == 0 yes Evaluation Count:2002 | yes Evaluation Count:898 |
| 898-12773 |
630 | i += m->enumeratorOffset(); | - |
631 | return i; executed: return i; Execution Count:2002 | 2002 |
632 | } | - |
633 | } executed: } Execution Count:13671 | 13671 |
634 | m = m->d.superdata; | - |
635 | } executed: } Execution Count:1734 | 1734 |
636 | return -1; executed: return -1; Execution Count:600 | 600 |
637 | } | - |
638 | | - |
639 | | - |
640 | | - |
641 | | - |
642 | | - |
643 | | - |
644 | | - |
645 | int QMetaObject::indexOfProperty(const char *name) const | - |
646 | { | - |
647 | const QMetaObject *m = this; | - |
648 | while (m) { evaluated: m yes Evaluation Count:99793 | yes Evaluation Count:24386 |
| 24386-99793 |
649 | const QMetaObjectPrivate *d = priv(m->d.data); | - |
650 | for (int i = d->propertyCount-1; i >= 0; --i) { evaluated: i >= 0 yes Evaluation Count:1115498 | yes Evaluation Count:89954 |
| 89954-1115498 |
651 | const char *prop = rawStringData(m, m->d.data[d->propertyData + 3*i]); | - |
652 | if (name[0] == prop[0] && strcmp(name + 1, prop + 1) == 0) { evaluated: name[0] == prop[0] yes Evaluation Count:17288 | yes Evaluation Count:1098210 |
evaluated: strcmp(name + 1, prop + 1) == 0 yes Evaluation Count:9839 | yes Evaluation Count:7449 |
| 7449-1098210 |
653 | i += m->propertyOffset(); | - |
654 | return i; executed: return i; Execution Count:9839 | 9839 |
655 | } | - |
656 | } executed: } Execution Count:1105659 | 1105659 |
657 | m = m->d.superdata; | - |
658 | } executed: } Execution Count:89954 | 89954 |
659 | | - |
660 | qt_noop(); | - |
661 | if (priv(this->d.data)->flags & DynamicMetaObject) { partially evaluated: priv(this->d.data)->flags & DynamicMetaObject no Evaluation Count:0 | yes Evaluation Count:24386 |
| 0-24386 |
662 | QAbstractDynamicMetaObject *me = | - |
663 | const_cast<QAbstractDynamicMetaObject *>(static_cast<const QAbstractDynamicMetaObject *>(this)); | - |
664 | | - |
665 | return me->createProperty(name, 0); never executed: return me->createProperty(name, 0); | 0 |
666 | } | - |
667 | | - |
668 | return -1; executed: return -1; Execution Count:24386 | 24386 |
669 | } | - |
670 | | - |
671 | | - |
672 | | - |
673 | | - |
674 | | - |
675 | | - |
676 | | - |
677 | int QMetaObject::indexOfClassInfo(const char *name) const | - |
678 | { | - |
679 | int i = -1; | - |
680 | const QMetaObject *m = this; | - |
681 | while (m && i < 0) { evaluated: m yes Evaluation Count:1036 | yes Evaluation Count:121 |
evaluated: i < 0 yes Evaluation Count:666 | yes Evaluation Count:370 |
| 121-1036 |
682 | for (i = priv(m->d.data)->classInfoCount-1; i >= 0; --i) evaluated: i >= 0 yes Evaluation Count:444 | yes Evaluation Count:296 |
| 296-444 |
683 | if (strcmp(name, rawStringData(m, m->d.data[priv(m->d.data)->classInfoData + 2*i])) == 0) { evaluated: strcmp(name, rawStringData(m, m->d.data[priv(m->d.data)->classInfoData + 2*i])) == 0 yes Evaluation Count:370 | yes Evaluation Count:74 |
| 74-370 |
684 | i += m->classInfoOffset(); | - |
685 | break; executed: break; Execution Count:370 | 370 |
686 | } | - |
687 | m = m->d.superdata; | - |
688 | } executed: } Execution Count:666 | 666 |
689 | return i; executed: return i; Execution Count:491 | 491 |
690 | } | - |
691 | QMetaMethod QMetaObject::constructor(int index) const | - |
692 | { | - |
693 | int i = index; | - |
694 | QMetaMethod result; | - |
695 | qt_noop(); | - |
696 | if (i >= 0 && i < priv(d.data)->constructorCount) { partially evaluated: i >= 0 yes Evaluation Count:102 | no Evaluation Count:0 |
partially evaluated: i < priv(d.data)->constructorCount yes Evaluation Count:102 | no Evaluation Count:0 |
| 0-102 |
697 | result.mobj = this; | - |
698 | result.handle = priv(d.data)->constructorData + 5*i; | - |
699 | } executed: } Execution Count:102 | 102 |
700 | return result; executed: return result; Execution Count:102 | 102 |
701 | } | - |
702 | | - |
703 | | - |
704 | | - |
705 | | - |
706 | | - |
707 | | - |
708 | QMetaMethod QMetaObject::method(int index) const | - |
709 | { | - |
710 | int i = index; | - |
711 | i -= methodOffset(); | - |
712 | if (i < 0 && d.superdata) evaluated: i < 0 yes Evaluation Count:128554 | yes Evaluation Count:368980 |
evaluated: d.superdata yes Evaluation Count:128551 | yes Evaluation Count:3 |
| 3-368980 |
713 | return d.superdata->method(index); executed: return d.superdata->method(index); Execution Count:128551 | 128551 |
714 | | - |
715 | QMetaMethod result; | - |
716 | if (i >= 0 && i < priv(d.data)->methodCount) { evaluated: i >= 0 yes Evaluation Count:368980 | yes Evaluation Count:3 |
evaluated: i < priv(d.data)->methodCount yes Evaluation Count:368975 | yes Evaluation Count:4 |
| 3-368980 |
717 | result.mobj = this; | - |
718 | result.handle = priv(d.data)->methodData + 5*i; | - |
719 | } executed: } Execution Count:368975 | 368975 |
720 | return result; executed: return result; Execution Count:368982 | 368982 |
721 | } | - |
722 | | - |
723 | | - |
724 | | - |
725 | | - |
726 | | - |
727 | | - |
728 | QMetaEnum QMetaObject::enumerator(int index) const | - |
729 | { | - |
730 | int i = index; | - |
731 | i -= enumeratorOffset(); | - |
732 | if (i < 0 && d.superdata) evaluated: i < 0 yes Evaluation Count:1730 | yes Evaluation Count:2015 |
evaluated: d.superdata yes Evaluation Count:1132 | yes Evaluation Count:598 |
| 598-2015 |
733 | return d.superdata->enumerator(index); executed: return d.superdata->enumerator(index); Execution Count:1132 | 1132 |
734 | | - |
735 | QMetaEnum result; | - |
736 | if (i >= 0 && i < priv(d.data)->enumeratorCount) { evaluated: i >= 0 yes Evaluation Count:2015 | yes Evaluation Count:598 |
partially evaluated: i < priv(d.data)->enumeratorCount yes Evaluation Count:2015 | no Evaluation Count:0 |
| 0-2015 |
737 | result.mobj = this; | - |
738 | result.handle = priv(d.data)->enumeratorData + 4*i; | - |
739 | } executed: } Execution Count:2015 | 2015 |
740 | return result; executed: return result; Execution Count:2613 | 2613 |
741 | } | - |
742 | | - |
743 | | - |
744 | | - |
745 | | - |
746 | | - |
747 | | - |
748 | | - |
749 | QMetaProperty QMetaObject::property(int index) const | - |
750 | { | - |
751 | int i = index; | - |
752 | i -= propertyOffset(); | - |
753 | if (i < 0 && d.superdata) evaluated: i < 0 yes Evaluation Count:14459 | yes Evaluation Count:13968 |
partially evaluated: d.superdata yes Evaluation Count:14459 | no Evaluation Count:0 |
| 0-14459 |
754 | return d.superdata->property(index); executed: return d.superdata->property(index); Execution Count:14459 | 14459 |
755 | | - |
756 | QMetaProperty result; | - |
757 | if (i >= 0 && i < priv(d.data)->propertyCount) { partially evaluated: i >= 0 yes Evaluation Count:13968 | no Evaluation Count:0 |
partially evaluated: i < priv(d.data)->propertyCount yes Evaluation Count:13968 | no Evaluation Count:0 |
| 0-13968 |
758 | int handle = priv(d.data)->propertyData + 3*i; | - |
759 | int flags = d.data[handle + 2]; | - |
760 | result.mobj = this; | - |
761 | result.handle = handle; | - |
762 | result.idx = i; | - |
763 | | - |
764 | if (flags & EnumOrFlag) { evaluated: flags & EnumOrFlag yes Evaluation Count:780 | yes Evaluation Count:13188 |
| 780-13188 |
765 | const char *type = rawTypeNameFromTypeInfo(this, d.data[handle + 1]); | - |
766 | result.menum = enumerator(indexOfEnumerator(type)); | - |
767 | if (!result.menum.isValid()) { evaluated: !result.menum.isValid() yes Evaluation Count:524 | yes Evaluation Count:256 |
| 256-524 |
768 | const char *enum_name = type; | - |
769 | const char *scope_name = rawStringData(this, 0); | - |
770 | char *scope_buffer = 0; | - |
771 | | - |
772 | const char *colon = strrchr(enum_name, ':'); | - |
773 | | - |
774 | qt_noop(); | - |
775 | if (colon > enum_name) { evaluated: colon > enum_name yes Evaluation Count:450 | yes Evaluation Count:74 |
| 74-450 |
776 | int len = colon-enum_name-1; | - |
777 | scope_buffer = (char *)malloc(len+1); | - |
778 | memcpy(scope_buffer, enum_name, len); | - |
779 | scope_buffer[len] = '\0'; | - |
780 | scope_name = scope_buffer; | - |
781 | enum_name = colon+1; | - |
782 | } executed: } Execution Count:450 | 450 |
783 | | - |
784 | const QMetaObject *scope = 0; | - |
785 | if (qstrcmp(scope_name, "Qt") == 0) evaluated: qstrcmp(scope_name, "Qt") == 0 yes Evaluation Count:444 | yes Evaluation Count:80 |
| 80-444 |
786 | scope = &QObject::staticQtMetaObject; executed: scope = &QObject::staticQtMetaObject; Execution Count:444 | 444 |
787 | else | - |
788 | scope = QMetaObject_findMetaObject(this, scope_name); executed: scope = QMetaObject_findMetaObject(this, scope_name); Execution Count:80 | 80 |
789 | if (scope) partially evaluated: scope yes Evaluation Count:524 | no Evaluation Count:0 |
| 0-524 |
790 | result.menum = scope->enumerator(scope->indexOfEnumerator(enum_name)); executed: result.menum = scope->enumerator(scope->indexOfEnumerator(enum_name)); Execution Count:524 | 524 |
791 | if (scope_buffer) evaluated: scope_buffer yes Evaluation Count:450 | yes Evaluation Count:74 |
| 74-450 |
792 | free(scope_buffer); executed: free(scope_buffer); Execution Count:450 | 450 |
793 | } executed: } Execution Count:524 | 524 |
794 | } executed: } Execution Count:780 | 780 |
795 | } executed: } Execution Count:13968 | 13968 |
796 | return result; executed: return result; Execution Count:13968 | 13968 |
797 | } | - |
798 | QMetaProperty QMetaObject::userProperty() const | - |
799 | { | - |
800 | const int propCount = propertyCount(); | - |
801 | for (int i = propCount - 1; i >= 0; --i) { evaluated: i >= 0 yes Evaluation Count:3834 | yes Evaluation Count:3 |
| 3-3834 |
802 | const QMetaProperty prop = property(i); | - |
803 | if (prop.isUser()) evaluated: prop.isUser() yes Evaluation Count:248 | yes Evaluation Count:3586 |
| 248-3586 |
804 | return prop; executed: return prop; Execution Count:248 | 248 |
805 | } executed: } Execution Count:3586 | 3586 |
806 | return QMetaProperty(); executed: return QMetaProperty(); Execution Count:3 | 3 |
807 | } | - |
808 | QMetaClassInfo QMetaObject::classInfo(int index) const | - |
809 | { | - |
810 | int i = index; | - |
811 | i -= classInfoOffset(); | - |
812 | if (i < 0 && d.superdata) evaluated: i < 0 yes Evaluation Count:1 | yes Evaluation Count:389 |
partially evaluated: d.superdata yes Evaluation Count:1 | no Evaluation Count:0 |
| 0-389 |
813 | return d.superdata->classInfo(index); executed: return d.superdata->classInfo(index); Execution Count:1 | 1 |
814 | | - |
815 | QMetaClassInfo result; | - |
816 | if (i >= 0 && i < priv(d.data)->classInfoCount) { partially evaluated: i >= 0 yes Evaluation Count:389 | no Evaluation Count:0 |
partially evaluated: i < priv(d.data)->classInfoCount yes Evaluation Count:389 | no Evaluation Count:0 |
| 0-389 |
817 | result.mobj = this; | - |
818 | result.handle = priv(d.data)->classInfoData + 2*i; | - |
819 | } executed: } Execution Count:389 | 389 |
820 | return result; executed: return result; Execution Count:389 | 389 |
821 | } | - |
822 | bool QMetaObject::checkConnectArgs(const char *signal, const char *method) | - |
823 | { | - |
824 | const char *s1 = signal; | - |
825 | const char *s2 = method; | - |
826 | while (*s1++ != '(') { } executed: } Execution Count:161 evaluated: *s1++ != '(' yes Evaluation Count:161 | yes Evaluation Count:23 |
| 23-161 |
827 | while (*s2++ != '(') { } executed: } Execution Count:115 evaluated: *s2++ != '(' yes Evaluation Count:115 | yes Evaluation Count:23 |
| 23-115 |
828 | if (*s2 == ')' || qstrcmp(s1,s2) == 0) partially evaluated: *s2 == ')' yes Evaluation Count:23 | no Evaluation Count:0 |
never evaluated: qstrcmp(s1,s2) == 0 | 0-23 |
829 | return true; executed: return true; Execution Count:23 | 23 |
830 | int s1len = qstrlen(s1); | - |
831 | int s2len = qstrlen(s2); | - |
832 | if (s2len < s1len && strncmp(s1,s2,s2len-1)==0 && s1[s2len-1]==',') never evaluated: s2len < s1len never evaluated: strncmp(s1,s2,s2len-1)==0 never evaluated: s1[s2len-1]==',' | 0 |
833 | return true; never executed: return true; | 0 |
834 | return false; never executed: return false; | 0 |
835 | } | - |
836 | bool QMetaObject::checkConnectArgs(const QMetaMethod &signal, | - |
837 | const QMetaMethod &method) | - |
838 | { | - |
839 | return QMetaObjectPrivate::checkConnectArgs( | 0 |
840 | QMetaMethodPrivate::get(&signal), | 0 |
841 | QMetaMethodPrivate::get(&method)); never executed: return QMetaObjectPrivate::checkConnectArgs( QMetaMethodPrivate::get(&signal), QMetaMethodPrivate::get(&method)); | 0 |
842 | } | - |
843 | | - |
844 | static void qRemoveWhitespace(const char *s, char *d) | - |
845 | { | - |
846 | char last = 0; | - |
847 | while (*s && is_space(*s)) partially evaluated: *s yes Evaluation Count:454325 | no Evaluation Count:0 |
evaluated: is_space(*s) yes Evaluation Count:10 | yes Evaluation Count:454316 |
| 0-454325 |
848 | s++; executed: s++; Execution Count:10 | 10 |
849 | while (*s) { evaluated: *s yes Evaluation Count:456311 | yes Evaluation Count:454304 |
| 454304-456311 |
850 | while (*s && !is_space(*s)) evaluated: *s yes Evaluation Count:12877919 | yes Evaluation Count:454292 |
evaluated: !is_space(*s) yes Evaluation Count:12875921 | yes Evaluation Count:2001 |
| 2001-12877919 |
851 | last = *d++ = *s++; executed: last = *d++ = *s++; Execution Count:12875923 | 12875923 |
852 | while (*s && is_space(*s)) evaluated: *s yes Evaluation Count:3998 | yes Evaluation Count:454302 |
evaluated: is_space(*s) yes Evaluation Count:2008 | yes Evaluation Count:1990 |
| 1990-454302 |
853 | s++; executed: s++; Execution Count:2008 | 2008 |
854 | if (*s && ((is_ident_char(*s) && is_ident_char(last)) evaluated: *s yes Evaluation Count:1990 | yes Evaluation Count:454305 |
evaluated: is_ident_char(*s) yes Evaluation Count:696 | yes Evaluation Count:1294 |
evaluated: is_ident_char(last) yes Evaluation Count:547 | yes Evaluation Count:149 |
| 149-454305 |
855 | || ((*s == ':') && (last == '<')))) { evaluated: (*s == ':') yes Evaluation Count:1 | yes Evaluation Count:1442 |
partially evaluated: (last == '<') yes Evaluation Count:1 | no Evaluation Count:0 |
| 0-1442 |
856 | last = *d++ = ' '; | - |
857 | } executed: } Execution Count:548 | 548 |
858 | } executed: } Execution Count:456296 | 456296 |
859 | *d = '\0'; | - |
860 | } executed: } Execution Count:454304 | 454304 |
861 | | - |
862 | static char *qNormalizeType(char *d, int &templdepth, QByteArray &result) | - |
863 | { | - |
864 | const char *t = d; | - |
865 | while (*d && (templdepth evaluated: *d yes Evaluation Count:5313745 | yes Evaluation Count:16815 |
evaluated: templdepth yes Evaluation Count:307103 | yes Evaluation Count:5006688 |
| 16815-5313745 |
866 | || (*d != ',' && *d != ')'))) { evaluated: *d != ',' yes Evaluation Count:4726853 | yes Evaluation Count:279862 |
evaluated: *d != ')' yes Evaluation Count:4289411 | yes Evaluation Count:437489 |
| 279862-4726853 |
867 | if (*d == '<') evaluated: *d == '<' yes Evaluation Count:20902 | yes Evaluation Count:4575554 |
| 20902-4575554 |
868 | ++templdepth; executed: ++templdepth; Execution Count:20902 | 20902 |
869 | if (*d == '>') evaluated: *d == '>' yes Evaluation Count:20902 | yes Evaluation Count:4575573 |
| 20902-4575573 |
870 | --templdepth; executed: --templdepth; Execution Count:20902 | 20902 |
871 | ++d; | - |
872 | } executed: } Execution Count:4596465 | 4596465 |
873 | | - |
874 | | - |
875 | if (strncmp("void)", t, d - t + 1) != 0) evaluated: strncmp("void)", t, d - t + 1) != 0 yes Evaluation Count:734133 | yes Evaluation Count:29 |
| 29-734133 |
876 | result += normalizeTypeInternal(t, d); executed: result += normalizeTypeInternal(t, d); Execution Count:734127 | 734127 |
877 | | - |
878 | return d; executed: return d; Execution Count:734203 | 734203 |
879 | } | - |
880 | QByteArray QMetaObject::normalizedType(const char *type) | - |
881 | { | - |
882 | QByteArray result; | - |
883 | | - |
884 | if (!type || !*type) partially evaluated: !type no Evaluation Count:0 | yes Evaluation Count:16878 |
evaluated: !*type yes Evaluation Count:35 | yes Evaluation Count:16839 |
| 0-16878 |
885 | return result; executed: return result; Execution Count:35 | 35 |
886 | | - |
887 | QVarLengthArray<char> stackbuf(qstrlen(type) + 1); | - |
888 | qRemoveWhitespace(type, stackbuf.data()); | - |
889 | int templdepth = 0; | - |
890 | qNormalizeType(stackbuf.data(), templdepth, result); | - |
891 | | - |
892 | return result; executed: return result; Execution Count:16853 | 16853 |
893 | } | - |
894 | QByteArray QMetaObject::normalizedSignature(const char *method) | - |
895 | { | - |
896 | QByteArray result; | - |
897 | if (!method || !*method) partially evaluated: !method no Evaluation Count:0 | yes Evaluation Count:437470 |
partially evaluated: !*method no Evaluation Count:0 | yes Evaluation Count:437470 |
| 0-437470 |
898 | return result; never executed: return result; | 0 |
899 | int len = int(strlen(method)); | - |
900 | QVarLengthArray<char> stackbuf(len + 1); | - |
901 | char *d = stackbuf.data(); | - |
902 | qRemoveWhitespace(method, d); | - |
903 | | - |
904 | result.reserve(len); | - |
905 | | - |
906 | int argdepth = 0; | - |
907 | int templdepth = 0; | - |
908 | while (*d) { evaluated: *d yes Evaluation Count:8279076 | yes Evaluation Count:437480 |
| 437480-8279076 |
909 | if (argdepth == 1) { evaluated: argdepth == 1 yes Evaluation Count:717348 | yes Evaluation Count:7561877 |
| 717348-7561877 |
910 | d = qNormalizeType(d, templdepth, result); | - |
911 | if (!*d) evaluated: !*d yes Evaluation Count:1 | yes Evaluation Count:717348 |
| 1-717348 |
912 | break; executed: break; Execution Count:1 | 1 |
913 | } executed: } Execution Count:717348 | 717348 |
914 | if (*d == '(') evaluated: *d == '(' yes Evaluation Count:437489 | yes Evaluation Count:7841742 |
| 437489-7841742 |
915 | ++argdepth; executed: ++argdepth; Execution Count:437487 | 437487 |
916 | if (*d == ')') evaluated: *d == ')' yes Evaluation Count:437495 | yes Evaluation Count:7841714 |
| 437495-7841714 |
917 | --argdepth; executed: --argdepth; Execution Count:437493 | 437493 |
918 | result += *d++; | - |
919 | } executed: } Execution Count:8279024 | 8279024 |
920 | | - |
921 | return result; executed: return result; Execution Count:437482 | 437482 |
922 | } | - |
923 | | - |
924 | enum { MaximumParamCount = 11 }; | - |
925 | bool QMetaObject::invokeMethod(QObject *obj, | - |
926 | const char *member, | - |
927 | Qt::ConnectionType type, | - |
928 | QGenericReturnArgument ret, | - |
929 | QGenericArgument val0, | - |
930 | QGenericArgument val1, | - |
931 | QGenericArgument val2, | - |
932 | QGenericArgument val3, | - |
933 | QGenericArgument val4, | - |
934 | QGenericArgument val5, | - |
935 | QGenericArgument val6, | - |
936 | QGenericArgument val7, | - |
937 | QGenericArgument val8, | - |
938 | QGenericArgument val9) | - |
939 | { | - |
940 | if (!obj) evaluated: !obj yes Evaluation Count:2 | yes Evaluation Count:140630 |
| 2-140630 |
941 | return false; executed: return false; Execution Count:2 | 2 |
942 | | - |
943 | QVarLengthArray<char, 512> sig; | - |
944 | int len = qstrlen(member); | - |
945 | if (len <= 0) evaluated: len <= 0 yes Evaluation Count:1 | yes Evaluation Count:140629 |
| 1-140629 |
946 | return false; executed: return false; Execution Count:1 | 1 |
947 | sig.append(member, len); | - |
948 | sig.append('('); | - |
949 | | - |
950 | const char *typeNames[] = {ret.name(), val0.name(), val1.name(), val2.name(), val3.name(), | - |
951 | val4.name(), val5.name(), val6.name(), val7.name(), val8.name(), | - |
952 | val9.name()}; | - |
953 | | - |
954 | int paramCount; | - |
955 | for (paramCount = 1; paramCount < MaximumParamCount; ++paramCount) { partially evaluated: paramCount < MaximumParamCount yes Evaluation Count:161950 | no Evaluation Count:0 |
| 0-161950 |
956 | len = qstrlen(typeNames[paramCount]); | - |
957 | if (len <= 0) evaluated: len <= 0 yes Evaluation Count:140629 | yes Evaluation Count:21321 |
| 21321-140629 |
958 | break; executed: break; Execution Count:140629 | 140629 |
959 | sig.append(typeNames[paramCount], len); | - |
960 | sig.append(','); | - |
961 | } executed: } Execution Count:21321 | 21321 |
962 | if (paramCount == 1) evaluated: paramCount == 1 yes Evaluation Count:119470 | yes Evaluation Count:21159 |
| 21159-119470 |
963 | sig.append(')'); executed: sig.append(')'); Execution Count:119470 | 119470 |
964 | else | - |
965 | sig[sig.size() - 1] = ')'; executed: sig[sig.size() - 1] = ')'; Execution Count:21159 | 21159 |
966 | sig.append('\0'); | - |
967 | | - |
968 | const QMetaObject *meta = obj->metaObject(); | - |
969 | int idx = meta->indexOfMethod(sig.constData()); | - |
970 | if (idx < 0) { evaluated: idx < 0 yes Evaluation Count:12 | yes Evaluation Count:140617 |
| 12-140617 |
971 | QByteArray norm = QMetaObject::normalizedSignature(sig.constData()); | - |
972 | idx = meta->indexOfMethod(norm.constData()); | - |
973 | } executed: } Execution Count:12 | 12 |
974 | | - |
975 | if (idx < 0 || idx >= meta->methodCount()) { evaluated: idx < 0 yes Evaluation Count:10 | yes Evaluation Count:140619 |
partially evaluated: idx >= meta->methodCount() no Evaluation Count:0 | yes Evaluation Count:140619 |
| 0-140619 |
976 | QMessageLogger("kernel/qmetaobject.cpp", 1457, __PRETTY_FUNCTION__).warning("QMetaObject::invokeMethod: No such method %s::%s", | - |
977 | meta->className(), sig.constData()); | - |
978 | return false; executed: return false; Execution Count:10 | 10 |
979 | } | - |
980 | QMetaMethod method = meta->method(idx); | - |
981 | return method.invoke(obj, type, ret, | 140619 |
982 | val0, val1, val2, val3, val4, val5, val6, val7, val8, val9); executed: return method.invoke(obj, type, ret, val0, val1, val2, val3, val4, val5, val6, val7, val8, val9); Execution Count:140619 | 140619 |
983 | } | - |
984 | QByteArray QMetaMethodPrivate::signature() const | - |
985 | { | - |
986 | qt_noop(); | - |
987 | QByteArray result; | - |
988 | result.reserve(256); | - |
989 | result += name(); | - |
990 | result += '('; | - |
991 | QList<QByteArray> argTypes = parameterTypes(); | - |
992 | for (int i = 0; i < argTypes.size(); ++i) { evaluated: i < argTypes.size() yes Evaluation Count:7092 | yes Evaluation Count:20487 |
| 7092-20487 |
993 | if (i) evaluated: i yes Evaluation Count:566 | yes Evaluation Count:6526 |
| 566-6526 |
994 | result += ','; executed: result += ','; Execution Count:566 | 566 |
995 | result += argTypes.at(i); | - |
996 | } executed: } Execution Count:7092 | 7092 |
997 | result += ')'; | - |
998 | return result; executed: return result; Execution Count:20487 | 20487 |
999 | } | - |
1000 | | - |
1001 | QByteArray QMetaMethodPrivate::name() const | - |
1002 | { | - |
1003 | qt_noop(); | - |
1004 | return stringData(mobj, mobj->d.data[handle]); executed: return stringData(mobj, mobj->d.data[handle]); Execution Count:46868 | 46868 |
1005 | } | - |
1006 | | - |
1007 | int QMetaMethodPrivate::typesDataIndex() const | - |
1008 | { | - |
1009 | qt_noop(); | - |
1010 | return mobj->d.data[handle + 2]; executed: return mobj->d.data[handle + 2]; Execution Count:41887 | 41887 |
1011 | } | - |
1012 | | - |
1013 | const char *QMetaMethodPrivate::rawReturnTypeName() const | - |
1014 | { | - |
1015 | qt_noop(); | - |
1016 | uint typeInfo = mobj->d.data[typesDataIndex()]; | - |
1017 | if (typeInfo & IsUnresolvedType) evaluated: typeInfo & IsUnresolvedType yes Evaluation Count:31 | yes Evaluation Count:377 |
| 31-377 |
1018 | return rawStringData(mobj, typeInfo & TypeNameIndexMask); executed: return rawStringData(mobj, typeInfo & TypeNameIndexMask); Execution Count:31 | 31 |
1019 | else | - |
1020 | return QMetaType::typeName(typeInfo); executed: return QMetaType::typeName(typeInfo); Execution Count:377 | 377 |
1021 | } | - |
1022 | | - |
1023 | int QMetaMethodPrivate::returnType() const | - |
1024 | { | - |
1025 | return parameterType(-1); executed: return parameterType(-1); Execution Count:9917 | 9917 |
1026 | } | - |
1027 | | - |
1028 | int QMetaMethodPrivate::parameterCount() const | - |
1029 | { | - |
1030 | qt_noop(); | - |
1031 | return mobj->d.data[handle + 1]; executed: return mobj->d.data[handle + 1]; Execution Count:257823 | 257823 |
1032 | } | - |
1033 | | - |
1034 | int QMetaMethodPrivate::parametersDataIndex() const | - |
1035 | { | - |
1036 | qt_noop(); | - |
1037 | return typesDataIndex() + 1; executed: return typesDataIndex() + 1; Execution Count:41479 | 41479 |
1038 | } | - |
1039 | | - |
1040 | uint QMetaMethodPrivate::parameterTypeInfo(int index) const | - |
1041 | { | - |
1042 | qt_noop(); | - |
1043 | return mobj->d.data[parametersDataIndex() + index]; executed: return mobj->d.data[parametersDataIndex() + index]; Execution Count:10081 | 10081 |
1044 | } | - |
1045 | | - |
1046 | int QMetaMethodPrivate::parameterType(int index) const | - |
1047 | { | - |
1048 | qt_noop(); | - |
1049 | return typeFromTypeInfo(mobj, parameterTypeInfo(index)); executed: return typeFromTypeInfo(mobj, parameterTypeInfo(index)); Execution Count:10081 | 10081 |
1050 | } | - |
1051 | | - |
1052 | void QMetaMethodPrivate::getParameterTypes(int *types) const | - |
1053 | { | - |
1054 | qt_noop(); | - |
1055 | int dataIndex = parametersDataIndex(); | - |
1056 | int argc = parameterCount(); | - |
1057 | for (int i = 0; i < argc; ++i) { evaluated: i < argc yes Evaluation Count:80 | yes Evaluation Count:42 |
| 42-80 |
1058 | int id = typeFromTypeInfo(mobj, mobj->d.data[dataIndex++]); | - |
1059 | *(types++) = id; | - |
1060 | } executed: } Execution Count:80 | 80 |
1061 | } executed: } Execution Count:42 | 42 |
1062 | | - |
1063 | QList<QByteArray> QMetaMethodPrivate::parameterTypes() const | - |
1064 | { | - |
1065 | qt_noop(); | - |
1066 | QList<QByteArray> list; | - |
1067 | int argc = parameterCount(); | - |
1068 | int paramsIndex = parametersDataIndex(); | - |
1069 | for (int i = 0; i < argc; ++i) evaluated: i < argc yes Evaluation Count:21122 | yes Evaluation Count:30218 |
| 21122-30218 |
1070 | list += typeNameFromTypeInfo(mobj, mobj->d.data[paramsIndex + i]); executed: list += typeNameFromTypeInfo(mobj, mobj->d.data[paramsIndex + i]); Execution Count:21122 | 21122 |
1071 | return list; executed: return list; Execution Count:30218 | 30218 |
1072 | } | - |
1073 | | - |
1074 | QList<QByteArray> QMetaMethodPrivate::parameterNames() const | - |
1075 | { | - |
1076 | qt_noop(); | - |
1077 | QList<QByteArray> list; | - |
1078 | int argc = parameterCount(); | - |
1079 | int namesIndex = parametersDataIndex() + argc; | - |
1080 | for (int i = 0; i < argc; ++i) evaluated: i < argc yes Evaluation Count:666 | yes Evaluation Count:1138 |
| 666-1138 |
1081 | list += stringData(mobj, mobj->d.data[namesIndex + i]); executed: list += stringData(mobj, mobj->d.data[namesIndex + i]); Execution Count:666 | 666 |
1082 | return list; executed: return list; Execution Count:1138 | 1138 |
1083 | } | - |
1084 | | - |
1085 | QByteArray QMetaMethodPrivate::tag() const | - |
1086 | { | - |
1087 | qt_noop(); | - |
1088 | return stringData(mobj, mobj->d.data[handle + 3]); executed: return stringData(mobj, mobj->d.data[handle + 3]); Execution Count:1334 | 1334 |
1089 | } | - |
1090 | | - |
1091 | int QMetaMethodPrivate::ownMethodIndex() const | - |
1092 | { | - |
1093 | | - |
1094 | return (handle - priv(mobj->d.data)->methodData) / 5; executed: return (handle - priv(mobj->d.data)->methodData) / 5; Execution Count:217142 | 217142 |
1095 | } | - |
1096 | QByteArray QMetaMethod::methodSignature() const | - |
1097 | { | - |
1098 | if (!mobj) evaluated: !mobj yes Evaluation Count:2 | yes Evaluation Count:20487 |
| 2-20487 |
1099 | return QByteArray(); executed: return QByteArray(); Execution Count:2 | 2 |
1100 | return QMetaMethodPrivate::get(this)->signature(); executed: return QMetaMethodPrivate::get(this)->signature(); Execution Count:20487 | 20487 |
1101 | } | - |
1102 | QByteArray QMetaMethod::name() const | - |
1103 | { | - |
1104 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:26381 |
| 0-26381 |
1105 | return QByteArray(); never executed: return QByteArray(); | 0 |
1106 | return QMetaMethodPrivate::get(this)->name(); executed: return QMetaMethodPrivate::get(this)->name(); Execution Count:26381 | 26381 |
1107 | } | - |
1108 | int QMetaMethod::returnType() const | - |
1109 | { | - |
1110 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:9917 |
| 0-9917 |
1111 | return QMetaType::UnknownType; never executed: return QMetaType::UnknownType; | 0 |
1112 | return QMetaMethodPrivate::get(this)->returnType(); executed: return QMetaMethodPrivate::get(this)->returnType(); Execution Count:9917 | 9917 |
1113 | } | - |
1114 | int QMetaMethod::parameterCount() const | - |
1115 | { | - |
1116 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:9439 |
| 0-9439 |
1117 | return 0; never executed: return 0; | 0 |
1118 | return QMetaMethodPrivate::get(this)->parameterCount(); executed: return QMetaMethodPrivate::get(this)->parameterCount(); Execution Count:9439 | 9439 |
1119 | } | - |
1120 | int QMetaMethod::parameterType(int index) const | - |
1121 | { | - |
1122 | if (!mobj || index < 0) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:248 |
evaluated: index < 0 yes Evaluation Count:42 | yes Evaluation Count:206 |
| 0-248 |
1123 | return QMetaType::UnknownType; executed: return QMetaType::UnknownType; Execution Count:42 | 42 |
1124 | if (index >= QMetaMethodPrivate::get(this)->parameterCount()) evaluated: index >= QMetaMethodPrivate::get(this)->parameterCount() yes Evaluation Count:42 | yes Evaluation Count:164 |
| 42-164 |
1125 | return QMetaType::UnknownType; executed: return QMetaType::UnknownType; Execution Count:42 | 42 |
1126 | | - |
1127 | int type = QMetaMethodPrivate::get(this)->parameterType(index); | - |
1128 | if (type != QMetaType::UnknownType) evaluated: type != QMetaType::UnknownType yes Evaluation Count:154 | yes Evaluation Count:10 |
| 10-154 |
1129 | return type; executed: return type; Execution Count:154 | 154 |
1130 | | - |
1131 | void *argv[] = { &type, &index }; | - |
1132 | mobj->static_metacall(QMetaObject::RegisterMethodArgumentMetaType, QMetaMethodPrivate::get(this)->ownMethodIndex(), argv); | - |
1133 | if (type != -1) evaluated: type != -1 yes Evaluation Count:6 | yes Evaluation Count:4 |
| 4-6 |
1134 | return type; executed: return type; Execution Count:6 | 6 |
1135 | return QMetaType::UnknownType; executed: return QMetaType::UnknownType; Execution Count:4 | 4 |
1136 | } | - |
1137 | void QMetaMethod::getParameterTypes(int *types) const | - |
1138 | { | - |
1139 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:42 |
| 0-42 |
1140 | return; | 0 |
1141 | QMetaMethodPrivate::get(this)->getParameterTypes(types); | - |
1142 | } executed: } Execution Count:42 | 42 |
1143 | | - |
1144 | | - |
1145 | | - |
1146 | | - |
1147 | | - |
1148 | | - |
1149 | QList<QByteArray> QMetaMethod::parameterTypes() const | - |
1150 | { | - |
1151 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:9731 |
| 0-9731 |
1152 | return QList<QByteArray>(); never executed: return QList<QByteArray>(); | 0 |
1153 | return QMetaMethodPrivate::get(this)->parameterTypes(); executed: return QMetaMethodPrivate::get(this)->parameterTypes(); Execution Count:9731 | 9731 |
1154 | } | - |
1155 | | - |
1156 | | - |
1157 | | - |
1158 | | - |
1159 | | - |
1160 | | - |
1161 | QList<QByteArray> QMetaMethod::parameterNames() const | - |
1162 | { | - |
1163 | QList<QByteArray> list; | - |
1164 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:1138 |
| 0-1138 |
1165 | return list; never executed: return list; | 0 |
1166 | return QMetaMethodPrivate::get(this)->parameterNames(); executed: return QMetaMethodPrivate::get(this)->parameterNames(); Execution Count:1138 | 1138 |
1167 | } | - |
1168 | | - |
1169 | | - |
1170 | | - |
1171 | | - |
1172 | | - |
1173 | | - |
1174 | | - |
1175 | const char *QMetaMethod::typeName() const | - |
1176 | { | - |
1177 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:408 |
| 0-408 |
1178 | return 0; never executed: return 0; | 0 |
1179 | return QMetaMethodPrivate::get(this)->rawReturnTypeName(); executed: return QMetaMethodPrivate::get(this)->rawReturnTypeName(); Execution Count:408 | 408 |
1180 | } | - |
1181 | const char *QMetaMethod::tag() const | - |
1182 | { | - |
1183 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:1334 |
| 0-1334 |
1184 | return 0; never executed: return 0; | 0 |
1185 | return QMetaMethodPrivate::get(this)->tag().constData(); executed: return QMetaMethodPrivate::get(this)->tag().constData(); Execution Count:1334 | 1334 |
1186 | } | - |
1187 | | - |
1188 | | - |
1189 | | - |
1190 | | - |
1191 | | - |
1192 | int QMetaMethod::attributes() const | - |
1193 | { | - |
1194 | if (!mobj) evaluated: !mobj yes Evaluation Count:3 | yes Evaluation Count:101431 |
| 3-101431 |
1195 | return false; executed: return false; Execution Count:3 | 3 |
1196 | return ((mobj->d.data[handle + 4])>>4); executed: return ((mobj->d.data[handle + 4])>>4); Execution Count:101431 | 101431 |
1197 | } | - |
1198 | | - |
1199 | | - |
1200 | | - |
1201 | | - |
1202 | | - |
1203 | | - |
1204 | int QMetaMethod::methodIndex() const | - |
1205 | { | - |
1206 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:332 |
| 0-332 |
1207 | return -1; never executed: return -1; | 0 |
1208 | return QMetaMethodPrivate::get(this)->ownMethodIndex() + mobj->methodOffset(); executed: return QMetaMethodPrivate::get(this)->ownMethodIndex() + mobj->methodOffset(); Execution Count:332 | 332 |
1209 | } | - |
1210 | | - |
1211 | | - |
1212 | | - |
1213 | | - |
1214 | | - |
1215 | | - |
1216 | | - |
1217 | int QMetaMethod::revision() const | - |
1218 | { | - |
1219 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:209 |
| 0-209 |
1220 | return 0; never executed: return 0; | 0 |
1221 | if ((QMetaMethod::Access)(mobj->d.data[handle + 4] & MethodRevisioned)) { evaluated: (QMetaMethod::Access)(mobj->d.data[handle + 4] & MethodRevisioned) yes Evaluation Count:6 | yes Evaluation Count:203 |
| 6-203 |
1222 | int offset = priv(mobj->d.data)->methodData | - |
1223 | + priv(mobj->d.data)->methodCount * 5 | - |
1224 | + QMetaMethodPrivate::get(this)->ownMethodIndex(); | - |
1225 | return mobj->d.data[offset]; executed: return mobj->d.data[offset]; Execution Count:6 | 6 |
1226 | } | - |
1227 | return 0; executed: return 0; Execution Count:203 | 203 |
1228 | } | - |
1229 | QMetaMethod::Access QMetaMethod::access() const | - |
1230 | { | - |
1231 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:14094 |
| 0-14094 |
1232 | return Private; never executed: return Private; | 0 |
1233 | return (QMetaMethod::Access)(mobj->d.data[handle + 4] & AccessMask); executed: return (QMetaMethod::Access)(mobj->d.data[handle + 4] & AccessMask); Execution Count:14094 | 14094 |
1234 | } | - |
1235 | | - |
1236 | | - |
1237 | | - |
1238 | | - |
1239 | | - |
1240 | | - |
1241 | QMetaMethod::MethodType QMetaMethod::methodType() const | - |
1242 | { | - |
1243 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:13699 |
| 0-13699 |
1244 | return QMetaMethod::Method; never executed: return QMetaMethod::Method; | 0 |
1245 | return (QMetaMethod::MethodType)((mobj->d.data[handle + 4] & MethodTypeMask)>>2); executed: return (QMetaMethod::MethodType)((mobj->d.data[handle + 4] & MethodTypeMask)>>2); Execution Count:13699 | 13699 |
1246 | } | - |
1247 | QMetaMethod QMetaMethod::fromSignalImpl(const QMetaObject *metaObject, void **signal) | - |
1248 | { | - |
1249 | int i = -1; | - |
1250 | void *args[] = { &i, signal }; | - |
1251 | QMetaMethod result; | - |
1252 | for (const QMetaObject *m = metaObject; m; m = m->d.superdata) { evaluated: m yes Evaluation Count:1503 | yes Evaluation Count:2 |
| 2-1503 |
1253 | m->static_metacall(QMetaObject::IndexOfMethod, 0, args); | - |
1254 | if (i >= 0) { evaluated: i >= 0 yes Evaluation Count:1500 | yes Evaluation Count:3 |
| 3-1500 |
1255 | result.mobj = m; | - |
1256 | result.handle = priv(m->d.data)->methodData + 5*i; | - |
1257 | break; executed: break; Execution Count:1500 | 1500 |
1258 | } | - |
1259 | } executed: } Execution Count:3 | 3 |
1260 | return result; executed: return result; Execution Count:1502 | 1502 |
1261 | } | - |
1262 | bool QMetaMethod::invoke(QObject *object, | - |
1263 | Qt::ConnectionType connectionType, | - |
1264 | QGenericReturnArgument returnValue, | - |
1265 | QGenericArgument val0, | - |
1266 | QGenericArgument val1, | - |
1267 | QGenericArgument val2, | - |
1268 | QGenericArgument val3, | - |
1269 | QGenericArgument val4, | - |
1270 | QGenericArgument val5, | - |
1271 | QGenericArgument val6, | - |
1272 | QGenericArgument val7, | - |
1273 | QGenericArgument val8, | - |
1274 | QGenericArgument val9) const | - |
1275 | { | - |
1276 | if (!object || !mobj) evaluated: !object yes Evaluation Count:2 | yes Evaluation Count:216785 |
evaluated: !mobj yes Evaluation Count:3 | yes Evaluation Count:216782 |
| 2-216785 |
1277 | return false; executed: return false; Execution Count:5 | 5 |
1278 | | - |
1279 | qt_noop(); | - |
1280 | | - |
1281 | | - |
1282 | if (returnValue.data()) { evaluated: returnValue.data() yes Evaluation Count:37 | yes Evaluation Count:216745 |
| 37-216745 |
1283 | const char *retType = typeName(); | - |
1284 | if (qstrcmp(returnValue.name(), retType) != 0) { evaluated: qstrcmp(returnValue.name(), retType) != 0 yes Evaluation Count:5 | yes Evaluation Count:32 |
| 5-32 |
1285 | | - |
1286 | QByteArray normalized = QMetaObject::normalizedType(returnValue.name()); | - |
1287 | if (qstrcmp(normalized.constData(), retType) != 0) evaluated: qstrcmp(normalized.constData(), retType) != 0 yes Evaluation Count:1 | yes Evaluation Count:4 |
| 1-4 |
1288 | return false; executed: return false; Execution Count:1 | 1 |
1289 | } executed: } Execution Count:4 | 4 |
1290 | } executed: } Execution Count:36 | 36 |
1291 | | - |
1292 | | - |
1293 | const char *typeNames[] = { | - |
1294 | returnValue.name(), | - |
1295 | val0.name(), | - |
1296 | val1.name(), | - |
1297 | val2.name(), | - |
1298 | val3.name(), | - |
1299 | val4.name(), | - |
1300 | val5.name(), | - |
1301 | val6.name(), | - |
1302 | val7.name(), | - |
1303 | val8.name(), | - |
1304 | val9.name() | - |
1305 | }; | - |
1306 | int paramCount; | - |
1307 | for (paramCount = 1; paramCount < MaximumParamCount; ++paramCount) { partially evaluated: paramCount < MaximumParamCount yes Evaluation Count:238119 | no Evaluation Count:0 |
| 0-238119 |
1308 | if (qstrlen(typeNames[paramCount]) <= 0) evaluated: qstrlen(typeNames[paramCount]) <= 0 yes Evaluation Count:216781 | yes Evaluation Count:21338 |
| 21338-216781 |
1309 | break; executed: break; Execution Count:216781 | 216781 |
1310 | } executed: } Execution Count:21338 | 21338 |
1311 | if (paramCount <= QMetaMethodPrivate::get(this)->parameterCount()) evaluated: paramCount <= QMetaMethodPrivate::get(this)->parameterCount() yes Evaluation Count:1 | yes Evaluation Count:216780 |
| 1-216780 |
1312 | return false; executed: return false; Execution Count:1 | 1 |
1313 | | - |
1314 | | - |
1315 | QThread *currentThread = QThread::currentThread(); | - |
1316 | QThread *objectThread = object->thread(); | - |
1317 | if (connectionType == Qt::AutoConnection) { evaluated: connectionType == Qt::AutoConnection yes Evaluation Count:2637 | yes Evaluation Count:214143 |
| 2637-214143 |
1318 | connectionType = currentThread == objectThread evaluated: currentThread == objectThread yes Evaluation Count:2598 | yes Evaluation Count:39 |
| 39-2598 |
1319 | ? Qt::DirectConnection | - |
1320 | : Qt::QueuedConnection; | - |
1321 | } executed: } Execution Count:2637 | 2637 |
1322 | void *param[] = { | - |
1323 | returnValue.data(), | - |
1324 | val0.data(), | - |
1325 | val1.data(), | - |
1326 | val2.data(), | - |
1327 | val3.data(), | - |
1328 | val4.data(), | - |
1329 | val5.data(), | - |
1330 | val6.data(), | - |
1331 | val7.data(), | - |
1332 | val8.data(), | - |
1333 | val9.data() | - |
1334 | }; | - |
1335 | int idx_relative = QMetaMethodPrivate::get(this)->ownMethodIndex(); | - |
1336 | int idx_offset = mobj->methodOffset(); | - |
1337 | qt_noop(); | - |
1338 | QObjectPrivate::StaticMetaCallFunction callFunction = mobj->d.static_metacall; | - |
1339 | | - |
1340 | if (connectionType == Qt::DirectConnection) { evaluated: connectionType == Qt::DirectConnection yes Evaluation Count:143065 | yes Evaluation Count:73715 |
| 73715-143065 |
1341 | if (callFunction) { evaluated: callFunction yes Evaluation Count:143049 | yes Evaluation Count:16 |
| 16-143049 |
1342 | callFunction(object, QMetaObject::InvokeMetaMethod, idx_relative, param); | - |
1343 | return true; executed: return true; Execution Count:143041 | 143041 |
1344 | } else { | - |
1345 | return QMetaObject::metacall(object, QMetaObject::InvokeMetaMethod, idx_relative + idx_offset, param) < 0; executed: return QMetaObject::metacall(object, QMetaObject::InvokeMetaMethod, idx_relative + idx_offset, param) < 0; Execution Count:16 | 16 |
1346 | } | - |
1347 | } else if (connectionType == Qt::QueuedConnection) { evaluated: connectionType == Qt::QueuedConnection yes Evaluation Count:73678 | yes Evaluation Count:37 |
| 37-73678 |
1348 | if (returnValue.data()) { evaluated: returnValue.data() yes Evaluation Count:1 | yes Evaluation Count:73677 |
| 1-73677 |
1349 | QMessageLogger("kernel/qmetaobject.cpp", 2153, __PRETTY_FUNCTION__).warning("QMetaMethod::invoke: Unable to invoke methods with return values in " | - |
1350 | "queued connections"); | - |
1351 | return false; executed: return false; Execution Count:1 | 1 |
1352 | } | - |
1353 | | - |
1354 | int nargs = 1; | - |
1355 | void **args = (void **) malloc(paramCount * sizeof(void *)); | - |
1356 | do { if (!(args)) qBadAlloc(); } while (0); never executed: qBadAlloc(); executed: } Execution Count:73677 partially evaluated: !(args) no Evaluation Count:0 | yes Evaluation Count:73677 |
partially evaluated: 0 no Evaluation Count:0 | yes Evaluation Count:73677 |
| 0-73677 |
1357 | int *types = (int *) malloc(paramCount * sizeof(int)); | - |
1358 | do { if (!(types)) qBadAlloc(); } while (0); never executed: qBadAlloc(); executed: } Execution Count:73677 partially evaluated: !(types) no Evaluation Count:0 | yes Evaluation Count:73677 |
partially evaluated: 0 no Evaluation Count:0 | yes Evaluation Count:73677 |
| 0-73677 |
1359 | types[0] = 0; | - |
1360 | args[0] = 0; | - |
1361 | | - |
1362 | for (int i = 1; i < paramCount; ++i) { evaluated: i < paramCount yes Evaluation Count:21161 | yes Evaluation Count:73676 |
| 21161-73676 |
1363 | types[i] = QMetaType::type(typeNames[i]); | - |
1364 | if (types[i] != QMetaType::UnknownType) { evaluated: types[i] != QMetaType::UnknownType yes Evaluation Count:21160 | yes Evaluation Count:1 |
| 1-21160 |
1365 | args[i] = QMetaType::create(types[i], param[i]); | - |
1366 | ++nargs; | - |
1367 | } else if (param[i]) { executed: } Execution Count:21160 partially evaluated: param[i] yes Evaluation Count:1 | no Evaluation Count:0 |
| 0-21160 |
1368 | | - |
1369 | void *argv[] = { &types[i], &i }; | - |
1370 | QMetaObject::metacall(object, QMetaObject::RegisterMethodArgumentMetaType, | - |
1371 | idx_relative + idx_offset, argv); | - |
1372 | if (types[i] == -1) { partially evaluated: types[i] == -1 yes Evaluation Count:1 | no Evaluation Count:0 |
| 0-1 |
1373 | QMessageLogger("kernel/qmetaobject.cpp", 2177, __PRETTY_FUNCTION__).warning("QMetaMethod::invoke: Unable to handle unregistered datatype '%s'", | - |
1374 | typeNames[i]); | - |
1375 | for (int x = 1; x < i; ++x) { partially evaluated: x < i no Evaluation Count:0 | yes Evaluation Count:1 |
| 0-1 |
1376 | if (types[x] && args[x]) never evaluated: types[x] | 0 |
1377 | QMetaType::destroy(types[x], args[x]); never executed: QMetaType::destroy(types[x], args[x]); | 0 |
1378 | } | 0 |
1379 | free(types); | - |
1380 | free(args); | - |
1381 | return false; executed: return false; Execution Count:1 | 1 |
1382 | } | - |
1383 | } | 0 |
1384 | } | - |
1385 | | - |
1386 | QCoreApplication::postEvent(object, new QMetaCallEvent(idx_offset, idx_relative, callFunction, | - |
1387 | 0, -1, nargs, types, args)); | - |
1388 | } else { executed: } Execution Count:73676 | 73676 |
1389 | | - |
1390 | if (currentThread == objectThread) { partially evaluated: currentThread == objectThread no Evaluation Count:0 | yes Evaluation Count:37 |
| 0-37 |
1391 | QMessageLogger("kernel/qmetaobject.cpp", 2195, __PRETTY_FUNCTION__).warning("QMetaMethod::invoke: Dead lock detected in " | - |
1392 | "BlockingQueuedConnection: Receiver is %s(%p)", | - |
1393 | mobj->className(), object); | - |
1394 | } | 0 |
1395 | | - |
1396 | QSemaphore semaphore; | - |
1397 | QCoreApplication::postEvent(object, new QMetaCallEvent(idx_offset, idx_relative, callFunction, | - |
1398 | 0, -1, 0, 0, param, &semaphore)); | - |
1399 | semaphore.acquire(); | - |
1400 | | - |
1401 | } executed: } Execution Count:37 | 37 |
1402 | return true; executed: return true; Execution Count:73713 | 73713 |
1403 | } | - |
1404 | const char *QMetaEnum::name() const | - |
1405 | { | - |
1406 | if (!mobj) evaluated: !mobj yes Evaluation Count:583 | yes Evaluation Count:365 |
| 365-583 |
1407 | return 0; executed: return 0; Execution Count:583 | 583 |
1408 | return rawStringData(mobj, mobj->d.data[handle]); executed: return rawStringData(mobj, mobj->d.data[handle]); Execution Count:365 | 365 |
1409 | } | - |
1410 | | - |
1411 | | - |
1412 | | - |
1413 | | - |
1414 | | - |
1415 | | - |
1416 | int QMetaEnum::keyCount() const | - |
1417 | { | - |
1418 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:24 |
| 0-24 |
1419 | return 0; never executed: return 0; | 0 |
1420 | return mobj->d.data[handle + 2]; executed: return mobj->d.data[handle + 2]; Execution Count:24 | 24 |
1421 | } | - |
1422 | | - |
1423 | | - |
1424 | | - |
1425 | | - |
1426 | | - |
1427 | | - |
1428 | | - |
1429 | const char *QMetaEnum::key(int index) const | - |
1430 | { | - |
1431 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:24 |
| 0-24 |
1432 | return 0; never executed: return 0; | 0 |
1433 | int count = mobj->d.data[handle + 2]; | - |
1434 | int data = mobj->d.data[handle + 3]; | - |
1435 | if (index >= 0 && index < count) partially evaluated: index >= 0 yes Evaluation Count:24 | no Evaluation Count:0 |
partially evaluated: index < count yes Evaluation Count:24 | no Evaluation Count:0 |
| 0-24 |
1436 | return rawStringData(mobj, mobj->d.data[data + 2*index]); executed: return rawStringData(mobj, mobj->d.data[data + 2*index]); Execution Count:24 | 24 |
1437 | return 0; never executed: return 0; | 0 |
1438 | } | - |
1439 | | - |
1440 | | - |
1441 | | - |
1442 | | - |
1443 | | - |
1444 | | - |
1445 | | - |
1446 | int QMetaEnum::value(int index) const | - |
1447 | { | - |
1448 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:24 |
| 0-24 |
1449 | return 0; never executed: return 0; | 0 |
1450 | int count = mobj->d.data[handle + 2]; | - |
1451 | int data = mobj->d.data[handle + 3]; | - |
1452 | if (index >= 0 && index < count) partially evaluated: index >= 0 yes Evaluation Count:24 | no Evaluation Count:0 |
partially evaluated: index < count yes Evaluation Count:24 | no Evaluation Count:0 |
| 0-24 |
1453 | return mobj->d.data[data + 2*index + 1]; executed: return mobj->d.data[data + 2*index + 1]; Execution Count:24 | 24 |
1454 | return -1; never executed: return -1; | 0 |
1455 | } | - |
1456 | bool QMetaEnum::isFlag() const | - |
1457 | { | - |
1458 | return mobj && mobj->d.data[handle + 1]; executed: return mobj && mobj->d.data[handle + 1]; Execution Count:30 | 30 |
1459 | } | - |
1460 | const char *QMetaEnum::scope() const | - |
1461 | { | - |
1462 | return mobj?rawStringData(mobj, 0) : 0; executed: return mobj?rawStringData(mobj, 0) : 0; Execution Count:34 | 34 |
1463 | } | - |
1464 | int QMetaEnum::keyToValue(const char *key, bool *ok) const | - |
1465 | { | - |
1466 | if (ok != 0) partially evaluated: ok != 0 yes Evaluation Count:12 | no Evaluation Count:0 |
| 0-12 |
1467 | *ok = false; executed: *ok = false; Execution Count:12 | 12 |
1468 | if (!mobj || !key) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:12 |
partially evaluated: !key no Evaluation Count:0 | yes Evaluation Count:12 |
| 0-12 |
1469 | return -1; never executed: return -1; | 0 |
1470 | uint scope = 0; | - |
1471 | const char *qualified_key = key; | - |
1472 | const char *s = key + qstrlen(key); | - |
1473 | while (s > key && *s != ':') evaluated: s > key yes Evaluation Count:109 | yes Evaluation Count:9 |
evaluated: *s != ':' yes Evaluation Count:106 | yes Evaluation Count:3 |
| 3-109 |
1474 | --s; executed: --s; Execution Count:106 | 106 |
1475 | if (s > key && *(s-1)==':') { evaluated: s > key yes Evaluation Count:3 | yes Evaluation Count:9 |
partially evaluated: *(s-1)==':' yes Evaluation Count:3 | no Evaluation Count:0 |
| 0-9 |
1476 | scope = s - key - 1; | - |
1477 | key += scope + 2; | - |
1478 | } executed: } Execution Count:3 | 3 |
1479 | int count = mobj->d.data[handle + 2]; | - |
1480 | int data = mobj->d.data[handle + 3]; | - |
1481 | for (int i = 0; i < count; ++i) { evaluated: i < count yes Evaluation Count:26 | yes Evaluation Count:4 |
| 4-26 |
1482 | if ((!scope || (stringSize(mobj, 0) == int(scope) && strncmp(qualified_key, rawStringData(mobj, 0), scope) == 0)) evaluated: !scope yes Evaluation Count:18 | yes Evaluation Count:8 |
evaluated: stringSize(mobj, 0) == int(scope) yes Evaluation Count:2 | yes Evaluation Count:6 |
partially evaluated: strncmp(qualified_key, rawStringData(mobj, 0), scope) == 0 yes Evaluation Count:2 | no Evaluation Count:0 |
| 0-18 |
1483 | && strcmp(key, rawStringData(mobj, mobj->d.data[data + 2*i])) == 0) { evaluated: strcmp(key, rawStringData(mobj, mobj->d.data[data + 2*i])) == 0 yes Evaluation Count:8 | yes Evaluation Count:12 |
| 8-12 |
1484 | if (ok != 0) partially evaluated: ok != 0 yes Evaluation Count:8 | no Evaluation Count:0 |
| 0-8 |
1485 | *ok = true; executed: *ok = true; Execution Count:8 | 8 |
1486 | return mobj->d.data[data + 2*i + 1]; executed: return mobj->d.data[data + 2*i + 1]; Execution Count:8 | 8 |
1487 | } | - |
1488 | } executed: } Execution Count:18 | 18 |
1489 | return -1; executed: return -1; Execution Count:4 | 4 |
1490 | } | - |
1491 | const char* QMetaEnum::valueToKey(int value) const | - |
1492 | { | - |
1493 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:1296 |
| 0-1296 |
1494 | return 0; never executed: return 0; | 0 |
1495 | int count = mobj->d.data[handle + 2]; | - |
1496 | int data = mobj->d.data[handle + 3]; | - |
1497 | for (int i = 0; i < count; ++i) partially evaluated: i < count yes Evaluation Count:4164 | no Evaluation Count:0 |
| 0-4164 |
1498 | if (value == (int)mobj->d.data[data + 2*i + 1]) evaluated: value == (int)mobj->d.data[data + 2*i + 1] yes Evaluation Count:1296 | yes Evaluation Count:2868 |
| 1296-2868 |
1499 | return rawStringData(mobj, mobj->d.data[data + 2*i]); executed: return rawStringData(mobj, mobj->d.data[data + 2*i]); Execution Count:1296 | 1296 |
1500 | return 0; never executed: return 0; | 0 |
1501 | } | - |
1502 | int QMetaEnum::keysToValue(const char *keys, bool *ok) const | - |
1503 | { | - |
1504 | if (ok != 0) partially evaluated: ok != 0 yes Evaluation Count:12 | no Evaluation Count:0 |
| 0-12 |
1505 | *ok = false; executed: *ok = false; Execution Count:12 | 12 |
1506 | if (!mobj || !keys) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:12 |
partially evaluated: !keys no Evaluation Count:0 | yes Evaluation Count:12 |
| 0-12 |
1507 | return -1; never executed: return -1; | 0 |
1508 | if (ok != 0) partially evaluated: ok != 0 yes Evaluation Count:12 | no Evaluation Count:0 |
| 0-12 |
1509 | *ok = true; executed: *ok = true; Execution Count:12 | 12 |
1510 | QStringList l = QString::fromLatin1(keys).split(QLatin1Char('|')); | - |
1511 | if (l.isEmpty()) partially evaluated: l.isEmpty() no Evaluation Count:0 | yes Evaluation Count:12 |
| 0-12 |
1512 | return 0; never executed: return 0; | 0 |
1513 | | - |
1514 | int value = 0; | - |
1515 | int count = mobj->d.data[handle + 2]; | - |
1516 | int data = mobj->d.data[handle + 3]; | - |
1517 | for (int li = 0; li < l.size(); ++li) { evaluated: li < l.size() yes Evaluation Count:19 | yes Evaluation Count:12 |
| 12-19 |
1518 | QString trimmed = l.at(li).trimmed(); | - |
1519 | QByteArray qualified_key = trimmed.toLatin1(); | - |
1520 | const char *key = qualified_key.constData(); | - |
1521 | uint scope = 0; | - |
1522 | const char *s = key + qstrlen(key); | - |
1523 | while (s > key && *s != ':') evaluated: s > key yes Evaluation Count:156 | yes Evaluation Count:7 |
evaluated: *s != ':' yes Evaluation Count:144 | yes Evaluation Count:12 |
| 7-156 |
1524 | --s; executed: --s; Execution Count:144 | 144 |
1525 | if (s > key && *(s-1)==':') { evaluated: s > key yes Evaluation Count:12 | yes Evaluation Count:7 |
partially evaluated: *(s-1)==':' yes Evaluation Count:12 | no Evaluation Count:0 |
| 0-12 |
1526 | scope = s - key - 1; | - |
1527 | key += scope + 2; | - |
1528 | } executed: } Execution Count:12 | 12 |
1529 | int i; | - |
1530 | for (i = count-1; i >= 0; --i) evaluated: i >= 0 yes Evaluation Count:48 | yes Evaluation Count:7 |
| 7-48 |
1531 | if ((!scope || (stringSize(mobj, 0) == int(scope) && strncmp(qualified_key.constData(), rawStringData(mobj, 0), scope) == 0)) evaluated: !scope yes Evaluation Count:17 | yes Evaluation Count:31 |
evaluated: stringSize(mobj, 0) == int(scope) yes Evaluation Count:13 | yes Evaluation Count:18 |
partially evaluated: strncmp(qualified_key.constData(), rawStringData(mobj, 0), scope) == 0 yes Evaluation Count:13 | no Evaluation Count:0 |
| 0-31 |
1532 | && strcmp(key, rawStringData(mobj, mobj->d.data[data + 2*i])) == 0) { evaluated: strcmp(key, rawStringData(mobj, mobj->d.data[data + 2*i])) == 0 yes Evaluation Count:12 | yes Evaluation Count:18 |
| 12-18 |
1533 | value |= mobj->d.data[data + 2*i + 1]; | - |
1534 | break; executed: break; Execution Count:12 | 12 |
1535 | } | - |
1536 | if (i < 0) { evaluated: i < 0 yes Evaluation Count:7 | yes Evaluation Count:12 |
| 7-12 |
1537 | if (ok != 0) partially evaluated: ok != 0 yes Evaluation Count:7 | no Evaluation Count:0 |
| 0-7 |
1538 | *ok = false; executed: *ok = false; Execution Count:7 | 7 |
1539 | value |= -1; | - |
1540 | } executed: } Execution Count:7 | 7 |
1541 | } executed: } Execution Count:19 | 19 |
1542 | return value; executed: return value; Execution Count:12 | 12 |
1543 | } | - |
1544 | | - |
1545 | | - |
1546 | | - |
1547 | | - |
1548 | | - |
1549 | | - |
1550 | | - |
1551 | QByteArray QMetaEnum::valueToKeys(int value) const | - |
1552 | { | - |
1553 | QByteArray keys; | - |
1554 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:1 |
| 0-1 |
1555 | return keys; never executed: return keys; | 0 |
1556 | int count = mobj->d.data[handle + 2]; | - |
1557 | int data = mobj->d.data[handle + 3]; | - |
1558 | int v = value; | - |
1559 | for(int i = 0; i < count; i++) { evaluated: i < count yes Evaluation Count:3 | yes Evaluation Count:1 |
| 1-3 |
1560 | int k = mobj->d.data[data + 2*i + 1]; | - |
1561 | if ((k != 0 && (v & k) == k ) || (k == value)) { partially evaluated: k != 0 yes Evaluation Count:3 | no Evaluation Count:0 |
evaluated: (v & k) == k yes Evaluation Count:2 | yes Evaluation Count:1 |
partially evaluated: (k == value) no Evaluation Count:0 | yes Evaluation Count:1 |
| 0-3 |
1562 | v = v & ~k; | - |
1563 | if (!keys.isEmpty()) evaluated: !keys.isEmpty() yes Evaluation Count:1 | yes Evaluation Count:1 |
| 1 |
1564 | keys += '|'; executed: keys += '|'; Execution Count:1 | 1 |
1565 | keys += stringData(mobj, mobj->d.data[data + 2*i]); | - |
1566 | } executed: } Execution Count:2 | 2 |
1567 | } executed: } Execution Count:3 | 3 |
1568 | return keys; executed: return keys; Execution Count:1 | 1 |
1569 | } | - |
1570 | | - |
1571 | static QByteArray qualifiedName(const QMetaEnum &e) | - |
1572 | { | - |
1573 | return QByteArray(e.scope()) + "::" + e.name(); executed: return QByteArray(e.scope()) + "::" + e.name(); Execution Count:24 | 24 |
1574 | } | - |
1575 | QMetaProperty::QMetaProperty() | - |
1576 | : mobj(0), handle(0), idx(0) | - |
1577 | { | - |
1578 | } executed: } Execution Count:13972 | 13972 |
1579 | | - |
1580 | | - |
1581 | | - |
1582 | | - |
1583 | | - |
1584 | | - |
1585 | | - |
1586 | const char *QMetaProperty::name() const | - |
1587 | { | - |
1588 | if (!mobj) evaluated: !mobj yes Evaluation Count:3 | yes Evaluation Count:515 |
| 3-515 |
1589 | return 0; executed: return 0; Execution Count:3 | 3 |
1590 | int handle = priv(mobj->d.data)->propertyData + 3*idx; | - |
1591 | return rawStringData(mobj, mobj->d.data[handle]); executed: return rawStringData(mobj, mobj->d.data[handle]); Execution Count:515 | 515 |
1592 | } | - |
1593 | | - |
1594 | | - |
1595 | | - |
1596 | | - |
1597 | | - |
1598 | | - |
1599 | const char *QMetaProperty::typeName() const | - |
1600 | { | - |
1601 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:102 |
| 0-102 |
1602 | return 0; never executed: return 0; | 0 |
1603 | int handle = priv(mobj->d.data)->propertyData + 3*idx; | - |
1604 | return rawTypeNameFromTypeInfo(mobj, mobj->d.data[handle + 1]); executed: return rawTypeNameFromTypeInfo(mobj, mobj->d.data[handle + 1]); Execution Count:102 | 102 |
1605 | } | - |
1606 | | - |
1607 | | - |
1608 | | - |
1609 | | - |
1610 | | - |
1611 | | - |
1612 | | - |
1613 | QVariant::Type QMetaProperty::type() const | - |
1614 | { | - |
1615 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:180 |
| 0-180 |
1616 | return QVariant::Invalid; never executed: return QVariant::Invalid; | 0 |
1617 | int handle = priv(mobj->d.data)->propertyData + 3*idx; | - |
1618 | | - |
1619 | qt_noop(); | - |
1620 | uint type = typeFromTypeInfo(mobj, mobj->d.data[handle + 1]); | - |
1621 | if (type >= QMetaType::User) evaluated: type >= QMetaType::User yes Evaluation Count:26 | yes Evaluation Count:154 |
| 26-154 |
1622 | return QVariant::UserType; executed: return QVariant::UserType; Execution Count:26 | 26 |
1623 | if (type != QMetaType::UnknownType) evaluated: type != QMetaType::UnknownType yes Evaluation Count:150 | yes Evaluation Count:4 |
| 4-150 |
1624 | return QVariant::Type(type); executed: return QVariant::Type(type); Execution Count:150 | 150 |
1625 | if (isEnumType()) { evaluated: isEnumType() yes Evaluation Count:3 | yes Evaluation Count:1 |
| 1-3 |
1626 | int enumMetaTypeId = QMetaType::type(qualifiedName(menum)); | - |
1627 | if (enumMetaTypeId == QMetaType::UnknownType) evaluated: enumMetaTypeId == QMetaType::UnknownType yes Evaluation Count:2 | yes Evaluation Count:1 |
| 1-2 |
1628 | return QVariant::Int; executed: return QVariant::Int; Execution Count:2 | 2 |
1629 | } executed: } Execution Count:1 | 1 |
1630 | | - |
1631 | | - |
1632 | | - |
1633 | | - |
1634 | | - |
1635 | | - |
1636 | return QVariant::UserType; executed: return QVariant::UserType; Execution Count:2 | 2 |
1637 | } | - |
1638 | int QMetaProperty::userType() const | - |
1639 | { | - |
1640 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:136 |
| 0-136 |
1641 | return QMetaType::UnknownType; never executed: return QMetaType::UnknownType; | 0 |
1642 | qt_noop(); | - |
1643 | int handle = priv(mobj->d.data)->propertyData + 3*idx; | - |
1644 | int type = typeFromTypeInfo(mobj, mobj->d.data[handle + 1]); | - |
1645 | if (type != QMetaType::UnknownType) evaluated: type != QMetaType::UnknownType yes Evaluation Count:134 | yes Evaluation Count:2 |
| 2-134 |
1646 | return type; executed: return type; Execution Count:134 | 134 |
1647 | if (isEnumType()) { evaluated: isEnumType() yes Evaluation Count:1 | yes Evaluation Count:1 |
| 1 |
1648 | int enumMetaTypeId = QMetaType::type(qualifiedName(menum)); | - |
1649 | if (enumMetaTypeId == QMetaType::UnknownType) partially evaluated: enumMetaTypeId == QMetaType::UnknownType no Evaluation Count:0 | yes Evaluation Count:1 |
| 0-1 |
1650 | return QVariant::Int; never executed: return QVariant::Int; | 0 |
1651 | return enumMetaTypeId; executed: return enumMetaTypeId; Execution Count:1 | 1 |
1652 | } | - |
1653 | type = QMetaType::type(typeName()); | - |
1654 | if (type != QMetaType::UnknownType) partially evaluated: type != QMetaType::UnknownType no Evaluation Count:0 | yes Evaluation Count:1 |
| 0-1 |
1655 | return type; never executed: return type; | 0 |
1656 | void *argv[] = { &type }; | - |
1657 | mobj->static_metacall(QMetaObject::RegisterPropertyMetaType, idx, argv); | - |
1658 | if (type != -1) partially evaluated: type != -1 yes Evaluation Count:1 | no Evaluation Count:0 |
| 0-1 |
1659 | return type; executed: return type; Execution Count:1 | 1 |
1660 | return QMetaType::UnknownType; never executed: return QMetaType::UnknownType; | 0 |
1661 | } | - |
1662 | | - |
1663 | | - |
1664 | | - |
1665 | | - |
1666 | | - |
1667 | | - |
1668 | int QMetaProperty::propertyIndex() const | - |
1669 | { | - |
1670 | if (!mobj) | 0 |
1671 | return -1; never executed: return -1; | 0 |
1672 | return idx + mobj->propertyOffset(); never executed: return idx + mobj->propertyOffset(); | 0 |
1673 | } | - |
1674 | bool QMetaProperty::isFlagType() const | - |
1675 | { | - |
1676 | return isEnumType() && menum.isFlag(); executed: return isEnumType() && menum.isFlag(); Execution Count:83 | 83 |
1677 | } | - |
1678 | | - |
1679 | | - |
1680 | | - |
1681 | | - |
1682 | | - |
1683 | | - |
1684 | | - |
1685 | bool QMetaProperty::isEnumType() const | - |
1686 | { | - |
1687 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:9277 |
| 0-9277 |
1688 | return false; never executed: return false; | 0 |
1689 | int handle = priv(mobj->d.data)->propertyData + 3*idx; | - |
1690 | int flags = mobj->d.data[handle + 2]; | - |
1691 | return (flags & EnumOrFlag) && menum.name(); executed: return (flags & EnumOrFlag) && menum.name(); Execution Count:9277 | 9277 |
1692 | } | - |
1693 | bool QMetaProperty::hasStdCppSet() const | - |
1694 | { | - |
1695 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:54 |
| 0-54 |
1696 | return false; never executed: return false; | 0 |
1697 | int handle = priv(mobj->d.data)->propertyData + 3*idx; | - |
1698 | int flags = mobj->d.data[handle + 2]; | - |
1699 | return (flags & StdCppSet); executed: return (flags & StdCppSet); Execution Count:54 | 54 |
1700 | } | - |
1701 | | - |
1702 | | - |
1703 | | - |
1704 | | - |
1705 | | - |
1706 | | - |
1707 | | - |
1708 | QMetaEnum QMetaProperty::enumerator() const | - |
1709 | { | - |
1710 | return menum; executed: return menum; Execution Count:1 | 1 |
1711 | } | - |
1712 | | - |
1713 | | - |
1714 | | - |
1715 | | - |
1716 | | - |
1717 | | - |
1718 | | - |
1719 | QVariant QMetaProperty::read(const QObject *object) const | - |
1720 | { | - |
1721 | if (!object || !mobj) partially evaluated: !object no Evaluation Count:0 | yes Evaluation Count:8440 |
partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:8440 |
| 0-8440 |
1722 | return QVariant(); never executed: return QVariant(); | 0 |
1723 | | - |
1724 | uint t = QVariant::Int; | - |
1725 | if (isEnumType()) { evaluated: isEnumType() yes Evaluation Count:16 | yes Evaluation Count:8424 |
| 16-8424 |
1726 | | - |
1727 | | - |
1728 | | - |
1729 | | - |
1730 | | - |
1731 | int enumMetaTypeId = QMetaType::type(qualifiedName(menum)); | - |
1732 | if (enumMetaTypeId != QMetaType::UnknownType) evaluated: enumMetaTypeId != QMetaType::UnknownType yes Evaluation Count:7 | yes Evaluation Count:9 |
| 7-9 |
1733 | t = enumMetaTypeId; executed: t = enumMetaTypeId; Execution Count:7 | 7 |
1734 | } else { executed: } Execution Count:16 | 16 |
1735 | int handle = priv(mobj->d.data)->propertyData + 3*idx; | - |
1736 | const char *typeName = 0; | - |
1737 | qt_noop(); | - |
1738 | uint typeInfo = mobj->d.data[handle + 1]; | - |
1739 | if (!(typeInfo & IsUnresolvedType)) evaluated: !(typeInfo & IsUnresolvedType) yes Evaluation Count:8398 | yes Evaluation Count:26 |
| 26-8398 |
1740 | t = typeInfo; executed: t = typeInfo; Execution Count:8398 | 8398 |
1741 | else { | - |
1742 | typeName = rawStringData(mobj, typeInfo & TypeNameIndexMask); | - |
1743 | t = QMetaType::type(typeName); | - |
1744 | } executed: } Execution Count:26 | 26 |
1745 | if (t == QMetaType::UnknownType) { partially evaluated: t == QMetaType::UnknownType no Evaluation Count:0 | yes Evaluation Count:8424 |
| 0-8424 |
1746 | | - |
1747 | int registerResult = -1; | - |
1748 | void *argv[] = { ®isterResult }; | - |
1749 | QMetaObject::metacall(const_cast<QObject*>(object), QMetaObject::RegisterPropertyMetaType, | - |
1750 | idx + mobj->propertyOffset(), argv); | - |
1751 | if (registerResult == -1) { never evaluated: registerResult == -1 | 0 |
1752 | QMessageLogger("kernel/qmetaobject.cpp", 2799, __PRETTY_FUNCTION__).warning("QMetaProperty::read: Unable to handle unregistered datatype '%s' for property '%s::%s'", typeName, mobj->className(), name()); | - |
1753 | return QVariant(); never executed: return QVariant(); | 0 |
1754 | } | - |
1755 | t = registerResult; | - |
1756 | } | 0 |
1757 | } executed: } Execution Count:8424 | 8424 |
1758 | | - |
1759 | | - |
1760 | | - |
1761 | | - |
1762 | | - |
1763 | | - |
1764 | int status = -1; | - |
1765 | QVariant value; | - |
1766 | void *argv[] = { 0, &value, &status }; | - |
1767 | if (t == QMetaType::QVariant) { evaluated: t == QMetaType::QVariant yes Evaluation Count:4 | yes Evaluation Count:8436 |
| 4-8436 |
1768 | argv[0] = &value; | - |
1769 | } else { executed: } Execution Count:4 | 4 |
1770 | value = QVariant(t, (void*)0); | - |
1771 | argv[0] = value.data(); | - |
1772 | } executed: } Execution Count:8436 | 8436 |
1773 | QMetaObject::metacall(const_cast<QObject*>(object), QMetaObject::ReadProperty, | - |
1774 | idx + mobj->propertyOffset(), argv); | - |
1775 | | - |
1776 | if (status != -1) evaluated: status != -1 yes Evaluation Count:135 | yes Evaluation Count:8305 |
| 135-8305 |
1777 | return value; executed: return value; Execution Count:135 | 135 |
1778 | if (t != QMetaType::QVariant && argv[0] != value.data()) evaluated: t != QMetaType::QVariant yes Evaluation Count:8301 | yes Evaluation Count:4 |
partially evaluated: argv[0] != value.data() no Evaluation Count:0 | yes Evaluation Count:8301 |
| 0-8301 |
1779 | | - |
1780 | return QVariant((QVariant::Type)t, argv[0]); never executed: return QVariant((QVariant::Type)t, argv[0]); | 0 |
1781 | return value; executed: return value; Execution Count:8305 | 8305 |
1782 | } | - |
1783 | | - |
1784 | | - |
1785 | | - |
1786 | | - |
1787 | | - |
1788 | | - |
1789 | | - |
1790 | bool QMetaProperty::write(QObject *object, const QVariant &value) const | - |
1791 | { | - |
1792 | if (!object || !isWritable()) partially evaluated: !object no Evaluation Count:0 | yes Evaluation Count:650 |
partially evaluated: !isWritable() no Evaluation Count:0 | yes Evaluation Count:650 |
| 0-650 |
1793 | return false; never executed: return false; | 0 |
1794 | | - |
1795 | QVariant v = value; | - |
1796 | uint t = QVariant::Invalid; | - |
1797 | if (isEnumType()) { evaluated: isEnumType() yes Evaluation Count:13 | yes Evaluation Count:637 |
| 13-637 |
1798 | if (v.type() == QVariant::String) { evaluated: v.type() == QVariant::String yes Evaluation Count:3 | yes Evaluation Count:10 |
| 3-10 |
1799 | bool ok; | - |
1800 | if (isFlagType()) partially evaluated: isFlagType() no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
1801 | v = QVariant(menum.keysToValue(value.toByteArray(), &ok)); never executed: v = QVariant(menum.keysToValue(value.toByteArray(), &ok)); | 0 |
1802 | else | - |
1803 | v = QVariant(menum.keyToValue(value.toByteArray(), &ok)); executed: v = QVariant(menum.keyToValue(value.toByteArray(), &ok)); Execution Count:3 | 3 |
1804 | if (!ok) partially evaluated: !ok no Evaluation Count:0 | yes Evaluation Count:3 |
| 0-3 |
1805 | return false; never executed: return false; | 0 |
1806 | } else if (v.type() != QVariant::Int && v.type() != QVariant::UInt) { executed: } Execution Count:3 evaluated: v.type() != QVariant::Int yes Evaluation Count:4 | yes Evaluation Count:6 |
partially evaluated: v.type() != QVariant::UInt yes Evaluation Count:4 | no Evaluation Count:0 |
| 0-6 |
1807 | int enumMetaTypeId = QMetaType::type(qualifiedName(menum)); | - |
1808 | if ((enumMetaTypeId == QMetaType::UnknownType) || (v.userType() != enumMetaTypeId) || !v.constData()) evaluated: (enumMetaTypeId == QMetaType::UnknownType) yes Evaluation Count:2 | yes Evaluation Count:2 |
evaluated: (v.userType() != enumMetaTypeId) yes Evaluation Count:1 | yes Evaluation Count:1 |
partially evaluated: !v.constData() no Evaluation Count:0 | yes Evaluation Count:1 |
| 0-2 |
1809 | return false; executed: return false; Execution Count:3 | 3 |
1810 | v = QVariant(*reinterpret_cast<const int *>(v.constData())); | - |
1811 | } executed: } Execution Count:1 | 1 |
1812 | v.convert(QVariant::Int); | - |
1813 | } else { executed: } Execution Count:10 | 10 |
1814 | int handle = priv(mobj->d.data)->propertyData + 3*idx; | - |
1815 | const char *typeName = 0; | - |
1816 | qt_noop(); | - |
1817 | uint typeInfo = mobj->d.data[handle + 1]; | - |
1818 | if (!(typeInfo & IsUnresolvedType)) evaluated: !(typeInfo & IsUnresolvedType) yes Evaluation Count:621 | yes Evaluation Count:16 |
| 16-621 |
1819 | t = typeInfo; executed: t = typeInfo; Execution Count:621 | 621 |
1820 | else { | - |
1821 | typeName = rawStringData(mobj, typeInfo & TypeNameIndexMask); | - |
1822 | t = QMetaType::type(typeName); | - |
1823 | } executed: } Execution Count:16 | 16 |
1824 | if (t == QMetaType::UnknownType) { partially evaluated: t == QMetaType::UnknownType no Evaluation Count:0 | yes Evaluation Count:637 |
| 0-637 |
1825 | qt_noop(); | - |
1826 | const char *vtypeName = value.typeName(); | - |
1827 | if (vtypeName && strcmp(typeName, vtypeName) == 0) never evaluated: vtypeName never evaluated: strcmp(typeName, vtypeName) == 0 | 0 |
1828 | t = value.userType(); never executed: t = value.userType(); | 0 |
1829 | else | - |
1830 | t = QVariant::nameToType(typeName); never executed: t = QVariant::nameToType(typeName); | 0 |
1831 | } | - |
1832 | if (t == QVariant::Invalid) partially evaluated: t == QVariant::Invalid no Evaluation Count:0 | yes Evaluation Count:637 |
| 0-637 |
1833 | return false; never executed: return false; | 0 |
1834 | if (t != QMetaType::QVariant && t != (uint)value.userType() && (t < QMetaType::User && !v.convert((QVariant::Type)t))) evaluated: t != QMetaType::QVariant yes Evaluation Count:635 | yes Evaluation Count:2 |
evaluated: t != (uint)value.userType() yes Evaluation Count:24 | yes Evaluation Count:611 |
partially evaluated: t < QMetaType::User yes Evaluation Count:24 | no Evaluation Count:0 |
evaluated: !v.convert((QVariant::Type)t) yes Evaluation Count:6 | yes Evaluation Count:18 |
| 0-635 |
1835 | return false; executed: return false; Execution Count:6 | 6 |
1836 | } executed: } Execution Count:631 | 631 |
1837 | | - |
1838 | | - |
1839 | | - |
1840 | | - |
1841 | | - |
1842 | | - |
1843 | int status = -1; | - |
1844 | | - |
1845 | | - |
1846 | int flags = 0; | - |
1847 | void *argv[] = { 0, &v, &status, &flags }; | - |
1848 | if (t == QMetaType::QVariant) evaluated: t == QMetaType::QVariant yes Evaluation Count:2 | yes Evaluation Count:639 |
| 2-639 |
1849 | argv[0] = &v; executed: argv[0] = &v; Execution Count:2 | 2 |
1850 | else | - |
1851 | argv[0] = v.data(); executed: argv[0] = v.data(); Execution Count:639 | 639 |
1852 | QMetaObject::metacall(object, QMetaObject::WriteProperty, idx + mobj->propertyOffset(), argv); | - |
1853 | return status; executed: return status; Execution Count:641 | 641 |
1854 | } | - |
1855 | bool QMetaProperty::reset(QObject *object) const | - |
1856 | { | - |
1857 | if (!object || !mobj || !isResettable()) never evaluated: !isResettable() | 0 |
1858 | return false; never executed: return false; | 0 |
1859 | void *argv[] = { 0 }; | - |
1860 | QMetaObject::metacall(object, QMetaObject::ResetProperty, idx + mobj->propertyOffset(), argv); | - |
1861 | return true; never executed: return true; | 0 |
1862 | } | - |
1863 | | - |
1864 | | - |
1865 | | - |
1866 | | - |
1867 | | - |
1868 | | - |
1869 | | - |
1870 | bool QMetaProperty::isResettable() const | - |
1871 | { | - |
1872 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:94 |
| 0-94 |
1873 | return false; never executed: return false; | 0 |
1874 | int flags = mobj->d.data[handle + 2]; | - |
1875 | return flags & Resettable; executed: return flags & Resettable; Execution Count:94 | 94 |
1876 | } | - |
1877 | | - |
1878 | | - |
1879 | | - |
1880 | | - |
1881 | | - |
1882 | | - |
1883 | bool QMetaProperty::isReadable() const | - |
1884 | { | - |
1885 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:183 |
| 0-183 |
1886 | return false; never executed: return false; | 0 |
1887 | int flags = mobj->d.data[handle + 2]; | - |
1888 | return flags & Readable; executed: return flags & Readable; Execution Count:183 | 183 |
1889 | } | - |
1890 | | - |
1891 | | - |
1892 | | - |
1893 | | - |
1894 | | - |
1895 | | - |
1896 | | - |
1897 | bool QMetaProperty::hasNotifySignal() const | - |
1898 | { | - |
1899 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:96 |
| 0-96 |
1900 | return false; never executed: return false; | 0 |
1901 | int flags = mobj->d.data[handle + 2]; | - |
1902 | return flags & Notify; executed: return flags & Notify; Execution Count:96 | 96 |
1903 | } | - |
1904 | QMetaMethod QMetaProperty::notifySignal() const | - |
1905 | { | - |
1906 | int id = notifySignalIndex(); | - |
1907 | if (id != -1) evaluated: id != -1 yes Evaluation Count:6 | yes Evaluation Count:2 |
| 2-6 |
1908 | return mobj->method(id); executed: return mobj->method(id); Execution Count:6 | 6 |
1909 | else | - |
1910 | return QMetaMethod(); executed: return QMetaMethod(); Execution Count:2 | 2 |
1911 | } | - |
1912 | int QMetaProperty::notifySignalIndex() const | - |
1913 | { | - |
1914 | if (hasNotifySignal()) { evaluated: hasNotifySignal() yes Evaluation Count:22 | yes Evaluation Count:2 |
| 2-22 |
1915 | int offset = priv(mobj->d.data)->propertyData + | - |
1916 | priv(mobj->d.data)->propertyCount * 3 + idx; | - |
1917 | return mobj->d.data[offset] + mobj->methodOffset(); executed: return mobj->d.data[offset] + mobj->methodOffset(); Execution Count:22 | 22 |
1918 | } else { | - |
1919 | return -1; executed: return -1; Execution Count:2 | 2 |
1920 | } | - |
1921 | } | - |
1922 | | - |
1923 | | - |
1924 | | - |
1925 | | - |
1926 | | - |
1927 | | - |
1928 | | - |
1929 | int QMetaProperty::revision() const | - |
1930 | { | - |
1931 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:50 |
| 0-50 |
1932 | return 0; never executed: return 0; | 0 |
1933 | int flags = mobj->d.data[handle + 2]; | - |
1934 | if (flags & Revisioned) { evaluated: flags & Revisioned yes Evaluation Count:6 | yes Evaluation Count:44 |
| 6-44 |
1935 | int offset = priv(mobj->d.data)->propertyData + | - |
1936 | priv(mobj->d.data)->propertyCount * 3 + idx; | - |
1937 | | - |
1938 | | - |
1939 | for (int i = 0; i < priv(mobj->d.data)->propertyCount; ++i) { partially evaluated: i < priv(mobj->d.data)->propertyCount yes Evaluation Count:6 | no Evaluation Count:0 |
| 0-6 |
1940 | int handle = priv(mobj->d.data)->propertyData + 3*i; | - |
1941 | if (mobj->d.data[handle + 2] & Notify) { partially evaluated: mobj->d.data[handle + 2] & Notify yes Evaluation Count:6 | no Evaluation Count:0 |
| 0-6 |
1942 | offset += priv(mobj->d.data)->propertyCount; | - |
1943 | break; executed: break; Execution Count:6 | 6 |
1944 | } | - |
1945 | } | 0 |
1946 | return mobj->d.data[offset]; executed: return mobj->d.data[offset]; Execution Count:6 | 6 |
1947 | } else { | - |
1948 | return 0; executed: return 0; Execution Count:44 | 44 |
1949 | } | - |
1950 | } | - |
1951 | | - |
1952 | | - |
1953 | | - |
1954 | | - |
1955 | | - |
1956 | | - |
1957 | | - |
1958 | bool QMetaProperty::isWritable() const | - |
1959 | { | - |
1960 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:1517 |
| 0-1517 |
1961 | return false; never executed: return false; | 0 |
1962 | int flags = mobj->d.data[handle + 2]; | - |
1963 | return flags & Writable; executed: return flags & Writable; Execution Count:1517 | 1517 |
1964 | } | - |
1965 | bool QMetaProperty::isDesignable(const QObject *object) const | - |
1966 | { | - |
1967 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:94 |
| 0-94 |
1968 | return false; never executed: return false; | 0 |
1969 | int flags = mobj->d.data[handle + 2]; | - |
1970 | bool b = flags & Designable; | - |
1971 | if (object) { partially evaluated: object no Evaluation Count:0 | yes Evaluation Count:94 |
| 0-94 |
1972 | void *argv[] = { &b }; | - |
1973 | QMetaObject::metacall(const_cast<QObject*>(object), QMetaObject::QueryPropertyDesignable, | - |
1974 | idx + mobj->propertyOffset(), argv); | - |
1975 | } | 0 |
1976 | return b; executed: return b; Execution Count:94 | 94 |
1977 | | - |
1978 | | - |
1979 | } | - |
1980 | bool QMetaProperty::isScriptable(const QObject *object) const | - |
1981 | { | - |
1982 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:179 |
| 0-179 |
1983 | return false; never executed: return false; | 0 |
1984 | int flags = mobj->d.data[handle + 2]; | - |
1985 | bool b = flags & Scriptable; | - |
1986 | if (object) { partially evaluated: object no Evaluation Count:0 | yes Evaluation Count:179 |
| 0-179 |
1987 | void *argv[] = { &b }; | - |
1988 | QMetaObject::metacall(const_cast<QObject*>(object), QMetaObject::QueryPropertyScriptable, | - |
1989 | idx + mobj->propertyOffset(), argv); | - |
1990 | } | 0 |
1991 | return b; executed: return b; Execution Count:179 | 179 |
1992 | } | - |
1993 | bool QMetaProperty::isStored(const QObject *object) const | - |
1994 | { | - |
1995 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:94 |
| 0-94 |
1996 | return false; never executed: return false; | 0 |
1997 | int flags = mobj->d.data[handle + 2]; | - |
1998 | bool b = flags & Stored; | - |
1999 | if (object) { partially evaluated: object no Evaluation Count:0 | yes Evaluation Count:94 |
| 0-94 |
2000 | void *argv[] = { &b }; | - |
2001 | QMetaObject::metacall(const_cast<QObject*>(object), QMetaObject::QueryPropertyStored, | - |
2002 | idx + mobj->propertyOffset(), argv); | - |
2003 | } | 0 |
2004 | return b; executed: return b; Execution Count:94 | 94 |
2005 | } | - |
2006 | bool QMetaProperty::isUser(const QObject *object) const | - |
2007 | { | - |
2008 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:3928 |
| 0-3928 |
2009 | return false; never executed: return false; | 0 |
2010 | int flags = mobj->d.data[handle + 2]; | - |
2011 | bool b = flags & User; | - |
2012 | if (object) { partially evaluated: object no Evaluation Count:0 | yes Evaluation Count:3928 |
| 0-3928 |
2013 | void *argv[] = { &b }; | - |
2014 | QMetaObject::metacall(const_cast<QObject*>(object), QMetaObject::QueryPropertyUser, | - |
2015 | idx + mobj->propertyOffset(), argv); | - |
2016 | } | 0 |
2017 | return b; executed: return b; Execution Count:3928 | 3928 |
2018 | } | - |
2019 | bool QMetaProperty::isConstant() const | - |
2020 | { | - |
2021 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:18 |
| 0-18 |
2022 | return false; never executed: return false; | 0 |
2023 | int flags = mobj->d.data[handle + 2]; | - |
2024 | return flags & Constant; executed: return flags & Constant; Execution Count:18 | 18 |
2025 | } | - |
2026 | bool QMetaProperty::isFinal() const | - |
2027 | { | - |
2028 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:18 |
| 0-18 |
2029 | return false; never executed: return false; | 0 |
2030 | int flags = mobj->d.data[handle + 2]; | - |
2031 | return flags & Final; executed: return flags & Final; Execution Count:18 | 18 |
2032 | } | - |
2033 | bool QMetaProperty::isEditable(const QObject *object) const | - |
2034 | { | - |
2035 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:94 |
| 0-94 |
2036 | return false; never executed: return false; | 0 |
2037 | int flags = mobj->d.data[handle + 2]; | - |
2038 | bool b = flags & Editable; | - |
2039 | if (object) { partially evaluated: object no Evaluation Count:0 | yes Evaluation Count:94 |
| 0-94 |
2040 | void *argv[] = { &b }; | - |
2041 | QMetaObject::metacall(const_cast<QObject*>(object), QMetaObject::QueryPropertyEditable, | - |
2042 | idx + mobj->propertyOffset(), argv); | - |
2043 | } | 0 |
2044 | return b; executed: return b; Execution Count:94 | 94 |
2045 | } | - |
2046 | const char *QMetaClassInfo::name() const | - |
2047 | { | - |
2048 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:12 |
| 0-12 |
2049 | return 0; never executed: return 0; | 0 |
2050 | return rawStringData(mobj, mobj->d.data[handle]); executed: return rawStringData(mobj, mobj->d.data[handle]); Execution Count:12 | 12 |
2051 | } | - |
2052 | | - |
2053 | | - |
2054 | | - |
2055 | | - |
2056 | | - |
2057 | | - |
2058 | const char* QMetaClassInfo::value() const | - |
2059 | { | - |
2060 | if (!mobj) partially evaluated: !mobj no Evaluation Count:0 | yes Evaluation Count:602 |
| 0-602 |
2061 | return 0; never executed: return 0; | 0 |
2062 | return rawStringData(mobj, mobj->d.data[handle + 1]); executed: return rawStringData(mobj, mobj->d.data[handle + 1]); Execution Count:602 | 602 |
2063 | } | - |
2064 | int QMetaObjectPrivate::originalClone(const QMetaObject *mobj, int local_method_index) | - |
2065 | { | - |
2066 | qt_noop(); | - |
2067 | int handle = get(mobj)->methodData + 5 * local_method_index; | - |
2068 | while (mobj->d.data[handle + 4] & MethodCloned) { evaluated: mobj->d.data[handle + 4] & MethodCloned yes Evaluation Count:45701 | yes Evaluation Count:615266 |
| 45701-615266 |
2069 | qt_noop(); | - |
2070 | handle -= 5; | - |
2071 | local_method_index--; | - |
2072 | } executed: } Execution Count:45701 | 45701 |
2073 | return local_method_index; executed: return local_method_index; Execution Count:615268 | 615268 |
2074 | } | - |
2075 | | - |
2076 | | - |
2077 | | - |
2078 | | - |
2079 | | - |
2080 | | - |
2081 | QList<QByteArray> QMetaObjectPrivate::parameterTypeNamesFromSignature(const char *signature) | - |
2082 | { | - |
2083 | QList<QByteArray> list; | - |
2084 | while (*signature && *signature != '(') partially evaluated: *signature yes Evaluation Count:8944 | no Evaluation Count:0 |
evaluated: *signature != '(' yes Evaluation Count:8223 | yes Evaluation Count:721 |
| 0-8944 |
2085 | ++signature; executed: ++signature; Execution Count:8223 | 8223 |
2086 | while (*signature && *signature != ')' && *++signature != ')') { partially evaluated: *signature yes Evaluation Count:1251 | no Evaluation Count:0 |
evaluated: *signature != ')' yes Evaluation Count:849 | yes Evaluation Count:402 |
evaluated: *++signature != ')' yes Evaluation Count:530 | yes Evaluation Count:319 |
| 0-1251 |
2087 | const char *begin = signature; | - |
2088 | int level = 0; | - |
2089 | while (*signature && (level > 0 || *signature != ',') && *signature != ')') { partially evaluated: *signature yes Evaluation Count:3314 | no Evaluation Count:0 |
partially evaluated: level > 0 no Evaluation Count:0 | yes Evaluation Count:3314 |
evaluated: *signature != ',' yes Evaluation Count:3186 | yes Evaluation Count:128 |
evaluated: *signature != ')' yes Evaluation Count:2784 | yes Evaluation Count:402 |
| 0-3314 |
2090 | if (*signature == '<') partially evaluated: *signature == '<' no Evaluation Count:0 | yes Evaluation Count:2784 |
| 0-2784 |
2091 | ++level; | 0 |
2092 | else if (*signature == '>') partially evaluated: *signature == '>' no Evaluation Count:0 | yes Evaluation Count:2784 |
| 0-2784 |
2093 | --level; | 0 |
2094 | ++signature; | - |
2095 | } executed: } Execution Count:2784 | 2784 |
2096 | list += QByteArray(begin, signature - begin); | - |
2097 | } executed: } Execution Count:530 | 530 |
2098 | return list; executed: return list; Execution Count:721 | 721 |
2099 | } | - |
2100 | | - |
2101 | | - |
2102 | | - |
| | |