kernel/qobject.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4 -
5 -
6 -
7 -
8 -
9 -
10static int DIRECT_CONNECTION_ONLY = 0; -
11 -
12struct QSlotObjectBaseDeleter { -
13 static void cleanup(QtPrivate::QSlotObjectBase *slot) { -
14 if (slot) slot->destroyIfLastRef();
executed: slot->destroyIfLastRef();
Execution Count:372
partially evaluated: slot
TRUEFALSE
yes
Evaluation Count:372
no
Evaluation Count:0
0-372
15 }
executed: }
Execution Count:372
372
16}; -
17static int *queuedConnectionTypes(const QList<QByteArray> &typeNames) -
18{ -
19 int *types = new int [typeNames.count() + 1]; -
20 do { if (!(types)) qBadAlloc(); } while (0);
never executed: qBadAlloc();
executed: }
Execution Count:1780
partially evaluated: !(types)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1780
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1780
0-1780
21 for (int i = 0; i < typeNames.count(); ++i) {
evaluated: i < typeNames.count()
TRUEFALSE
yes
Evaluation Count:1384
yes
Evaluation Count:1780
1384-1780
22 const QByteArray typeName = typeNames.at(i); -
23 if (typeName.endsWith('*'))
partially evaluated: typeName.endsWith('*')
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1384
0-1384
24 types[i] = QMetaType::VoidStar;
never executed: types[i] = QMetaType::VoidStar;
0
25 else -
26 types[i] = QMetaType::type(typeName);
executed: types[i] = QMetaType::type(typeName);
Execution Count:1384
1384
27 -
28 if (!types[i]) {
partially evaluated: !types[i]
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1384
0-1384
29 QMessageLogger("kernel/qobject.cpp", 92, __PRETTY_FUNCTION__).warning("QObject::connect: Cannot queue arguments of type '%s'\n" -
30 "(Make sure '%s' is registered using qRegisterMetaType().)", -
31 typeName.constData(), typeName.constData()); -
32 delete [] types; -
33 return 0;
never executed: return 0;
0
34 } -
35 }
executed: }
Execution Count:1384
1384
36 types[typeNames.count()] = 0; -
37 -
38 return types;
executed: return types;
Execution Count:1780
1780
39} -
40 -
41static int *queuedConnectionTypes(const QArgumentType *argumentTypes, int argc) -
42{ -
43 QScopedArrayPointer<int> types(new int [argc + 1]); -
44 for (int i = 0; i < argc; ++i) {
evaluated: i < argc
TRUEFALSE
yes
Evaluation Count:34165
yes
Evaluation Count:21073
21073-34165
45 const QArgumentType &type = argumentTypes[i]; -
46 if (type.type())
evaluated: type.type()
TRUEFALSE
yes
Evaluation Count:34164
yes
Evaluation Count:1
1-34164
47 types[i] = type.type();
executed: types[i] = type.type();
Execution Count:34164
34164
48 else if (type.name().endsWith('*'))
partially evaluated: type.name().endsWith('*')
TRUEFALSE
yes
Evaluation Count:1
no
Evaluation Count:0
0-1
49 types[i] = QMetaType::VoidStar;
executed: types[i] = QMetaType::VoidStar;
Execution Count:1
1
50 else -
51 types[i] = QMetaType::type(type.name());
never executed: types[i] = QMetaType::type(type.name());
0
52 -
53 if (!types[i]) {
partially evaluated: !types[i]
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:34165
0-34165
54 QMessageLogger("kernel/qobject.cpp", 117, __PRETTY_FUNCTION__).warning("QObject::connect: Cannot queue arguments of type '%s'\n" -
55 "(Make sure '%s' is registered using qRegisterMetaType().)", -
56 type.name().constData(), type.name().constData()); -
57 return 0;
never executed: return 0;
0
58 } -
59 }
executed: }
Execution Count:34165
34165
60 types[argc] = 0; -
61 -
62 return types.take();
executed: return types.take();
Execution Count:21073
21073
63} -
64 -
65static QBasicMutex _q_ObjectMutexPool[131]; -
66 -
67 -
68 -
69 -
70 -
71static inline QMutex *signalSlotLock(const QObject *o) -
72{ -
73 return static_cast<QMutex *>(&_q_ObjectMutexPool[ 9395226
74 uint(quintptr(o)) % sizeof(_q_ObjectMutexPool)/sizeof(QBasicMutex)]);
executed: return static_cast<QMutex *>(&_q_ObjectMutexPool[ uint(quintptr(o)) % sizeof(_q_ObjectMutexPool)/sizeof(QBasicMutex)]);
Execution Count:9395226
9395226
75} -
76 -
77extern "C" __attribute__((visibility("default"))) void qt_addObject(QObject *) -
78{} -
79 -
80extern "C" __attribute__((visibility("default"))) void qt_removeObject(QObject *) -
81{} -
82 -
83struct QConnectionSenderSwitcher { -
84 QObject *receiver; -
85 QObjectPrivate::Sender *previousSender; -
86 QObjectPrivate::Sender currentSender; -
87 bool switched; -
88 -
89 inline QConnectionSenderSwitcher() : switched(false) {}
executed: }
Execution Count:8326818
8326818
90 -
91 inline QConnectionSenderSwitcher(QObject *receiver, QObject *sender, int signal_absolute_id) -
92 { -
93 switchSender(receiver, sender, signal_absolute_id); -
94 }
executed: }
Execution Count:91586
91586
95 -
96 inline void switchSender(QObject *receiver, QObject *sender, int signal_absolute_id) -
97 { -
98 this->receiver = receiver; -
99 currentSender.sender = sender; -
100 currentSender.signal = signal_absolute_id; -
101 currentSender.ref = 1; -
102 previousSender = QObjectPrivate::setCurrentSender(receiver, &currentSender); -
103 switched = true; -
104 }
executed: }
Execution Count:8418280
8418280
105 -
106 inline ~QConnectionSenderSwitcher() -
107 { -
108 if (switched)
evaluated: switched
TRUEFALSE
yes
Evaluation Count:8418322
yes
Evaluation Count:105
105-8418322
109 QObjectPrivate::resetCurrentSender(receiver, &currentSender, previousSender);
executed: QObjectPrivate::resetCurrentSender(receiver, &currentSender, previousSender);
Execution Count:8418322
8418322
110 }
executed: }
Execution Count:8418426
8418426
111private: -
112 QConnectionSenderSwitcher(const QConnectionSenderSwitcher &) = delete; QConnectionSenderSwitcher &operator=(const QConnectionSenderSwitcher &) = delete; -
113}; -
114 -
115 -
116void (*QAbstractDeclarativeData::destroyed)(QAbstractDeclarativeData *, QObject *) = 0; -
117void (*QAbstractDeclarativeData::parentChanged)(QAbstractDeclarativeData *, QObject *, QObject *) = 0; -
118void (*QAbstractDeclarativeData::signalEmitted)(QAbstractDeclarativeData *, QObject *, int, void **) = 0; -
119int (*QAbstractDeclarativeData::receivers)(QAbstractDeclarativeData *, const QObject *, int) = 0; -
120bool (*QAbstractDeclarativeData::isSignalConnected)(QAbstractDeclarativeData *, const QObject *, int) = 0; -
121 -
122QObjectData::~QObjectData() {} -
123 -
124QMetaObject *QObjectData::dynamicMetaObject() const -
125{ -
126 return metaObject->toDynamicMetaObject(q_ptr);
never executed: return metaObject->toDynamicMetaObject(q_ptr);
0
127} -
128 -
129QObjectPrivate::QObjectPrivate(int version) -
130 : threadData(0), connectionLists(0), senders(0), currentSender(0), currentChildBeingDeleted(0) -
131{ -
132 if (version != QObjectPrivateVersion)
partially evaluated: version != QObjectPrivateVersion
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:3600974
0-3600974
133 QMessageLogger("kernel/qobject.cpp", 196, __PRETTY_FUNCTION__).fatal("Cannot mix incompatible Qt library (version 0x%x) with this library (version 0x%x)", 0
134 version, QObjectPrivateVersion);
never executed: QMessageLogger("kernel/qobject.cpp", 196, __PRETTY_FUNCTION__).fatal("Cannot mix incompatible Qt library (version 0x%x) with this library (version 0x%x)", version, QObjectPrivateVersion);
0
135 -
136 -
137 q_ptr = 0; -
138 parent = 0; -
139 isWidget = false; -
140 blockSig = false; -
141 wasDeleted = false; -
142 isDeletingChildren = false; -
143 sendChildEvents = true; -
144 receiveChildEvents = true; -
145 postedEvents = 0; -
146 extraData = 0; -
147 connectedSignals[0] = connectedSignals[1] = 0; -
148 metaObject = 0; -
149 isWindow = false; -
150}
executed: }
Execution Count:3600979
3600979
151 -
152QObjectPrivate::~QObjectPrivate() -
153{ -
154 if (extraData && !extraData->runningTimers.isEmpty()) {
evaluated: extraData
TRUEFALSE
yes
Evaluation Count:56772
yes
Evaluation Count:3541668
evaluated: !extraData->runningTimers.isEmpty()
TRUEFALSE
yes
Evaluation Count:1245
yes
Evaluation Count:55527
1245-3541668
155 -
156 if (threadData->eventDispatcher)
evaluated: threadData->eventDispatcher
TRUEFALSE
yes
Evaluation Count:1177
yes
Evaluation Count:68
68-1177
157 threadData->eventDispatcher->unregisterTimers(q_ptr);
executed: threadData->eventDispatcher->unregisterTimers(q_ptr);
Execution Count:1177
1177
158 -
159 -
160 for (int i = 0; i < extraData->runningTimers.size(); ++i)
evaluated: i < extraData->runningTimers.size()
TRUEFALSE
yes
Evaluation Count:1294
yes
Evaluation Count:1245
1245-1294
161 QAbstractEventDispatcherPrivate::releaseTimerId(extraData->runningTimers.at(i));
executed: QAbstractEventDispatcherPrivate::releaseTimerId(extraData->runningTimers.at(i));
Execution Count:1294
1294
162 }
executed: }
Execution Count:1245
1245
163 -
164 if (postedEvents)
evaluated: postedEvents
TRUEFALSE
yes
Evaluation Count:7312
yes
Evaluation Count:3591124
7312-3591124
165 QCoreApplication::removePostedEvents(q_ptr, 0);
executed: QCoreApplication::removePostedEvents(q_ptr, 0);
Execution Count:7312
7312
166 -
167 threadData->deref(); -
168 -
169 if (metaObject) metaObject->objectDestroyed(q_ptr);
never executed: metaObject->objectDestroyed(q_ptr);
partially evaluated: metaObject
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:3598488
0-3598488
170 -
171 -
172 if (extraData)
evaluated: extraData
TRUEFALSE
yes
Evaluation Count:56772
yes
Evaluation Count:3541742
56772-3541742
173 qDeleteAll(extraData->userData);
executed: qDeleteAll(extraData->userData);
Execution Count:56772
56772
174 -
175 delete extraData; -
176}
executed: }
Execution Count:3598481
3598481
177 -
178 -
179 -
180 -
181 -
182static void computeOffsets(const QMetaObject *metaobject, int *signalOffset, int *methodOffset) -
183{ -
184 *signalOffset = *methodOffset = 0; -
185 const QMetaObject *m = metaobject->d.superdata; -
186 while (m) {
evaluated: m
TRUEFALSE
yes
Evaluation Count:10003
yes
Evaluation Count:207552
10003-207552
187 const QMetaObjectPrivate *d = QMetaObjectPrivate::get(m); -
188 *methodOffset += d->methodCount; -
189 qt_noop(); -
190 *signalOffset += d->signalCount; -
191 m = m->d.superdata; -
192 }
executed: }
Execution Count:10003
10003
193}
executed: }
Execution Count:207552
207552
194class QObjectConnectionListVector : public QVector<QObjectPrivate::ConnectionList> -
195{ -
196public: -
197 bool orphaned; -
198 bool dirty; -
199 int inUse; -
200 QObjectPrivate::ConnectionList allsignals; -
201 -
202 QObjectConnectionListVector() -
203 : QVector<QObjectPrivate::ConnectionList>(), orphaned(false), dirty(false), inUse(0) -
204 { }
executed: }
Execution Count:78776
78776
205 -
206 QObjectPrivate::ConnectionList &operator[](int at) -
207 { -
208 if (at < 0)
evaluated: at < 0
TRUEFALSE
yes
Evaluation Count:185723
yes
Evaluation Count:1584227
185723-1584227
209 return allsignals;
executed: return allsignals;
Execution Count:185723
185723
210 return QVector<QObjectPrivate::ConnectionList>::operator[](at);
executed: return QVector<QObjectPrivate::ConnectionList>::operator[](at);
Execution Count:1584227
1584227
211 } -
212}; -
213 -
214 -
215bool QObjectPrivate::isSender(const QObject *receiver, const char *signal) const -
216{ -
217 const QObject * const q = q_func(); -
218 int signal_index = signalIndex(signal); -
219 if (signal_index < 0)
never evaluated: signal_index < 0
0
220 return false;
never executed: return false;
0
221 QMutexLocker locker(signalSlotLock(q)); -
222 if (connectionLists) {
never evaluated: connectionLists
0
223 if (signal_index < connectionLists->count()) {
never evaluated: signal_index < connectionLists->count()
0
224 const QObjectPrivate::Connection *c = -
225 connectionLists->at(signal_index).first; -
226 -
227 while (c) {
never evaluated: c
0
228 if (c->receiver == receiver)
never evaluated: c->receiver == receiver
0
229 return true;
never executed: return true;
0
230 c = c->nextConnectionList; -
231 }
never executed: }
0
232 }
never executed: }
0
233 }
never executed: }
0
234 return false;
never executed: return false;
0
235} -
236 -
237 -
238QObjectList QObjectPrivate::receiverList(const char *signal) const -
239{ -
240 const QObject * const q = q_func(); -
241 QObjectList returnValue; -
242 int signal_index = signalIndex(signal); -
243 if (signal_index < 0)
partially evaluated: signal_index < 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1
0-1
244 return returnValue;
never executed: return returnValue;
0
245 QMutexLocker locker(signalSlotLock(q)); -
246 if (connectionLists) {
partially evaluated: connectionLists
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1
0-1
247 if (signal_index < connectionLists->count()) {
never evaluated: signal_index < connectionLists->count()
0
248 const QObjectPrivate::Connection *c = connectionLists->at(signal_index).first; -
249 -
250 while (c) {
never evaluated: c
0
251 if (c->receiver)
never evaluated: c->receiver
0
252 returnValue << c->receiver;
never executed: returnValue << c->receiver;
0
253 c = c->nextConnectionList; -
254 }
never executed: }
0
255 }
never executed: }
0
256 }
never executed: }
0
257 return returnValue;
executed: return returnValue;
Execution Count:1
1
258} -
259 -
260 -
261QObjectList QObjectPrivate::senderList() const -
262{ -
263 QObjectList returnValue; -
264 QMutexLocker locker(signalSlotLock(q_func())); -
265 for (Connection *c = senders; c; c = c->next)
never evaluated: c
0
266 returnValue << c->sender;
never executed: returnValue << c->sender;
0
267 return returnValue;
never executed: return returnValue;
0
268} -
269void QObjectPrivate::addConnection(int signal, Connection *c) -
270{ -
271 qt_noop(); -
272 if (!connectionLists)
evaluated: !connectionLists
TRUEFALSE
yes
Evaluation Count:78776
yes
Evaluation Count:411538
78776-411538
273 connectionLists = new QObjectConnectionListVector();
executed: connectionLists = new QObjectConnectionListVector();
Execution Count:78776
78776
274 if (signal >= connectionLists->count())
evaluated: signal >= connectionLists->count()
TRUEFALSE
yes
Evaluation Count:160428
yes
Evaluation Count:329886
160428-329886
275 connectionLists->resize(signal + 1);
executed: connectionLists->resize(signal + 1);
Execution Count:160429
160429
276 -
277 ConnectionList &connectionList = (*connectionLists)[signal]; -
278 if (connectionList.last) {
evaluated: connectionList.last
TRUEFALSE
yes
Evaluation Count:263399
yes
Evaluation Count:226915
226915-263399
279 connectionList.last->nextConnectionList = c; -
280 } else {
executed: }
Execution Count:263399
263399
281 connectionList.first = c; -
282 }
executed: }
Execution Count:226913
226913
283 connectionList.last = c; -
284 -
285 cleanConnectionLists(); -
286 -
287 c->prev = &(QObjectPrivate::get(c->receiver)->senders); -
288 c->next = *c->prev; -
289 *c->prev = c; -
290 if (c->next)
evaluated: c->next
TRUEFALSE
yes
Evaluation Count:311936
yes
Evaluation Count:178370
178370-311936
291 c->next->prev = &c->next;
executed: c->next->prev = &c->next;
Execution Count:311936
311936
292 -
293 if (signal < 0) {
evaluated: signal < 0
TRUEFALSE
yes
Evaluation Count:133
yes
Evaluation Count:490170
133-490170
294 connectedSignals[0] = connectedSignals[1] = ~0; -
295 } else if (signal < (int)sizeof(connectedSignals) * 8) {
evaluated: signal < (int)sizeof(connectedSignals) * 8
TRUEFALSE
yes
Evaluation Count:490168
yes
Evaluation Count:2
executed: }
Execution Count:133
2-490168
296 connectedSignals[signal >> 5] |= (1 << (signal & 0x1f)); -
297 }
executed: }
Execution Count:490166
490166
298} -
299 -
300void QObjectPrivate::cleanConnectionLists() -
301{ -
302 if (connectionLists->dirty && !connectionLists->inUse) {
evaluated: connectionLists->dirty
TRUEFALSE
yes
Evaluation Count:107265
yes
Evaluation Count:383042
evaluated: !connectionLists->inUse
TRUEFALSE
yes
Evaluation Count:107068
yes
Evaluation Count:197
197-383042
303 -
304 for (int signal = -1; signal < connectionLists->count(); ++signal) {
evaluated: signal < connectionLists->count()
TRUEFALSE
yes
Evaluation Count:466611
yes
Evaluation Count:107068
107068-466611
305 QObjectPrivate::ConnectionList &connectionList = -
306 (*connectionLists)[signal]; -
307 -
308 -
309 -
310 -
311 QObjectPrivate::Connection *last = 0; -
312 -
313 QObjectPrivate::Connection **prev = &connectionList.first; -
314 QObjectPrivate::Connection *c = *prev; -
315 while (c) {
evaluated: c
TRUEFALSE
yes
Evaluation Count:315870
yes
Evaluation Count:466611
315870-466611
316 if (c->receiver) {
evaluated: c->receiver
TRUEFALSE
yes
Evaluation Count:180581
yes
Evaluation Count:135289
135289-180581
317 last = c; -
318 prev = &c->nextConnectionList; -
319 c = *prev; -
320 } else {
executed: }
Execution Count:180581
180581
321 QObjectPrivate::Connection *next = c->nextConnectionList; -
322 *prev = next; -
323 c->deref(); -
324 c = next; -
325 }
executed: }
Execution Count:135289
135289
326 } -
327 -
328 -
329 -
330 connectionList.last = last; -
331 }
executed: }
Execution Count:466611
466611
332 connectionLists->dirty = false; -
333 }
executed: }
Execution Count:107068
107068
334}
executed: }
Execution Count:490305
490305
335 -
336 -
337 -
338 -
339QMetaCallEvent::QMetaCallEvent(ushort method_offset, ushort method_relative, QObjectPrivate::StaticMetaCallFunction callFunction, -
340 const QObject *sender, int signalId, -
341 int nargs, int *types, void **args, QSemaphore *semaphore) -
342 : QEvent(MetaCall), slotObj_(0), sender_(sender), signalId_(signalId), -
343 nargs_(nargs), types_(types), args_(args), semaphore_(semaphore), -
344 callFunction_(callFunction), method_offset_(method_offset), method_relative_(method_relative) -
345{ }
executed: }
Execution Count:99311
99311
346 -
347 -
348 -
349 -
350QMetaCallEvent::QMetaCallEvent(QtPrivate::QSlotObjectBase *slotO, const QObject *sender, int signalId, -
351 int nargs, int *types, void **args, QSemaphore *semaphore) -
352 : QEvent(MetaCall), slotObj_(slotO), sender_(sender), signalId_(signalId), -
353 nargs_(nargs), types_(types), args_(args), semaphore_(semaphore), -
354 callFunction_(0), method_offset_(0), method_relative_(ushort(-1)) -
355{ -
356 if (slotObj_)
partially evaluated: slotObj_
TRUEFALSE
yes
Evaluation Count:67
no
Evaluation Count:0
0-67
357 slotObj_->ref();
executed: slotObj_->ref();
Execution Count:67
67
358}
executed: }
Execution Count:67
67
359 -
360 -
361 -
362 -
363QMetaCallEvent::~QMetaCallEvent() -
364{ -
365 if (types_) {
evaluated: types_
TRUEFALSE
yes
Evaluation Count:98804
yes
Evaluation Count:750
750-98804
366 for (int i = 0; i < nargs_; ++i) {
evaluated: i < nargs_
TRUEFALSE
yes
Evaluation Count:155681
yes
Evaluation Count:98802
98802-155681
367 if (types_[i] && args_[i])
evaluated: types_[i]
TRUEFALSE
yes
Evaluation Count:56895
yes
Evaluation Count:98803
partially evaluated: args_[i]
TRUEFALSE
yes
Evaluation Count:56897
no
Evaluation Count:0
0-98803
368 QMetaType::destroy(types_[i], args_[i]);
executed: QMetaType::destroy(types_[i], args_[i]);
Execution Count:56897
56897
369 }
executed: }
Execution Count:155693
155693
370 free(types_); -
371 free(args_); -
372 }
executed: }
Execution Count:98818
98818
373 -
374 if (semaphore_)
evaluated: semaphore_
TRUEFALSE
yes
Evaluation Count:587
yes
Evaluation Count:98979
587-98979
375 semaphore_->release();
executed: semaphore_->release();
Execution Count:587
587
376 -
377 if (slotObj_)
evaluated: slotObj_
TRUEFALSE
yes
Evaluation Count:67
yes
Evaluation Count:99499
67-99499
378 slotObj_->destroyIfLastRef();
executed: slotObj_->destroyIfLastRef();
Execution Count:67
67
379}
executed: }
Execution Count:99565
99565
380 -
381 -
382 -
383 -
384void QMetaCallEvent::placeMetaCall(QObject *object) -
385{ -
386 if (slotObj_) {
evaluated: slotObj_
TRUEFALSE
yes
Evaluation Count:67
yes
Evaluation Count:91342
67-91342
387 slotObj_->call(object, args_); -
388 } else if (callFunction_ && method_offset_ <= object->metaObject()->methodOffset()) {
executed: }
Execution Count:67
evaluated: callFunction_
TRUEFALSE
yes
Evaluation Count:91341
yes
Evaluation Count:7
evaluated: method_offset_ <= object->metaObject()->methodOffset()
TRUEFALSE
yes
Evaluation Count:91316
yes
Evaluation Count:1
1-91341
389 callFunction_(object, QMetaObject::InvokeMetaMethod, method_relative_, args_); -
390 } else {
executed: }
Execution Count:91384
91384
391 QMetaObject::metacall(object, QMetaObject::InvokeMetaMethod, method_offset_ + method_relative_, args_); -
392 }
executed: }
Execution Count:8
8
393} -
394void *qt_find_obj_child(QObject *parent, const char *type, const QString &name) -
395{ -
396 QObjectList list = parent->children(); -
397 if (list.size() == 0) return 0;
never evaluated: list.size() == 0
never executed: return 0;
0
398 for (int i = 0; i < list.size(); ++i) {
never evaluated: i < list.size()
0
399 QObject *obj = list.at(i); -
400 if (name == obj->objectName() && obj->inherits(type))
never evaluated: name == obj->objectName()
never evaluated: obj->inherits(type)
0
401 return obj;
never executed: return obj;
0
402 }
never executed: }
0
403 return 0;
never executed: return 0;
0
404} -
405 -
406 -
407 -
408 -
409 -
410 -
411 -
412static bool check_parent_thread(QObject *parent, -
413 QThreadData *parentThreadData, -
414 QThreadData *currentThreadData) -
415{ -
416 if (parent && parentThreadData != currentThreadData) {
partially evaluated: parent
TRUEFALSE
yes
Evaluation Count:54435
no
Evaluation Count:0
partially evaluated: parentThreadData != currentThreadData
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:54435
0-54435
417 QThread *parentThread = parentThreadData->thread; -
418 QThread *currentThread = currentThreadData->thread; -
419 QMessageLogger("kernel/qobject.cpp", 647, __PRETTY_FUNCTION__).warning("QObject: Cannot create children for a parent that is in a different thread.\n" -
420 "(Parent is %s(%p), parent's thread is %s(%p), current thread is %s(%p)", -
421 parent->metaObject()->className(), -
422 parent, -
423 parentThread ? parentThread->metaObject()->className() : "QThread", -
424 parentThread, -
425 currentThread ? currentThread->metaObject()->className() : "QThread", -
426 currentThread); -
427 return false;
never executed: return false;
0
428 } -
429 return true;
executed: return true;
Execution Count:54435
54435
430} -
431QObject::QObject(QObject *parent) -
432 : d_ptr(new QObjectPrivate) -
433{ -
434 QObjectPrivate * const d = d_func(); -
435 d_ptr->q_ptr = this; -
436 d->threadData = (parent && !parent->thread()) ? parent->d_func()->threadData : QThreadData::current();
evaluated: parent
TRUEFALSE
yes
Evaluation Count:5257
yes
Evaluation Count:77079
evaluated: !parent->thread()
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:5256
1-77079
437 d->threadData->ref(); -
438 if (parent) {
evaluated: parent
TRUEFALSE
yes
Evaluation Count:5257
yes
Evaluation Count:77081
5257-77081
439 try { -
440 if (!check_parent_thread(parent, parent ? parent->d_func()->threadData : 0, d->threadData))
partially evaluated: !check_parent_thread(parent, parent ? parent->d_func()->threadData : 0, d->threadData)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:5257
0-5257
441 parent = 0;
never executed: parent = 0;
0
442 setParent(parent); -
443 } catch (...) {
executed: }
Execution Count:5257
5257
444 d->threadData->deref(); -
445 throw;
never executed: throw;
0
446 } -
447 }
executed: }
Execution Count:5257
5257
448 qt_addObject(this); -
449}
executed: }
Execution Count:82339
82339
450 -
451 -
452 -
453 -
454QObject::QObject(QObjectPrivate &dd, QObject *parent) -
455 : d_ptr(&dd) -
456{ -
457 QObjectPrivate * const d = d_func(); -
458 d_ptr->q_ptr = this; -
459 d->threadData = (parent && !parent->thread()) ? parent->d_func()->threadData : QThreadData::current();
evaluated: parent
TRUEFALSE
yes
Evaluation Count:49176
yes
Evaluation Count:3469456
partially evaluated: !parent->thread()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:49177
0-3469456
460 d->threadData->ref(); -
461 if (parent) {
evaluated: parent
TRUEFALSE
yes
Evaluation Count:49178
yes
Evaluation Count:3469461
49178-3469461
462 try { -
463 if (!check_parent_thread(parent, parent ? parent->d_func()->threadData : 0, d->threadData))
partially evaluated: !check_parent_thread(parent, parent ? parent->d_func()->threadData : 0, d->threadData)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:49178
0-49178
464 parent = 0;
never executed: parent = 0;
0
465 if (d->isWidget) {
partially evaluated: d->isWidget
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:49178
0-49178
466 if (parent) {
never evaluated: parent
0
467 d->parent = parent; -
468 d->parent->d_func()->children.append(this); -
469 }
never executed: }
0
470 -
471 } else {
never executed: }
0
472 setParent(parent); -
473 }
executed: }
Execution Count:49177
49177
474 } catch (...) { -
475 d->threadData->deref(); -
476 throw;
never executed: throw;
0
477 } -
478 }
executed: }
Execution Count:49177
49177
479 qt_addObject(this); -
480}
executed: }
Execution Count:3518615
3518615
481QObject::~QObject() -
482{ -
483 QObjectPrivate * const d = d_func(); -
484 d->wasDeleted = true; -
485 d->blockSig = 0; -
486 -
487 QtSharedPointer::ExternalRefCountData *sharedRefcount = d->sharedRefcount.load(); -
488 if (sharedRefcount) {
evaluated: sharedRefcount
TRUEFALSE
yes
Evaluation Count:38488
yes
Evaluation Count:3560078
38488-3560078
489 if (sharedRefcount->strongref.load() > 0) {
partially evaluated: sharedRefcount->strongref.load() > 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:38489
0-38489
490 QMessageLogger("kernel/qobject.cpp", 759, __PRETTY_FUNCTION__).warning("QObject: shared QObject was deleted directly. The program is malformed and may crash."); -
491 -
492 }
never executed: }
0
493 -
494 -
495 sharedRefcount->strongref.store(0); -
496 if (!sharedRefcount->weakref.deref())
evaluated: !sharedRefcount->weakref.deref()
TRUEFALSE
yes
Evaluation Count:16944
yes
Evaluation Count:21546
16944-21546
497 delete sharedRefcount;
executed: delete sharedRefcount;
Execution Count:16944
16944
498 }
executed: }
Execution Count:38489
38489
499 -
500 if (!d->isWidget && d->isSignalConnected(0)) {
evaluated: !d->isWidget
TRUEFALSE
yes
Evaluation Count:3555579
yes
Evaluation Count:42959
evaluated: d->isSignalConnected(0)
TRUEFALSE
yes
Evaluation Count:4392
yes
Evaluation Count:3551228
4392-3555579
501 try { -
502 destroyed(this); -
503 } catch (...) {
executed: }
Execution Count:4392
4392
504 -
505 -
506 QMessageLogger("kernel/qobject.cpp", 775, __PRETTY_FUNCTION__).warning("Detected an unexpected exception in ~QObject while emitting destroyed()."); -
507 throw;
never executed: throw;
0
508 } -
509 }
executed: }
Execution Count:4392
4392
510 -
511 if (d->declarativeData)
partially evaluated: d->declarativeData
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:3598572
0-3598572
512 QAbstractDeclarativeData::destroyed(d->declarativeData, this);
never executed: QAbstractDeclarativeData::destroyed(d->declarativeData, this);
0
513 -
514 -
515 if (d->currentSender != 0)
evaluated: d->currentSender != 0
TRUEFALSE
yes
Evaluation Count:30
yes
Evaluation Count:3598521
30-3598521
516 d->currentSender->ref = 0;
executed: d->currentSender->ref = 0;
Execution Count:30
30
517 d->currentSender = 0; -
518 -
519 if (d->connectionLists || d->senders) {
evaluated: d->connectionLists
TRUEFALSE
yes
Evaluation Count:76806
yes
Evaluation Count:3521743
evaluated: d->senders
TRUEFALSE
yes
Evaluation Count:54148
yes
Evaluation Count:3467625
54148-3521743
520 QMutex *signalSlotMutex = signalSlotLock(this); -
521 QMutexLocker locker(signalSlotMutex); -
522 -
523 -
524 if (d->connectionLists) {
evaluated: d->connectionLists
TRUEFALSE
yes
Evaluation Count:76806
yes
Evaluation Count:54148
54148-76806
525 ++d->connectionLists->inUse; -
526 int connectionListsCount = d->connectionLists->count(); -
527 for (int signal = -1; signal < connectionListsCount; ++signal) {
evaluated: signal < connectionListsCount
TRUEFALSE
yes
Evaluation Count:674595
yes
Evaluation Count:76808
76808-674595
528 QObjectPrivate::ConnectionList &connectionList = -
529 (*d->connectionLists)[signal]; -
530 -
531 while (QObjectPrivate::Connection *c = connectionList.first) {
evaluated: QObjectPrivate::Connection *c = connectionList.first
TRUEFALSE
yes
Evaluation Count:340979
yes
Evaluation Count:674607
340979-674607
532 if (!c->receiver) {
evaluated: !c->receiver
TRUEFALSE
yes
Evaluation Count:121519
yes
Evaluation Count:219464
121519-219464
533 connectionList.first = c->nextConnectionList; -
534 c->deref(); -
535 continue;
executed: continue;
Execution Count:121520
121520
536 } -
537 -
538 QMutex *m = signalSlotLock(c->receiver); -
539 bool needToUnlock = QOrderedMutexLocker::relock(signalSlotMutex, m); -
540 -
541 if (c->receiver) {
evaluated: c->receiver
TRUEFALSE
yes
Evaluation Count:219422
yes
Evaluation Count:50
50-219422
542 *c->prev = c->next; -
543 if (c->next) c->next->prev = c->prev;
executed: c->next->prev = c->prev;
Execution Count:129502
evaluated: c->next
TRUEFALSE
yes
Evaluation Count:129502
yes
Evaluation Count:89920
89920-129502
544 }
executed: }
Execution Count:219422
219422
545 c->receiver = 0; -
546 if (needToUnlock)
evaluated: needToUnlock
TRUEFALSE
yes
Evaluation Count:210921
yes
Evaluation Count:8551
8551-210921
547 m->unlock();
executed: m->unlock();
Execution Count:210920
210920
548 -
549 connectionList.first = c->nextConnectionList; -
550 c->deref(); -
551 }
executed: }
Execution Count:219470
219470
552 }
executed: }
Execution Count:674607
674607
553 -
554 if (!--d->connectionLists->inUse) {
evaluated: !--d->connectionLists->inUse
TRUEFALSE
yes
Evaluation Count:76734
yes
Evaluation Count:74
74-76734
555 delete d->connectionLists; -
556 } else {
executed: }
Execution Count:76734
76734
557 d->connectionLists->orphaned = true; -
558 }
executed: }
Execution Count:74
74
559 d->connectionLists = 0; -
560 }
executed: }
Execution Count:76808
76808
561 -
562 -
563 QObjectPrivate::Connection *node = d->senders; -
564 while (node) {
evaluated: node
TRUEFALSE
yes
Evaluation Count:139795
yes
Evaluation Count:130955
130955-139795
565 QObject *sender = node->sender; -
566 QMutex *m = signalSlotLock(sender); -
567 node->prev = &node; -
568 bool needToUnlock = QOrderedMutexLocker::relock(signalSlotMutex, m); -
569 -
570 if (!node || node->sender != sender) {
evaluated: !node
TRUEFALSE
yes
Evaluation Count:12
yes
Evaluation Count:139783
evaluated: node->sender != sender
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:139780
3-139783
571 m->unlock(); -
572 continue;
executed: continue;
Execution Count:15
15
573 } -
574 node->receiver = 0; -
575 QObjectConnectionListVector *senderLists = sender->d_func()->connectionLists; -
576 if (senderLists)
partially evaluated: senderLists
TRUEFALSE
yes
Evaluation Count:139780
no
Evaluation Count:0
0-139780
577 senderLists->dirty = true;
executed: senderLists->dirty = true;
Execution Count:139780
139780
578 -
579 int signal_index = node->signal_index; -
580 node = node->next; -
581 if (needToUnlock)
evaluated: needToUnlock
TRUEFALSE
yes
Evaluation Count:138723
yes
Evaluation Count:1057
1057-138723
582 m->unlock();
executed: m->unlock();
Execution Count:138723
138723
583 sender->disconnectNotify(QMetaObjectPrivate::signal(sender->metaObject(), signal_index)); -
584 }
executed: }
Execution Count:139780
139780
585 }
executed: }
Execution Count:130955
130955
586 -
587 if (!d->children.isEmpty())
evaluated: !d->children.isEmpty()
TRUEFALSE
yes
Evaluation Count:9602
yes
Evaluation Count:3588931
9602-3588931
588 d->deleteChildren();
executed: d->deleteChildren();
Execution Count:9602
9602
589 -
590 qt_removeObject(this); -
591 -
592 if (d->parent)
evaluated: d->parent
TRUEFALSE
yes
Evaluation Count:111769
yes
Evaluation Count:3486749
111769-3486749
593 d->setParent_helper(0);
executed: d->setParent_helper(0);
Execution Count:111769
111769
594}
executed: }
Execution Count:3598592
3598592
595 -
596QObjectPrivate::Connection::~Connection() -
597{ -
598 if (ownArgumentTypes) {
evaluated: ownArgumentTypes
TRUEFALSE
yes
Evaluation Count:476247
yes
Evaluation Count:35
35-476247
599 const int *v = argumentTypes.load(); -
600 if (v != &DIRECT_CONNECTION_ONLY)
partially evaluated: v != &DIRECT_CONNECTION_ONLY
TRUEFALSE
yes
Evaluation Count:476247
no
Evaluation Count:0
0-476247
601 delete [] v;
executed: delete [] v;
Execution Count:476247
476247
602 }
executed: }
Execution Count:476246
476246
603 if (isSlotObject)
evaluated: isSlotObject
TRUEFALSE
yes
Evaluation Count:3940
yes
Evaluation Count:472341
3940-472341
604 slotObj->destroyIfLastRef();
executed: slotObj->destroyIfLastRef();
Execution Count:3940
3940
605}
executed: }
Execution Count:476281
476281
606QString QObject::objectName() const -
607{ -
608 const QObjectPrivate * const d = d_func(); -
609 return d->extraData ? d->extraData->objectName : QString();
executed: return d->extraData ? d->extraData->objectName : QString();
Execution Count:1726345
1726345
610} -
611 -
612 -
613 -
614 -
615void QObject::setObjectName(const QString &name) -
616{ -
617 QObjectPrivate * const d = d_func(); -
618 if (!d->extraData)
evaluated: !d->extraData
TRUEFALSE
yes
Evaluation Count:38079
yes
Evaluation Count:411
411-38079
619 d->extraData = new QObjectPrivate::ExtraData;
executed: d->extraData = new QObjectPrivate::ExtraData;
Execution Count:38079
38079
620 -
621 if (d->extraData->objectName != name) {
evaluated: d->extraData->objectName != name
TRUEFALSE
yes
Evaluation Count:38473
yes
Evaluation Count:17
17-38473
622 d->extraData->objectName = name; -
623 objectNameChanged(d->extraData->objectName, QPrivateSignal()); -
624 }
executed: }
Execution Count:38473
38473
625}
executed: }
Execution Count:38490
38490
626bool QObject::event(QEvent *e) -
627{ -
628 switch (e->type()) { -
629 case QEvent::Timer: -
630 timerEvent((QTimerEvent*)e); -
631 break;
executed: break;
Execution Count:42115
42115
632 -
633 case QEvent::ChildAdded: -
634 case QEvent::ChildPolished: -
635 case QEvent::ChildRemoved: -
636 childEvent((QChildEvent*)e); -
637 break;
executed: break;
Execution Count:201906
201906
638 -
639 case QEvent::DeferredDelete: -
640 qDeleteInEventHandler(this); -
641 break;
executed: break;
Execution Count:2768
2768
642 -
643 case QEvent::MetaCall: -
644 { -
645 QMetaCallEvent *mce = static_cast<QMetaCallEvent*>(e); -
646 -
647 QConnectionSenderSwitcher sw(this, const_cast<QObject*>(mce->sender()), mce->signalId()); -
648 -
649 mce->placeMetaCall(this); -
650 break;
executed: break;
Execution Count:91620
91620
651 } -
652 -
653 case QEvent::ThreadChange: { -
654 QObjectPrivate * const d = d_func(); -
655 QThreadData *threadData = d->threadData; -
656 QAbstractEventDispatcher *eventDispatcher = threadData->eventDispatcher; -
657 if (eventDispatcher) {
evaluated: eventDispatcher
TRUEFALSE
yes
Evaluation Count:23328
yes
Evaluation Count:7
7-23328
658 QList<QAbstractEventDispatcher::TimerInfo> timers = eventDispatcher->registeredTimers(this); -
659 if (!timers.isEmpty()) {
evaluated: !timers.isEmpty()
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:23301
3-23301
660 -
661 eventDispatcher->unregisterTimers(this); -
662 QMetaObject::invokeMethod(this, "_q_reregisterTimers", Qt::QueuedConnection, -
663 QArgument<void* >("void*", (new QList<QAbstractEventDispatcher::TimerInfo>(timers)))); -
664 }
executed: }
Execution Count:3
3
665 }
executed: }
Execution Count:23301
23301
666 break;
executed: break;
Execution Count:23316
23316
667 } -
668 -
669 default: -
670 if (e->type() >= QEvent::User) {
evaluated: e->type() >= QEvent::User
TRUEFALSE
yes
Evaluation Count:268767
yes
Evaluation Count:199507
199507-268767
671 customEvent(e); -
672 break;
executed: break;
Execution Count:268723
268723
673 } -
674 return false;
executed: return false;
Execution Count:199507
199507
675 } -
676 return true;
executed: return true;
Execution Count:630313
630313
677} -
678void QObject::timerEvent(QTimerEvent *) -
679{ -
680} -
681void QObject::childEvent(QChildEvent * ) -
682{ -
683} -
684void QObject::customEvent(QEvent * ) -
685{ -
686} -
687bool QObject::eventFilter(QObject * , QEvent * ) -
688{ -
689 return false;
executed: return false;
Execution Count:205230
205230
690} -
691bool QObject::blockSignals(bool block) -
692{ -
693 QObjectPrivate * const d = d_func(); -
694 bool previous = d->blockSig; -
695 d->blockSig = block; -
696 return previous;
executed: return previous;
Execution Count:26864
26864
697} -
698 -
699 -
700 -
701 -
702 -
703 -
704QThread *QObject::thread() const -
705{ -
706 return d_func()->threadData->thread;
executed: return d_func()->threadData->thread;
Execution Count:2174759
2174759
707} -
708void QObject::moveToThread(QThread *targetThread) -
709{ -
710 QObjectPrivate * const d = d_func(); -
711 -
712 if (d->threadData->thread == targetThread) {
evaluated: d->threadData->thread == targetThread
TRUEFALSE
yes
Evaluation Count:8922
yes
Evaluation Count:23167
8922-23167
713 -
714 return;
executed: return;
Execution Count:8922
8922
715 } -
716 -
717 if (d->parent != 0) {
partially evaluated: d->parent != 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:23168
0-23168
718 QMessageLogger("kernel/qobject.cpp", 1284, __PRETTY_FUNCTION__).warning("QObject::moveToThread: Cannot move objects with a parent"); -
719 return;
never executed: return;
0
720 } -
721 if (d->isWidget) {
partially evaluated: d->isWidget
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:23165
0-23165
722 QMessageLogger("kernel/qobject.cpp", 1288, __PRETTY_FUNCTION__).warning("QObject::moveToThread: Widgets cannot be moved to a new thread"); -
723 return;
never executed: return;
0
724 } -
725 -
726 QThreadData *currentData = QThreadData::current(); -
727 QThreadData *targetData = targetThread ? QThreadData::get2(targetThread) : new QThreadData(0);
evaluated: targetThread
TRUEFALSE
yes
Evaluation Count:23156
yes
Evaluation Count:5
5-23156
728 if (d->threadData->thread == 0 && currentData == targetData) {
evaluated: d->threadData->thread == 0
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:23168
partially evaluated: currentData == targetData
TRUEFALSE
yes
Evaluation Count:3
no
Evaluation Count:0
0-23168
729 -
730 currentData = d->threadData; -
731 } else if (d->threadData != currentData) {
executed: }
Execution Count:3
partially evaluated: d->threadData != currentData
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:23168
0-23168
732 QMessageLogger("kernel/qobject.cpp", 1298, __PRETTY_FUNCTION__).warning("QObject::moveToThread: Current thread (%p) is not the object's thread (%p).\n" -
733 "Cannot move to target thread (%p)\n", -
734 currentData->thread, d->threadData->thread, targetData->thread); -
735 -
736 -
737 -
738 -
739 -
740 -
741 -
742 return;
never executed: return;
0
743 } -
744 -
745 -
746 d->moveToThread_helper(); -
747 -
748 QOrderedMutexLocker locker(&currentData->postEventList.mutex, -
749 &targetData->postEventList.mutex); -
750 -
751 -
752 currentData->ref(); -
753 -
754 -
755 d_func()->setThreadData_helper(currentData, targetData); -
756 -
757 locker.unlock(); -
758 -
759 -
760 currentData->deref(); -
761}
executed: }
Execution Count:23188
23188
762 -
763void QObjectPrivate::moveToThread_helper() -
764{ -
765 QObject * const q = q_func(); -
766 QEvent e(QEvent::ThreadChange); -
767 QCoreApplication::sendEvent(q, &e); -
768 for (int i = 0; i < children.size(); ++i) {
evaluated: i < children.size()
TRUEFALSE
yes
Evaluation Count:166
yes
Evaluation Count:23293
166-23293
769 QObject *child = children.at(i); -
770 child->d_func()->moveToThread_helper(); -
771 }
executed: }
Execution Count:166
166
772}
executed: }
Execution Count:23290
23290
773 -
774void QObjectPrivate::setThreadData_helper(QThreadData *currentData, QThreadData *targetData) -
775{ -
776 QObject * const q = q_func(); -
777 -
778 -
779 int eventsMoved = 0; -
780 for (int i = 0; i < currentData->postEventList.size(); ++i) {
evaluated: i < currentData->postEventList.size()
TRUEFALSE
yes
Evaluation Count:3295088
yes
Evaluation Count:23357
23357-3295088
781 const QPostEvent &pe = currentData->postEventList.at(i); -
782 if (!pe.event)
evaluated: !pe.event
TRUEFALSE
yes
Evaluation Count:1119223
yes
Evaluation Count:2175865
1119223-2175865
783 continue;
executed: continue;
Execution Count:1119223
1119223
784 if (pe.receiver == q) {
evaluated: pe.receiver == q
TRUEFALSE
yes
Evaluation Count:408838
yes
Evaluation Count:1767027
408838-1767027
785 -
786 targetData->postEventList.addEvent(pe); -
787 const_cast<QPostEvent &>(pe).event = 0; -
788 ++eventsMoved; -
789 }
executed: }
Execution Count:408838
408838
790 }
executed: }
Execution Count:2175865
2175865
791 if (eventsMoved > 0 && targetData->eventDispatcher) {
evaluated: eventsMoved > 0
TRUEFALSE
yes
Evaluation Count:20505
yes
Evaluation Count:2852
evaluated: targetData->eventDispatcher
TRUEFALSE
yes
Evaluation Count:20501
yes
Evaluation Count:4
4-20505
792 targetData->canWait = false; -
793 targetData->eventDispatcher->wakeUp(); -
794 }
executed: }
Execution Count:20501
20501
795 -
796 -
797 if (currentSender)
evaluated: currentSender
TRUEFALSE
yes
Evaluation Count:21001
yes
Evaluation Count:2356
2356-21001
798 currentSender->ref = 0;
executed: currentSender->ref = 0;
Execution Count:21001
21001
799 currentSender = 0; -
800 -
801 -
802 targetData->ref(); -
803 threadData->deref(); -
804 threadData = targetData; -
805 -
806 for (int i = 0; i < children.size(); ++i) {
evaluated: i < children.size()
TRUEFALSE
yes
Evaluation Count:166
yes
Evaluation Count:23357
166-23357
807 QObject *child = children.at(i); -
808 child->d_func()->setThreadData_helper(currentData, targetData); -
809 }
executed: }
Execution Count:166
166
810}
executed: }
Execution Count:23357
23357
811 -
812void QObjectPrivate::_q_reregisterTimers(void *pointer) -
813{ -
814 QObject * const q = q_func(); -
815 QList<QAbstractEventDispatcher::TimerInfo> *timerList = reinterpret_cast<QList<QAbstractEventDispatcher::TimerInfo> *>(pointer); -
816 QAbstractEventDispatcher *eventDispatcher = threadData->eventDispatcher; -
817 for (int i = 0; i < timerList->size(); ++i) {
evaluated: i < timerList->size()
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:3
3
818 const QAbstractEventDispatcher::TimerInfo &ti = timerList->at(i); -
819 eventDispatcher->registerTimer(ti.timerId, ti.interval, ti.timerType, q); -
820 }
executed: }
Execution Count:3
3
821 delete timerList; -
822}
executed: }
Execution Count:3
3
823int QObject::startTimer(int interval, Qt::TimerType timerType) -
824{ -
825 QObjectPrivate * const d = d_func(); -
826 -
827 if (interval < 0) {
partially evaluated: interval < 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:12025
0-12025
828 QMessageLogger("kernel/qobject.cpp", 1437, __PRETTY_FUNCTION__).warning("QObject::startTimer: QTimer cannot have a negative interval"); -
829 return 0;
never executed: return 0;
0
830 } -
831 -
832 if (!d->threadData->eventDispatcher) {
partially evaluated: !d->threadData->eventDispatcher
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:12025
0-12025
833 QMessageLogger("kernel/qobject.cpp", 1442, __PRETTY_FUNCTION__).warning("QObject::startTimer: QTimer can only be used with threads started with QThread"); -
834 return 0;
never executed: return 0;
0
835 } -
836 int timerId = d->threadData->eventDispatcher->registerTimer(interval, timerType, this); -
837 if (!d->extraData)
evaluated: !d->extraData
TRUEFALSE
yes
Evaluation Count:5281
yes
Evaluation Count:6744
5281-6744
838 d->extraData = new QObjectPrivate::ExtraData;
executed: d->extraData = new QObjectPrivate::ExtraData;
Execution Count:5281
5281
839 d->extraData->runningTimers.append(timerId); -
840 return timerId;
executed: return timerId;
Execution Count:12025
12025
841} -
842void QObject::killTimer(int id) -
843{ -
844 QObjectPrivate * const d = d_func(); -
845 if (id) {
partially evaluated: id
TRUEFALSE
yes
Evaluation Count:10725
no
Evaluation Count:0
0-10725
846 int at = d->extraData ? d->extraData->runningTimers.indexOf(id) : -1;
partially evaluated: d->extraData
TRUEFALSE
yes
Evaluation Count:10725
no
Evaluation Count:0
0-10725
847 if (at == -1) {
partially evaluated: at == -1
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:10725
0-10725
848 -
849 QMessageLogger("kernel/qobject.cpp", 1468, __PRETTY_FUNCTION__).warning("QObject::killTimer(): Error: timer id %d is not valid for object %p (%s), timer has not been killed", -
850 id, -
851 this, -
852 QString(objectName()).toLocal8Bit().constData()); -
853 return;
never executed: return;
0
854 } -
855 -
856 if (d->threadData->eventDispatcher)
evaluated: d->threadData->eventDispatcher
TRUEFALSE
yes
Evaluation Count:10614
yes
Evaluation Count:111
111-10614
857 d->threadData->eventDispatcher->unregisterTimer(id);
executed: d->threadData->eventDispatcher->unregisterTimer(id);
Execution Count:10614
10614
858 -
859 d->extraData->runningTimers.remove(at); -
860 QAbstractEventDispatcherPrivate::releaseTimerId(id); -
861 }
executed: }
Execution Count:10725
10725
862}
executed: }
Execution Count:10725
10725
863void qt_qFindChildren_helper(const QObject *parent, const QString &name, -
864 const QMetaObject &mo, QList<void*> *list, Qt::FindChildOptions options) -
865{ -
866 if (!parent || !list)
evaluated: !parent
TRUEFALSE
yes
Evaluation Count:12
yes
Evaluation Count:41086
partially evaluated: !list
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:41086
0-41086
867 return;
executed: return;
Execution Count:12
12
868 const QObjectList &children = parent->children(); -
869 QObject *obj; -
870 for (int i = 0; i < children.size(); ++i) {
evaluated: i < children.size()
TRUEFALSE
yes
Evaluation Count:39094
yes
Evaluation Count:41086
39094-41086
871 obj = children.at(i); -
872 if (mo.cast(obj)) {
evaluated: mo.cast(obj)
TRUEFALSE
yes
Evaluation Count:16640
yes
Evaluation Count:22454
16640-22454
873 if (name.isNull() || obj->objectName() == name)
evaluated: name.isNull()
TRUEFALSE
yes
Evaluation Count:16351
yes
Evaluation Count:289
evaluated: obj->objectName() == name
TRUEFALSE
yes
Evaluation Count:34
yes
Evaluation Count:255
34-16351
874 list->append(obj);
executed: list->append(obj);
Execution Count:16385
16385
875 }
executed: }
Execution Count:16640
16640
876 if (options & Qt::FindChildrenRecursively)
evaluated: options & Qt::FindChildrenRecursively
TRUEFALSE
yes
Evaluation Count:39009
yes
Evaluation Count:85
85-39009
877 qt_qFindChildren_helper(obj, name, mo, list, options);
executed: qt_qFindChildren_helper(obj, name, mo, list, options);
Execution Count:39009
39009
878 }
executed: }
Execution Count:39094
39094
879}
executed: }
Execution Count:41086
41086
880 -
881 -
882 -
883 -
884 -
885void qt_qFindChildren_helper(const QObject *parent, const QRegExp &re, -
886 const QMetaObject &mo, QList<void*> *list, Qt::FindChildOptions options) -
887{ -
888 if (!parent || !list)
partially evaluated: !parent
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:55
partially evaluated: !list
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:55
0-55
889 return;
never executed: return;
0
890 const QObjectList &children = parent->children(); -
891 QRegExp reCopy = re; -
892 QObject *obj; -
893 for (int i = 0; i < children.size(); ++i) {
evaluated: i < children.size()
TRUEFALSE
yes
Evaluation Count:70
yes
Evaluation Count:55
55-70
894 obj = children.at(i); -
895 if (mo.cast(obj) && reCopy.indexIn(obj->objectName()) != -1)
evaluated: mo.cast(obj)
TRUEFALSE
yes
Evaluation Count:52
yes
Evaluation Count:18
evaluated: reCopy.indexIn(obj->objectName()) != -1
TRUEFALSE
yes
Evaluation Count:15
yes
Evaluation Count:37
15-52
896 list->append(obj);
executed: list->append(obj);
Execution Count:15
15
897 -
898 if (options & Qt::FindChildrenRecursively)
evaluated: options & Qt::FindChildrenRecursively
TRUEFALSE
yes
Evaluation Count:45
yes
Evaluation Count:25
25-45
899 qt_qFindChildren_helper(obj, re, mo, list, options);
executed: qt_qFindChildren_helper(obj, re, mo, list, options);
Execution Count:45
45
900 }
executed: }
Execution Count:70
70
901}
executed: }
Execution Count:55
55
902 -
903 -
904 -
905 -
906 -
907 -
908void qt_qFindChildren_helper(const QObject *parent, const QRegularExpression &re, -
909 const QMetaObject &mo, QList<void*> *list, Qt::FindChildOptions options) -
910{ -
911 if (!parent || !list)
partially evaluated: !parent
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:50
partially evaluated: !list
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:50
0-50
912 return;
never executed: return;
0
913 const QObjectList &children = parent->children(); -
914 QObject *obj; -
915 for (int i = 0; i < children.size(); ++i) {
evaluated: i < children.size()
TRUEFALSE
yes
Evaluation Count:45
yes
Evaluation Count:50
45-50
916 obj = children.at(i); -
917 if (mo.cast(obj)) {
evaluated: mo.cast(obj)
TRUEFALSE
yes
Evaluation Count:33
yes
Evaluation Count:12
12-33
918 QRegularExpressionMatch m = re.match(obj->objectName()); -
919 if (m.hasMatch())
evaluated: m.hasMatch()
TRUEFALSE
yes
Evaluation Count:10
yes
Evaluation Count:23
10-23
920 list->append(obj);
executed: list->append(obj);
Execution Count:10
10
921 }
executed: }
Execution Count:33
33
922 if (options & Qt::FindChildrenRecursively)
partially evaluated: options & Qt::FindChildrenRecursively
TRUEFALSE
yes
Evaluation Count:45
no
Evaluation Count:0
0-45
923 qt_qFindChildren_helper(obj, re, mo, list, options);
executed: qt_qFindChildren_helper(obj, re, mo, list, options);
Execution Count:45
45
924 }
executed: }
Execution Count:45
45
925}
executed: }
Execution Count:50
50
926 -
927 -
928 -
929 -
930 -
931QObject *qt_qFindChild_helper(const QObject *parent, const QString &name, const QMetaObject &mo, Qt::FindChildOptions options) -
932{ -
933 if (!parent)
partially evaluated: !parent
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:4898
0-4898
934 return 0;
never executed: return 0;
0
935 const QObjectList &children = parent->children(); -
936 QObject *obj; -
937 int i; -
938 for (i = 0; i < children.size(); ++i) {
evaluated: i < children.size()
TRUEFALSE
yes
Evaluation Count:6252
yes
Evaluation Count:4534
4534-6252
939 obj = children.at(i); -
940 if (mo.cast(obj) && (name.isNull() || obj->objectName() == name))
evaluated: mo.cast(obj)
TRUEFALSE
yes
Evaluation Count:526
yes
Evaluation Count:5726
evaluated: name.isNull()
TRUEFALSE
yes
Evaluation Count:220
yes
Evaluation Count:306
evaluated: obj->objectName() == name
TRUEFALSE
yes
Evaluation Count:144
yes
Evaluation Count:162
144-5726
941 return obj;
executed: return obj;
Execution Count:364
364
942 }
executed: }
Execution Count:5888
5888
943 if (options & Qt::FindChildrenRecursively) {
evaluated: options & Qt::FindChildrenRecursively
TRUEFALSE
yes
Evaluation Count:4525
yes
Evaluation Count:9
9-4525
944 for (i = 0; i < children.size(); ++i) {
evaluated: i < children.size()
TRUEFALSE
yes
Evaluation Count:4099
yes
Evaluation Count:4363
4099-4363
945 obj = qt_qFindChild_helper(children.at(i), name, mo, options); -
946 if (obj)
evaluated: obj
TRUEFALSE
yes
Evaluation Count:162
yes
Evaluation Count:3937
162-3937
947 return obj;
executed: return obj;
Execution Count:162
162
948 }
executed: }
Execution Count:3937
3937
949 }
executed: }
Execution Count:4363
4363
950 return 0;
executed: return 0;
Execution Count:4372
4372
951} -
952 -
953 -
954 -
955 -
956 -
957 -
958void QObject::setParent(QObject *parent) -
959{ -
960 QObjectPrivate * const d = d_func(); -
961 qt_noop(); -
962 d->setParent_helper(parent); -
963}
executed: }
Execution Count:77519
77519
964 -
965void QObjectPrivate::deleteChildren() -
966{ -
967 qt_noop(); -
968 isDeletingChildren = true; -
969 -
970 -
971 -
972 for (int i = 0; i < children.count(); ++i) {
evaluated: i < children.count()
TRUEFALSE
yes
Evaluation Count:63369
yes
Evaluation Count:29164
29164-63369
973 currentChildBeingDeleted = children.at(i); -
974 children[i] = 0; -
975 delete currentChildBeingDeleted; -
976 }
executed: }
Execution Count:63369
63369
977 children.clear(); -
978 currentChildBeingDeleted = 0; -
979 isDeletingChildren = false; -
980}
executed: }
Execution Count:29164
29164
981 -
982void QObjectPrivate::setParent_helper(QObject *o) -
983{ -
984 QObject * const q = q_func(); -
985 if (o == parent)
evaluated: o == parent
TRUEFALSE
yes
Evaluation Count:1646
yes
Evaluation Count:229801
1646-229801
986 return;
executed: return;
Execution Count:1646
1646
987 if (parent) {
evaluated: parent
TRUEFALSE
yes
Evaluation Count:113156
yes
Evaluation Count:116646
113156-116646
988 QObjectPrivate *parentD = parent->d_func(); -
989 if (parentD->isDeletingChildren && wasDeleted
evaluated: parentD->isDeletingChildren
TRUEFALSE
yes
Evaluation Count:63369
yes
Evaluation Count:49787
partially evaluated: wasDeleted
TRUEFALSE
yes
Evaluation Count:63369
no
Evaluation Count:0
0-63369
990 && parentD->currentChildBeingDeleted == q) {
evaluated: parentD->currentChildBeingDeleted == q
TRUEFALSE
yes
Evaluation Count:63367
yes
Evaluation Count:2
2-63367
991 -
992 -
993 } else {
executed: }
Execution Count:63367
63367
994 const int index = parentD->children.indexOf(q); -
995 if (parentD->isDeletingChildren) {
evaluated: parentD->isDeletingChildren
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:49787
2-49787
996 parentD->children[index] = 0; -
997 } else {
executed: }
Execution Count:2
2
998 parentD->children.removeAt(index); -
999 if (sendChildEvents && parentD->receiveChildEvents) {
evaluated: sendChildEvents
TRUEFALSE
yes
Evaluation Count:49786
yes
Evaluation Count:1
partially evaluated: parentD->receiveChildEvents
TRUEFALSE
yes
Evaluation Count:49786
no
Evaluation Count:0
0-49786
1000 QChildEvent e(QEvent::ChildRemoved, q); -
1001 QCoreApplication::sendEvent(parent, &e); -
1002 }
executed: }
Execution Count:49786
49786
1003 }
executed: }
Execution Count:49786
49786
1004 } -
1005 } -
1006 parent = o; -
1007 if (parent) {
evaluated: parent
TRUEFALSE
yes
Evaluation Count:117438
yes
Evaluation Count:112364
112364-117438
1008 -
1009 if (threadData != parent->d_func()->threadData) {
partially evaluated: threadData != parent->d_func()->threadData
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:117439
0-117439
1010 QMessageLogger("kernel/qobject.cpp", 1799, __PRETTY_FUNCTION__).warning("QObject::setParent: Cannot set parent, new parent is in a different thread"); -
1011 parent = 0; -
1012 return;
never executed: return;
0
1013 } -
1014 parent->d_func()->children.append(q); -
1015 if(sendChildEvents && parent->d_func()->receiveChildEvents) {
evaluated: sendChildEvents
TRUEFALSE
yes
Evaluation Count:117437
yes
Evaluation Count:1
partially evaluated: parent->d_func()->receiveChildEvents
TRUEFALSE
yes
Evaluation Count:117437
no
Evaluation Count:0
0-117437
1016 if (!isWidget) {
evaluated: !isWidget
TRUEFALSE
yes
Evaluation Count:75428
yes
Evaluation Count:42009
42009-75428
1017 QChildEvent e(QEvent::ChildAdded, q); -
1018 QCoreApplication::sendEvent(parent, &e); -
1019 }
executed: }
Execution Count:75426
75426
1020 }
executed: }
Execution Count:117435
117435
1021 }
executed: }
Execution Count:117436
117436
1022 if (!isDeletingChildren && declarativeData)
partially evaluated: !isDeletingChildren
TRUEFALSE
yes
Evaluation Count:229800
no
Evaluation Count:0
partially evaluated: declarativeData
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:229800
0-229800
1023 QAbstractDeclarativeData::parentChanged(declarativeData, q, o);
never executed: QAbstractDeclarativeData::parentChanged(declarativeData, q, o);
0
1024}
executed: }
Execution Count:229801
229801
1025void QObject::installEventFilter(QObject *obj) -
1026{ -
1027 QObjectPrivate * const d = d_func(); -
1028 if (!obj)
partially evaluated: !obj
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:19282
0-19282
1029 return;
never executed: return;
0
1030 if (d->threadData != obj->d_func()->threadData) {
evaluated: d->threadData != obj->d_func()->threadData
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:19281
1-19281
1031 QMessageLogger("kernel/qobject.cpp", 1863, __PRETTY_FUNCTION__).warning("QObject::installEventFilter(): Cannot filter events for objects in a different thread."); -
1032 return;
executed: return;
Execution Count:1
1
1033 } -
1034 -
1035 if (!d->extraData)
evaluated: !d->extraData
TRUEFALSE
yes
Evaluation Count:12891
yes
Evaluation Count:6390
6390-12891
1036 d->extraData = new QObjectPrivate::ExtraData;
executed: d->extraData = new QObjectPrivate::ExtraData;
Execution Count:12891
12891
1037 -
1038 -
1039 d->extraData->eventFilters.removeAll((QObject*)0); -
1040 d->extraData->eventFilters.removeAll(obj); -
1041 d->extraData->eventFilters.prepend(obj); -
1042}
executed: }
Execution Count:19281
19281
1043void QObject::removeEventFilter(QObject *obj) -
1044{ -
1045 QObjectPrivate * const d = d_func(); -
1046 if (d->extraData) {
evaluated: d->extraData
TRUEFALSE
yes
Evaluation Count:1092
yes
Evaluation Count:921
921-1092
1047 for (int i = 0; i < d->extraData->eventFilters.count(); ++i) {
evaluated: i < d->extraData->eventFilters.count()
TRUEFALSE
yes
Evaluation Count:1315
yes
Evaluation Count:1092
1092-1315
1048 if (d->extraData->eventFilters.at(i) == obj)
evaluated: d->extraData->eventFilters.at(i) == obj
TRUEFALSE
yes
Evaluation Count:668
yes
Evaluation Count:647
647-668
1049 d->extraData->eventFilters[i] = 0;
executed: d->extraData->eventFilters[i] = 0;
Execution Count:668
668
1050 }
executed: }
Execution Count:1315
1315
1051 }
executed: }
Execution Count:1092
1092
1052}
executed: }
Execution Count:2013
2013
1053void QObject::deleteLater() -
1054{ -
1055 QCoreApplication::postEvent(this, new QDeferredDeleteEvent()); -
1056}
executed: }
Execution Count:8432
8432
1057const int flagged_locations_count = 2; -
1058static const char* flagged_locations[flagged_locations_count] = {0}; -
1059 -
1060const char *qFlagLocation(const char *method) -
1061{ -
1062 static int idx = 0; -
1063 flagged_locations[idx] = method; -
1064 idx = (idx+1) % flagged_locations_count; -
1065 return method;
never executed: return method;
0
1066} -
1067 -
1068static int extract_code(const char *member) -
1069{ -
1070 -
1071 return (((int)(*member) - '0') & 0x3);
executed: return (((int)(*member) - '0') & 0x3);
Execution Count:810355
810355
1072} -
1073 -
1074static const char * extract_location(const char *member) -
1075{ -
1076 for (int i = 0; i < flagged_locations_count; ++i) {
never evaluated: i < flagged_locations_count
0
1077 if (member == flagged_locations[i]) {
never evaluated: member == flagged_locations[i]
0
1078 -
1079 const char *location = member + qstrlen(member) + 1; -
1080 if (*location != '\0')
never evaluated: *location != '\0'
0
1081 return location;
never executed: return location;
0
1082 return 0;
never executed: return 0;
0
1083 } -
1084 }
never executed: }
0
1085 return 0;
never executed: return 0;
0
1086} -
1087 -
1088static bool check_signal_macro(const QObject *sender, const char *signal, -
1089 const char *func, const char *op) -
1090{ -
1091 int sigcode = extract_code(signal); -
1092 if (sigcode != 2) {
partially evaluated: sigcode != 2
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:406885
0-406885
1093 if (sigcode == 1)
never evaluated: sigcode == 1
0
1094 QMessageLogger("kernel/qobject.cpp", 2047, __PRETTY_FUNCTION__).warning("QObject::%s: Attempt to %s non-signal %s::%s", 0
1095 func, op, sender->metaObject()->className(), signal+1);
never executed: QMessageLogger("kernel/qobject.cpp", 2047, __PRETTY_FUNCTION__).warning("QObject::%s: Attempt to %s non-signal %s::%s", func, op, sender->metaObject()->className(), signal+1);
0
1096 else -
1097 QMessageLogger("kernel/qobject.cpp", 2050, __PRETTY_FUNCTION__).warning("QObject::%s: Use the SIGNAL macro to %s %s::%s", 0
1098 func, op, sender->metaObject()->className(), signal);
never executed: QMessageLogger("kernel/qobject.cpp", 2050, __PRETTY_FUNCTION__).warning("QObject::%s: Use the SIGNAL macro to %s %s::%s", func, op, sender->metaObject()->className(), signal);
0
1099 return false;
never executed: return false;
0
1100 } -
1101 return true;
executed: return true;
Execution Count:406886
406886
1102} -
1103 -
1104static bool check_method_code(int code, const QObject *object, -
1105 const char *method, const char *func) -
1106{ -
1107 if (code != 1 && code != 2) {
evaluated: code != 1
TRUEFALSE
yes
Evaluation Count:12239
yes
Evaluation Count:391250
partially evaluated: code != 2
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:12239
0-391250
1108 QMessageLogger("kernel/qobject.cpp", 2061, __PRETTY_FUNCTION__).warning("QObject::%s: Use the SLOT or SIGNAL macro to " -
1109 "%s %s::%s", func, func, object->metaObject()->className(), method); -
1110 return false;
never executed: return false;
0
1111 } -
1112 return true;
executed: return true;
Execution Count:403483
403483
1113} -
1114 -
1115static void err_method_notfound(const QObject *object, -
1116 const char *method, const char *func) -
1117{ -
1118 const char *type = "method"; -
1119 switch (extract_code(method)) { -
1120 case 1: type = "slot"; break;
never executed: break;
0
1121 case 2: type = "signal"; break;
never executed: break;
0
1122 } -
1123 const char *loc = extract_location(method); -
1124 if (strchr(method,')') == 0)
never evaluated: strchr(method,')') == 0
0
1125 QMessageLogger("kernel/qobject.cpp", 2078, __PRETTY_FUNCTION__).warning("QObject::%s: Parentheses expected, %s %s::%s%s%s", 0
1126 func, type, object->metaObject()->className(), method+1, 0
1127 loc ? " in ": "", loc ? loc : "");
never executed: QMessageLogger("kernel/qobject.cpp", 2078, __PRETTY_FUNCTION__).warning("QObject::%s: Parentheses expected, %s %s::%s%s%s", func, type, object->metaObject()->className(), method+1, loc ? " in ": "", loc ? loc : "");
0
1128 else -
1129 QMessageLogger("kernel/qobject.cpp", 2082, __PRETTY_FUNCTION__).warning("QObject::%s: No such %s %s::%s%s%s", 0
1130 func, type, object->metaObject()->className(), method+1, 0
1131 loc ? " in ": "", loc ? loc : "");
never executed: QMessageLogger("kernel/qobject.cpp", 2082, __PRETTY_FUNCTION__).warning("QObject::%s: No such %s %s::%s%s%s", func, type, object->metaObject()->className(), method+1, loc ? " in ": "", loc ? loc : "");
0
1132 -
1133} -
1134 -
1135 -
1136static void err_info_about_objects(const char * func, -
1137 const QObject * sender, -
1138 const QObject * receiver) -
1139{ -
1140 QString a = sender ? sender->objectName() : QString();
never evaluated: sender
0
1141 QString b = receiver ? receiver->objectName() : QString();
never evaluated: receiver
0
1142 if (!a.isEmpty())
never evaluated: !a.isEmpty()
0
1143 QMessageLogger("kernel/qobject.cpp", 2096, __PRETTY_FUNCTION__).warning("QObject::%s: (sender name: '%s')", func, a.toLocal8Bit().data());
never executed: QMessageLogger("kernel/qobject.cpp", 2096, __PRETTY_FUNCTION__).warning("QObject::%s: (sender name: '%s')", func, a.toLocal8Bit().data());
0
1144 if (!b.isEmpty())
never evaluated: !b.isEmpty()
0
1145 QMessageLogger("kernel/qobject.cpp", 2098, __PRETTY_FUNCTION__).warning("QObject::%s: (receiver name: '%s')", func, b.toLocal8Bit().data());
never executed: QMessageLogger("kernel/qobject.cpp", 2098, __PRETTY_FUNCTION__).warning("QObject::%s: (receiver name: '%s')", func, b.toLocal8Bit().data());
0
1146}
never executed: }
0
1147QObject *QObject::sender() const -
1148{ -
1149 const QObjectPrivate * const d = d_func(); -
1150 -
1151 QMutexLocker locker(signalSlotLock(this)); -
1152 if (!d->currentSender)
evaluated: !d->currentSender
TRUEFALSE
yes
Evaluation Count:35
yes
Evaluation Count:6693
35-6693
1153 return 0;
executed: return 0;
Execution Count:35
35
1154 -
1155 for (QObjectPrivate::Connection *c = d->senders; c; c = c->next) {
evaluated: c
TRUEFALSE
yes
Evaluation Count:32039
yes
Evaluation Count:3
3-32039
1156 if (c->sender == d->currentSender->sender)
evaluated: c->sender == d->currentSender->sender
TRUEFALSE
yes
Evaluation Count:6690
yes
Evaluation Count:25349
6690-25349
1157 return d->currentSender->sender;
executed: return d->currentSender->sender;
Execution Count:6690
6690
1158 }
executed: }
Execution Count:25349
25349
1159 -
1160 return 0;
executed: return 0;
Execution Count:3
3
1161} -
1162int QObject::senderSignalIndex() const -
1163{ -
1164 const QObjectPrivate * const d = d_func(); -
1165 int signal_index = d->senderSignalIndex(); -
1166 if (signal_index < 0)
evaluated: signal_index < 0
TRUEFALSE
yes
Evaluation Count:7
yes
Evaluation Count:226
7-226
1167 return signal_index;
executed: return signal_index;
Execution Count:7
7
1168 -
1169 return QMetaObjectPrivate::signal(sender()->metaObject(), signal_index).methodIndex();
executed: return QMetaObjectPrivate::signal(sender()->metaObject(), signal_index).methodIndex();
Execution Count:226
226
1170} -
1171int QObject::receivers(const char *signal) const -
1172{ -
1173 const QObjectPrivate * const d = d_func(); -
1174 int receivers = 0; -
1175 if (signal) {
partially evaluated: signal
TRUEFALSE
yes
Evaluation Count:36
no
Evaluation Count:0
0-36
1176 QByteArray signal_name = QMetaObject::normalizedSignature(signal); -
1177 signal = signal_name; -
1178 -
1179 -
1180 -
1181 -
1182 signal++; -
1183 int signal_index = d->signalIndex(signal); -
1184 if (signal_index < 0) {
partially evaluated: signal_index < 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:36
0-36
1185 -
1186 -
1187 -
1188 return 0;
never executed: return 0;
0
1189 } -
1190 -
1191 if (!d->isSignalConnected(signal_index))
evaluated: !d->isSignalConnected(signal_index)
TRUEFALSE
yes
Evaluation Count:25
yes
Evaluation Count:11
11-25
1192 return receivers;
executed: return receivers;
Execution Count:25
25
1193 -
1194 if (d->declarativeData && QAbstractDeclarativeData::receivers) {
partially evaluated: d->declarativeData
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:11
never evaluated: QAbstractDeclarativeData::receivers
0-11
1195 receivers += QAbstractDeclarativeData::receivers(d->declarativeData, this, -
1196 signal_index); -
1197 }
never executed: }
0
1198 -
1199 QMutexLocker locker(signalSlotLock(this)); -
1200 if (d->connectionLists) {
partially evaluated: d->connectionLists
TRUEFALSE
yes
Evaluation Count:11
no
Evaluation Count:0
0-11
1201 if (signal_index < d->connectionLists->count()) {
partially evaluated: signal_index < d->connectionLists->count()
TRUEFALSE
yes
Evaluation Count:11
no
Evaluation Count:0
0-11
1202 const QObjectPrivate::Connection *c = -
1203 d->connectionLists->at(signal_index).first; -
1204 while (c) {
evaluated: c
TRUEFALSE
yes
Evaluation Count:13
yes
Evaluation Count:11
11-13
1205 receivers += c->receiver ? 1 : 0;
evaluated: c->receiver
TRUEFALSE
yes
Evaluation Count:7
yes
Evaluation Count:6
6-7
1206 c = c->nextConnectionList; -
1207 }
executed: }
Execution Count:13
13
1208 }
executed: }
Execution Count:11
11
1209 }
executed: }
Execution Count:11
11
1210 }
executed: }
Execution Count:11
11
1211 return receivers;
executed: return receivers;
Execution Count:11
11
1212} -
1213bool QObject::isSignalConnected(const QMetaMethod &signal) const -
1214{ -
1215 const QObjectPrivate * const d = d_func(); -
1216 if (!signal.mobj)
evaluated: !signal.mobj
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:24
1-24
1217 return false;
executed: return false;
Execution Count:1
1
1218 -
1219 qt_noop(); -
1220 -
1221 uint signalIndex = (signal.handle - QMetaObjectPrivate::get(signal.mobj)->methodData)/5; -
1222 -
1223 if (signal.mobj->d.data[signal.handle + 4] & MethodCloned)
evaluated: signal.mobj->d.data[signal.handle + 4] & MethodCloned
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:21
3-21
1224 signalIndex = QMetaObjectPrivate::originalClone(signal.mobj, signalIndex);
executed: signalIndex = QMetaObjectPrivate::originalClone(signal.mobj, signalIndex);
Execution Count:3
3
1225 -
1226 signalIndex += QMetaObjectPrivate::signalOffset(signal.mobj); -
1227 -
1228 if (signalIndex < sizeof(d->connectedSignals) * 8)
evaluated: signalIndex < sizeof(d->connectedSignals) * 8
TRUEFALSE
yes
Evaluation Count:20
yes
Evaluation Count:4
4-20
1229 return d->isSignalConnected(signalIndex);
executed: return d->isSignalConnected(signalIndex);
Execution Count:20
20
1230 -
1231 QMutexLocker locker(signalSlotLock(this)); -
1232 if (d->connectionLists) {
evaluated: d->connectionLists
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:1
1-3
1233 if (signalIndex < uint(d->connectionLists->count())) {
partially evaluated: signalIndex < uint(d->connectionLists->count())
TRUEFALSE
yes
Evaluation Count:3
no
Evaluation Count:0
0-3
1234 const QObjectPrivate::Connection *c = -
1235 d->connectionLists->at(signalIndex).first; -
1236 while (c) {
partially evaluated: c
TRUEFALSE
yes
Evaluation Count:3
no
Evaluation Count:0
0-3
1237 if (c->receiver)
partially evaluated: c->receiver
TRUEFALSE
yes
Evaluation Count:3
no
Evaluation Count:0
0-3
1238 return true;
executed: return true;
Execution Count:3
3
1239 c = c->nextConnectionList; -
1240 }
never executed: }
0
1241 }
never executed: }
0
1242 }
never executed: }
0
1243 return false;
executed: return false;
Execution Count:1
1
1244} -
1245void QMetaObjectPrivate::memberIndexes(const QObject *obj, -
1246 const QMetaMethod &member, -
1247 int *signalIndex, int *methodIndex) -
1248{ -
1249 *signalIndex = -1; -
1250 *methodIndex = -1; -
1251 if (!obj || !member.mobj)
evaluated: !obj
TRUEFALSE
yes
Evaluation Count:8
yes
Evaluation Count:80
evaluated: !member.mobj
TRUEFALSE
yes
Evaluation Count:9
yes
Evaluation Count:71
8-80
1252 return;
executed: return;
Execution Count:17
17
1253 const QMetaObject *m = obj->metaObject(); -
1254 -
1255 while (m != 0 && m != member.mobj)
partially evaluated: m != 0
TRUEFALSE
yes
Evaluation Count:73
no
Evaluation Count:0
evaluated: m != member.mobj
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:71
0-73
1256 m = m->d.superdata;
executed: m = m->d.superdata;
Execution Count:2
2
1257 if (!m)
partially evaluated: !m
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:71
0-71
1258 return;
never executed: return;
0
1259 *signalIndex = *methodIndex = (member.handle - get(member.mobj)->methodData)/5; -
1260 -
1261 int signalOffset; -
1262 int methodOffset; -
1263 computeOffsets(m, &signalOffset, &methodOffset); -
1264 -
1265 *methodIndex += methodOffset; -
1266 if (member.methodType() == QMetaMethod::Signal) {
evaluated: member.methodType() == QMetaMethod::Signal
TRUEFALSE
yes
Evaluation Count:36
yes
Evaluation Count:35
35-36
1267 *signalIndex = originalClone(m, *signalIndex); -
1268 *signalIndex += signalOffset; -
1269 } else {
executed: }
Execution Count:36
36
1270 *signalIndex = -1; -
1271 }
executed: }
Execution Count:35
35
1272} -
1273 -
1274static inline void check_and_warn_compat(const QMetaObject *sender, const QMetaMethod &signal, -
1275 const QMetaObject *receiver, const QMetaMethod &method) -
1276{ -
1277 if (signal.attributes() & QMetaMethod::Compatibility) {
never evaluated: signal.attributes() & QMetaMethod::Compatibility
0
1278 if (!(method.attributes() & QMetaMethod::Compatibility))
never evaluated: !(method.attributes() & QMetaMethod::Compatibility)
0
1279 QMessageLogger("kernel/qobject.cpp", 2346, __PRETTY_FUNCTION__).warning("QObject::connect: Connecting from COMPAT signal (%s::%s)", 0
1280 sender->className(), signal.methodSignature().constData());
never executed: QMessageLogger("kernel/qobject.cpp", 2346, __PRETTY_FUNCTION__).warning("QObject::connect: Connecting from COMPAT signal (%s::%s)", sender->className(), signal.methodSignature().constData());
0
1281 } else if ((method.attributes() & QMetaMethod::Compatibility) &&
never executed: }
never evaluated: (method.attributes() & QMetaMethod::Compatibility)
0
1282 method.methodType() == QMetaMethod::Signal) {
never evaluated: method.methodType() == QMetaMethod::Signal
0
1283 QMessageLogger("kernel/qobject.cpp", 2350, __PRETTY_FUNCTION__).warning("QObject::connect: Connecting from %s::%s to COMPAT slot (%s::%s)", -
1284 sender->className(), signal.methodSignature().constData(), -
1285 receiver->className(), method.methodSignature().constData()); -
1286 }
never executed: }
0
1287} -
1288QMetaObject::Connection QObject::connect(const QObject *sender, const char *signal, -
1289 const QObject *receiver, const char *method, -
1290 Qt::ConnectionType type) -
1291{ -
1292 if (sender == 0 || receiver == 0 || signal == 0 || method == 0) {
partially evaluated: sender == 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:380481
partially evaluated: receiver == 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:380480
partially evaluated: signal == 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:380481
partially evaluated: method == 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:380483
0-380483
1293 QMessageLogger("kernel/qobject.cpp", 2428, __PRETTY_FUNCTION__).warning("QObject::connect: Cannot connect %s::%s to %s::%s", -
1294 sender ? sender->metaObject()->className() : "(null)", -
1295 (signal && *signal) ? signal+1 : "(null)", -
1296 receiver ? receiver->metaObject()->className() : "(null)", -
1297 (method && *method) ? method+1 : "(null)"); -
1298 return QMetaObject::Connection(0);
never executed: return QMetaObject::Connection(0);
0
1299 } -
1300 QByteArray tmp_signal_name; -
1301 -
1302 if (!check_signal_macro(sender, signal, "connect", "bind"))
partially evaluated: !check_signal_macro(sender, signal, "connect", "bind")
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:380480
0-380480
1303 return QMetaObject::Connection(0);
never executed: return QMetaObject::Connection(0);
0
1304 const QMetaObject *smeta = sender->metaObject(); -
1305 const char *signal_arg = signal; -
1306 ++signal; -
1307 QArgumentTypeArray signalTypes; -
1308 qt_noop(); -
1309 QByteArray signalName = QMetaObjectPrivate::decodeMethodSignature(signal, signalTypes); -
1310 int signal_index = QMetaObjectPrivate::indexOfSignalRelative( -
1311 &smeta, signalName, signalTypes.size(), signalTypes.constData()); -
1312 if (signal_index < 0) {
evaluated: signal_index < 0
TRUEFALSE
yes
Evaluation Count:111
yes
Evaluation Count:380366
111-380366
1313 -
1314 tmp_signal_name = QMetaObject::normalizedSignature(signal - 1); -
1315 signal = tmp_signal_name.constData() + 1; -
1316 -
1317 signalTypes.clear(); -
1318 signalName = QMetaObjectPrivate::decodeMethodSignature(signal, signalTypes); -
1319 smeta = sender->metaObject(); -
1320 signal_index = QMetaObjectPrivate::indexOfSignalRelative( -
1321 &smeta, signalName, signalTypes.size(), signalTypes.constData()); -
1322 }
executed: }
Execution Count:111
111
1323 if (signal_index < 0) {
partially evaluated: signal_index < 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:380477
0-380477
1324 err_method_notfound(sender, signal_arg, "connect"); -
1325 err_info_about_objects("connect", sender, receiver); -
1326 return QMetaObject::Connection(0);
never executed: return QMetaObject::Connection(0);
0
1327 } -
1328 signal_index = QMetaObjectPrivate::originalClone(smeta, signal_index); -
1329 signal_index += QMetaObjectPrivate::signalOffset(smeta); -
1330 -
1331 QByteArray tmp_method_name; -
1332 int membcode = extract_code(method); -
1333 -
1334 if (!check_method_code(membcode, receiver, method, "connect"))
partially evaluated: !check_method_code(membcode, receiver, method, "connect")
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:380469
0-380469
1335 return QMetaObject::Connection(0);
never executed: return QMetaObject::Connection(0);
0
1336 const char *method_arg = method; -
1337 ++method; -
1338 -
1339 QByteArray methodName; -
1340 QArgumentTypeArray methodTypes; -
1341 const QMetaObject *rmeta = receiver->metaObject(); -
1342 int method_index_relative = -1; -
1343 qt_noop(); -
1344 switch (membcode) { -
1345 case 1: -
1346 method_index_relative = QMetaObjectPrivate::indexOfSlotRelative( -
1347 &rmeta, methodName, methodTypes.size(), methodTypes.constData()); -
1348 break;
executed: break;
Execution Count:368271
368271
1349 case 2: -
1350 method_index_relative = QMetaObjectPrivate::indexOfSignalRelative( -
1351 &rmeta, methodName, methodTypes.size(), methodTypes.constData()); -
1352 break;
executed: break;
Execution Count:12199
12199
1353 } -
1354 if (method_index_relative < 0) {
partially evaluated: method_index_relative < 0
TRUEFALSE
yes
Evaluation Count:380465
no
Evaluation Count:0
0-380465
1355 -
1356 tmp_method_name = QMetaObject::normalizedSignature(method); -
1357 method = tmp_method_name.constData(); -
1358 -
1359 methodTypes.clear(); -
1360 methodName = QMetaObjectPrivate::decodeMethodSignature(method, methodTypes); -
1361 -
1362 rmeta = receiver->metaObject(); -
1363 switch (membcode) { -
1364 case 1: -
1365 method_index_relative = QMetaObjectPrivate::indexOfSlotRelative( -
1366 &rmeta, methodName, methodTypes.size(), methodTypes.constData()); -
1367 break;
executed: break;
Execution Count:368279
368279
1368 case 2: -
1369 method_index_relative = QMetaObjectPrivate::indexOfSignalRelative( -
1370 &rmeta, methodName, methodTypes.size(), methodTypes.constData()); -
1371 break;
executed: break;
Execution Count:12196
12196
1372 } -
1373 }
executed: }
Execution Count:380473
380473
1374 -
1375 if (method_index_relative < 0) {
partially evaluated: method_index_relative < 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:380473
0-380473
1376 err_method_notfound(receiver, method_arg, "connect"); -
1377 err_info_about_objects("connect", sender, receiver); -
1378 return QMetaObject::Connection(0);
never executed: return QMetaObject::Connection(0);
0
1379 } -
1380 -
1381 if (!QMetaObjectPrivate::checkConnectArgs(signalTypes.size(), signalTypes.constData(), 1-380473
1382 methodTypes.size(), methodTypes.constData())) {
evaluated: !QMetaObjectPrivate::checkConnectArgs(signalTypes.size(), signalTypes.constData(), methodTypes.size(), methodTypes.constData())
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:380473
1-380473
1383 QMessageLogger("kernel/qobject.cpp", 2518, __PRETTY_FUNCTION__).warning("QObject::connect: Incompatible sender/receiver arguments" -
1384 "\n %s::%s --> %s::%s", -
1385 sender->metaObject()->className(), signal, -
1386 receiver->metaObject()->className(), method); -
1387 return QMetaObject::Connection(0);
executed: return QMetaObject::Connection(0);
Execution Count:1
1
1388 } -
1389 -
1390 int *types = 0; -
1391 if ((type == Qt::QueuedConnection)
evaluated: (type == Qt::QueuedConnection)
TRUEFALSE
yes
Evaluation Count:21073
yes
Evaluation Count:359397
21073-359397
1392 && !(types = queuedConnectionTypes(signalTypes.constData(), signalTypes.size()))) {
partially evaluated: !(types = queuedConnectionTypes(signalTypes.constData(), signalTypes.size()))
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:21073
0-21073
1393 return QMetaObject::Connection(0);
never executed: return QMetaObject::Connection(0);
0
1394 } -
1395 -
1396 -
1397 -
1398 -
1399 -
1400 -
1401 QMetaObject::Connection handle = QMetaObject::Connection(QMetaObjectPrivate::connect( -
1402 sender, signal_index, smeta, receiver, method_index_relative, rmeta ,type, types)); -
1403 return handle;
executed: return handle;
Execution Count:380475
380475
1404} -
1405QMetaObject::Connection QObject::connect(const QObject *sender, const QMetaMethod &signal, -
1406 const QObject *receiver, const QMetaMethod &method, -
1407 Qt::ConnectionType type) -
1408{ -
1409 if (sender == 0
partially evaluated: sender == 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:27
0-27
1410 || receiver == 0
partially evaluated: receiver == 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:27
0-27
1411 || signal.methodType() != QMetaMethod::Signal
evaluated: signal.methodType() != QMetaMethod::Signal
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:24
3-24
1412 || method.methodType() == QMetaMethod::Constructor) {
evaluated: method.methodType() == QMetaMethod::Constructor
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:23
1-23
1413 QMessageLogger("kernel/qobject.cpp", 2571, __PRETTY_FUNCTION__).warning("QObject::connect: Cannot connect %s::%s to %s::%s", -
1414 sender ? sender->metaObject()->className() : "(null)", -
1415 signal.methodSignature().constData(), -
1416 receiver ? receiver->metaObject()->className() : "(null)", -
1417 method.methodSignature().constData() ); -
1418 return QMetaObject::Connection(0);
executed: return QMetaObject::Connection(0);
Execution Count:4
4
1419 } -
1420 -
1421 int signal_index; -
1422 int method_index; -
1423 { -
1424 int dummy; -
1425 QMetaObjectPrivate::memberIndexes(sender, signal, &signal_index, &dummy); -
1426 QMetaObjectPrivate::memberIndexes(receiver, method, &dummy, &method_index); -
1427 } -
1428 -
1429 const QMetaObject *smeta = sender->metaObject(); -
1430 const QMetaObject *rmeta = receiver->metaObject(); -
1431 if (signal_index == -1) {
partially evaluated: signal_index == -1
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:23
0-23
1432 QMessageLogger("kernel/qobject.cpp", 2590, __PRETTY_FUNCTION__).warning("QObject::connect: Can't find signal %s on instance of class %s", -
1433 signal.methodSignature().constData(), smeta->className()); -
1434 return QMetaObject::Connection(0);
never executed: return QMetaObject::Connection(0);
0
1435 } -
1436 if (method_index == -1) {
partially evaluated: method_index == -1
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:23
0-23
1437 QMessageLogger("kernel/qobject.cpp", 2595, __PRETTY_FUNCTION__).warning("QObject::connect: Can't find method %s on instance of class %s", -
1438 method.methodSignature().constData(), rmeta->className()); -
1439 return QMetaObject::Connection(0);
never executed: return QMetaObject::Connection(0);
0
1440 } -
1441 -
1442 if (!QMetaObject::checkConnectArgs(signal.methodSignature().constData(), method.methodSignature().constData())) {
partially evaluated: !QMetaObject::checkConnectArgs(signal.methodSignature().constData(), method.methodSignature().constData())
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:23
0-23
1443 QMessageLogger("kernel/qobject.cpp", 2601, __PRETTY_FUNCTION__).warning("QObject::connect: Incompatible sender/receiver arguments" -
1444 "\n %s::%s --> %s::%s", -
1445 smeta->className(), signal.methodSignature().constData(), -
1446 rmeta->className(), method.methodSignature().constData()); -
1447 return QMetaObject::Connection(0);
never executed: return QMetaObject::Connection(0);
0
1448 } -
1449 -
1450 int *types = 0; -
1451 if ((type == Qt::QueuedConnection)
partially evaluated: (type == Qt::QueuedConnection)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:23
0-23
1452 && !(types = queuedConnectionTypes(signal.parameterTypes())))
never evaluated: !(types = queuedConnectionTypes(signal.parameterTypes()))
0
1453 return QMetaObject::Connection(0);
never executed: return QMetaObject::Connection(0);
0
1454 -
1455 -
1456 -
1457 -
1458 QMetaObject::Connection handle = QMetaObject::Connection(QMetaObjectPrivate::connect( -
1459 sender, signal_index, signal.enclosingMetaObject(), receiver, method_index, 0, type, types)); -
1460 return handle;
executed: return handle;
Execution Count:23
23
1461} -
1462bool QObject::disconnect(const QObject *sender, const char *signal, -
1463 const QObject *receiver, const char *method) -
1464{ -
1465 if (sender == 0 || (receiver == 0 && method != 0)) {
partially evaluated: sender == 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:34757
evaluated: receiver == 0
TRUEFALSE
yes
Evaluation Count:9998
yes
Evaluation Count:24759
partially evaluated: method != 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:9998
0-34757
1466 QMessageLogger("kernel/qobject.cpp", 2701, __PRETTY_FUNCTION__).warning("QObject::disconnect: Unexpected null parameter"); -
1467 return false;
never executed: return false;
0
1468 } -
1469 -
1470 const char *signal_arg = signal; -
1471 QByteArray signal_name; -
1472 bool signal_found = false; -
1473 if (signal) {
evaluated: signal
TRUEFALSE
yes
Evaluation Count:26406
yes
Evaluation Count:8351
8351-26406
1474 try { -
1475 signal_name = QMetaObject::normalizedSignature(signal); -
1476 signal = signal_name.constData(); -
1477 } catch (const std::bad_alloc &) {
executed: }
Execution Count:26406
26406
1478 -
1479 if (sender->metaObject()->indexOfSignal(signal + 1) == -1)
never evaluated: sender->metaObject()->indexOfSignal(signal + 1) == -1
0
1480 throw;
never executed: throw;
0
1481 }
never executed: }
0
1482 -
1483 if (!check_signal_macro(sender, signal, "disconnect", "unbind"))
partially evaluated: !check_signal_macro(sender, signal, "disconnect", "unbind")
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:26406
0-26406
1484 return false;
never executed: return false;
0
1485 signal++; -
1486 }
executed: }
Execution Count:26406
26406
1487 -
1488 QByteArray method_name; -
1489 const char *method_arg = method; -
1490 int membcode = -1; -
1491 bool method_found = false; -
1492 if (method) {
evaluated: method
TRUEFALSE
yes
Evaluation Count:23014
yes
Evaluation Count:11743
11743-23014
1493 try { -
1494 method_name = QMetaObject::normalizedSignature(method); -
1495 method = method_name.constData(); -
1496 } catch (const std::bad_alloc &) {
executed: }
Execution Count:23014
23014
1497 -
1498 if (receiver->metaObject()->indexOfMethod(method + 1) == -1)
never evaluated: receiver->metaObject()->indexOfMethod(method + 1) == -1
0
1499 throw;
never executed: throw;
0
1500 }
never executed: }
0
1501 -
1502 membcode = extract_code(method); -
1503 if (!check_method_code(membcode, receiver, method, "disconnect"))
partially evaluated: !check_method_code(membcode, receiver, method, "disconnect")
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:23014
0-23014
1504 return false;
never executed: return false;
0
1505 method++; -
1506 }
executed: }
Execution Count:23014
23014
1507 -
1508 -
1509 -
1510 -
1511 -
1512 bool res = false; -
1513 const QMetaObject *smeta = sender->metaObject(); -
1514 QByteArray signalName; -
1515 QArgumentTypeArray signalTypes; -
1516 qt_noop(); -
1517 if (signal)
evaluated: signal
TRUEFALSE
yes
Evaluation Count:26406
yes
Evaluation Count:8351
8351-26406
1518 signalName = QMetaObjectPrivate::decodeMethodSignature(signal, signalTypes);
executed: signalName = QMetaObjectPrivate::decodeMethodSignature(signal, signalTypes);
Execution Count:26406
26406
1519 QByteArray methodName; -
1520 QArgumentTypeArray methodTypes; -
1521 qt_noop(); -
1522 if (method)
evaluated: method
TRUEFALSE
yes
Evaluation Count:23014
yes
Evaluation Count:11741
11741-23014
1523 methodName = QMetaObjectPrivate::decodeMethodSignature(method, methodTypes);
executed: methodName = QMetaObjectPrivate::decodeMethodSignature(method, methodTypes);
Execution Count:23014
23014
1524 do { -
1525 int signal_index = -1; -
1526 if (signal) {
evaluated: signal
TRUEFALSE
yes
Evaluation Count:50740
yes
Evaluation Count:8349
8349-50740
1527 signal_index = QMetaObjectPrivate::indexOfSignalRelative( -
1528 &smeta, signalName, signalTypes.size(), signalTypes.constData()); -
1529 if (signal_index < 0)
evaluated: signal_index < 0
TRUEFALSE
yes
Evaluation Count:24333
yes
Evaluation Count:26407
24333-26407
1530 break;
executed: break;
Execution Count:24333
24333
1531 signal_index = QMetaObjectPrivate::originalClone(smeta, signal_index); -
1532 signal_index += QMetaObjectPrivate::signalOffset(smeta); -
1533 signal_found = true; -
1534 }
executed: }
Execution Count:26407
26407
1535 -
1536 if (!method) {
evaluated: !method
TRUEFALSE
yes
Evaluation Count:11741
yes
Evaluation Count:23015
11741-23015
1537 res |= QMetaObjectPrivate::disconnect(sender, signal_index, smeta, receiver, -1, 0); -
1538 } else {
executed: }
Execution Count:11743
11743
1539 const QMetaObject *rmeta = receiver->metaObject(); -
1540 do { -
1541 int method_index = QMetaObjectPrivate::indexOfMethod( -
1542 rmeta, methodName, methodTypes.size(), methodTypes.constData()); -
1543 if (method_index >= 0)
evaluated: method_index >= 0
TRUEFALSE
yes
Evaluation Count:23440
yes
Evaluation Count:23008
23008-23440
1544 while (method_index < rmeta->methodOffset())
evaluated: method_index < rmeta->methodOffset()
TRUEFALSE
yes
Evaluation Count:12340
yes
Evaluation Count:23440
12340-23440
1545 rmeta = rmeta->superClass();
executed: rmeta = rmeta->superClass();
Execution Count:12340
12340
1546 if (method_index < 0)
evaluated: method_index < 0
TRUEFALSE
yes
Evaluation Count:23008
yes
Evaluation Count:23440
23008-23440
1547 break;
executed: break;
Execution Count:23008
23008
1548 res |= QMetaObjectPrivate::disconnect(sender, signal_index, smeta, receiver, method_index, 0); -
1549 method_found = true; -
1550 } while ((rmeta = rmeta->superClass()));
executed: }
Execution Count:23440
evaluated: (rmeta = rmeta->superClass())
TRUEFALSE
yes
Evaluation Count:23433
yes
Evaluation Count:7
7-23440
1551 }
executed: }
Execution Count:23015
23015
1552 } while (signal && (smeta = smeta->superClass()));
evaluated: signal
TRUEFALSE
yes
Evaluation Count:26407
yes
Evaluation Count:8351
evaluated: (smeta = smeta->superClass())
TRUEFALSE
yes
Evaluation Count:24334
yes
Evaluation Count:2073
2073-26407
1553 -
1554 if (signal && !signal_found) {
evaluated: signal
TRUEFALSE
yes
Evaluation Count:26406
yes
Evaluation Count:8351
partially evaluated: !signal_found
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:26406
0-26406
1555 err_method_notfound(sender, signal_arg, "disconnect"); -
1556 err_info_about_objects("disconnect", sender, receiver); -
1557 } else if (method && !method_found) {
never executed: }
evaluated: method
TRUEFALSE
yes
Evaluation Count:23014
yes
Evaluation Count:11743
partially evaluated: !method_found
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:23014
0-23014
1558 err_method_notfound(receiver, method_arg, "disconnect"); -
1559 err_info_about_objects("disconnect", sender, receiver); -
1560 }
never executed: }
0
1561 if (res) {
evaluated: res
TRUEFALSE
yes
Evaluation Count:17917
yes
Evaluation Count:16840
16840-17917
1562 if (!signal)
evaluated: !signal
TRUEFALSE
yes
Evaluation Count:1670
yes
Evaluation Count:16247
1670-16247
1563 const_cast<QObject*>(sender)->disconnectNotify(QMetaMethod());
executed: const_cast<QObject*>(sender)->disconnectNotify(QMetaMethod());
Execution Count:1670
1670
1564 }
executed: }
Execution Count:17917
17917
1565 return res;
executed: return res;
Execution Count:34755
34755
1566} -
1567bool QObject::disconnect(const QObject *sender, const QMetaMethod &signal, -
1568 const QObject *receiver, const QMetaMethod &method) -
1569{ -
1570 if (sender == 0 || (receiver == 0 && method.mobj != 0)) {
partially evaluated: sender == 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:22
evaluated: receiver == 0
TRUEFALSE
yes
Evaluation Count:8
yes
Evaluation Count:14
partially evaluated: method.mobj != 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:8
0-22
1571 QMessageLogger("kernel/qobject.cpp", 2836, __PRETTY_FUNCTION__).warning("QObject::disconnect: Unexpected null parameter"); -
1572 return false;
never executed: return false;
0
1573 } -
1574 if (signal.mobj) {
evaluated: signal.mobj
TRUEFALSE
yes
Evaluation Count:14
yes
Evaluation Count:8
8-14
1575 if(signal.methodType() != QMetaMethod::Signal) {
evaluated: signal.methodType() != QMetaMethod::Signal
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:13
1-13
1576 QMessageLogger("kernel/qobject.cpp", 2841, __PRETTY_FUNCTION__).warning("QObject::%s: Attempt to %s non-signal %s::%s", -
1577 "disconnect","unbind", -
1578 sender->metaObject()->className(), signal.methodSignature().constData()); -
1579 return false;
executed: return false;
Execution Count:1
1
1580 } -
1581 }
executed: }
Execution Count:13
13
1582 if (method.mobj) {
evaluated: method.mobj
TRUEFALSE
yes
Evaluation Count:12
yes
Evaluation Count:9
9-12
1583 if(method.methodType() == QMetaMethod::Constructor) {
partially evaluated: method.methodType() == QMetaMethod::Constructor
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:12
0-12
1584 QMessageLogger("kernel/qobject.cpp", 2849, __PRETTY_FUNCTION__).warning("QObject::disconect: cannot use constructor as argument %s::%s", -
1585 receiver->metaObject()->className(), method.methodSignature().constData()); -
1586 return false;
never executed: return false;
0
1587 } -
1588 }
executed: }
Execution Count:12
12
1589 -
1590 -
1591 QByteArray signalSignature; -
1592 if (signal.mobj) {
evaluated: signal.mobj
TRUEFALSE
yes
Evaluation Count:13
yes
Evaluation Count:8
8-13
1593 signalSignature.reserve(signal.methodSignature().size()+1); -
1594 signalSignature.append((char)(2 + '0')); -
1595 signalSignature.append(signal.methodSignature()); -
1596 }
executed: }
Execution Count:13
13
1597 -
1598 int signal_index; -
1599 int method_index; -
1600 { -
1601 int dummy; -
1602 QMetaObjectPrivate::memberIndexes(sender, signal, &signal_index, &dummy); -
1603 QMetaObjectPrivate::memberIndexes(receiver, method, &dummy, &method_index); -
1604 } -
1605 -
1606 -
1607 if (signal.mobj && signal_index == -1) {
evaluated: signal.mobj
TRUEFALSE
yes
Evaluation Count:13
yes
Evaluation Count:8
partially evaluated: signal_index == -1
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:13
0-13
1608 QMessageLogger("kernel/qobject.cpp", 2873, __PRETTY_FUNCTION__).warning("QObject::disconect: signal %s not found on class %s", -
1609 signal.methodSignature().constData(), sender->metaObject()->className()); -
1610 return false;
never executed: return false;
0
1611 } -
1612 -
1613 if (receiver && method.mobj && method_index == -1) {
evaluated: receiver
TRUEFALSE
yes
Evaluation Count:13
yes
Evaluation Count:8
evaluated: method.mobj
TRUEFALSE
yes
Evaluation Count:12
yes
Evaluation Count:1
partially evaluated: method_index == -1
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:12
0-13
1614 QMessageLogger("kernel/qobject.cpp", 2879, __PRETTY_FUNCTION__).warning("QObject::disconect: method %s not found on class %s", -
1615 method.methodSignature().constData(), receiver->metaObject()->className()); -
1616 return false;
never executed: return false;
0
1617 } -
1618 -
1619 if (!QMetaObjectPrivate::disconnect(sender, signal_index, signal.mobj, receiver, method_index, 0))
evaluated: !QMetaObjectPrivate::disconnect(sender, signal_index, signal.mobj, receiver, method_index, 0)
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:20
1-20
1620 return false;
executed: return false;
Execution Count:1
1
1621 -
1622 if (!signal.isValid()) {
evaluated: !signal.isValid()
TRUEFALSE
yes
Evaluation Count:8
yes
Evaluation Count:12
8-12
1623 -
1624 -
1625 -
1626 -
1627 const_cast<QObject*>(sender)->disconnectNotify(signal); -
1628 }
executed: }
Execution Count:8
8
1629 return true;
executed: return true;
Execution Count:20
20
1630} -
1631void QObject::connectNotify(const QMetaMethod &signal) -
1632{ -
1633 (void)signal;; -
1634}
executed: }
Execution Count:488525
488525
1635void QObject::disconnectNotify(const QMetaMethod &signal) -
1636{ -
1637 (void)signal;; -
1638}
executed: }
Execution Count:257189
257189
1639 -
1640 -
1641 -
1642 -
1643 -
1644static int methodIndexToSignalIndex(const QMetaObject **base, int signal_index) -
1645{ -
1646 if (signal_index < 0)
evaluated: signal_index < 0
TRUEFALSE
yes
Evaluation Count:156
yes
Evaluation Count:207481
156-207481
1647 return signal_index;
executed: return signal_index;
Execution Count:156
156
1648 const QMetaObject *metaObject = *base; -
1649 while (metaObject && metaObject->methodOffset() > signal_index)
partially evaluated: metaObject
TRUEFALSE
yes
Evaluation Count:415082
no
Evaluation Count:0
evaluated: metaObject->methodOffset() > signal_index
TRUEFALSE
yes
Evaluation Count:207601
yes
Evaluation Count:207481
0-415082
1650 metaObject = metaObject->superClass();
executed: metaObject = metaObject->superClass();
Execution Count:207601
207601
1651 -
1652 if (metaObject) {
partially evaluated: metaObject
TRUEFALSE
yes
Evaluation Count:207481
no
Evaluation Count:0
0-207481
1653 int signalOffset, methodOffset; -
1654 computeOffsets(metaObject, &signalOffset, &methodOffset); -
1655 if (signal_index < metaObject->methodCount())
evaluated: signal_index < metaObject->methodCount()
TRUEFALSE
yes
Evaluation Count:207479
yes
Evaluation Count:2
2-207479
1656 signal_index = QMetaObjectPrivate::originalClone(metaObject, signal_index - methodOffset) + signalOffset;
executed: signal_index = QMetaObjectPrivate::originalClone(metaObject, signal_index - methodOffset) + signalOffset;
Execution Count:207479
207479
1657 else -
1658 signal_index = signal_index - methodOffset + signalOffset;
executed: signal_index = signal_index - methodOffset + signalOffset;
Execution Count:2
2
1659 *base = metaObject; -
1660 }
executed: }
Execution Count:207481
207481
1661 return signal_index;
executed: return signal_index;
Execution Count:207481
207481
1662} -
1663QMetaObject::Connection QMetaObject::connect(const QObject *sender, int signal_index, -
1664 const QObject *receiver, int method_index, int type, int *types) -
1665{ -
1666 const QMetaObject *smeta = sender->metaObject(); -
1667 signal_index = methodIndexToSignalIndex(&smeta, signal_index); -
1668 return Connection(QMetaObjectPrivate::connect(sender, signal_index, smeta, 106898
1669 receiver, method_index, 106898
1670 0, 106898
1671 type, types));
executed: return Connection(QMetaObjectPrivate::connect(sender, signal_index, smeta, receiver, method_index, 0, type, types));
Execution Count:106898
106898
1672} -
1673QObjectPrivate::Connection *QMetaObjectPrivate::connect(const QObject *sender, -
1674 int signal_index, const QMetaObject *smeta, -
1675 const QObject *receiver, int method_index, -
1676 const QMetaObject *rmeta, int type, int *types) -
1677{ -
1678 QObject *s = const_cast<QObject *>(sender); -
1679 QObject *r = const_cast<QObject *>(receiver); -
1680 -
1681 int method_offset = rmeta ? rmeta->methodOffset() : 0;
evaluated: rmeta
TRUEFALSE
yes
Evaluation Count:380472
yes
Evaluation Count:106937
106937-380472
1682 qt_noop(); -
1683 QObjectPrivate::StaticMetaCallFunction callFunction = -
1684 rmeta ? rmeta->d.static_metacall : 0;
evaluated: rmeta
TRUEFALSE
yes
Evaluation Count:380473
yes
Evaluation Count:106937
106937-380473
1685 -
1686 QOrderedMutexLocker locker(signalSlotLock(sender), -
1687 signalSlotLock(receiver)); -
1688 -
1689 if (type & Qt::UniqueConnection) {
evaluated: type & Qt::UniqueConnection
TRUEFALSE
yes
Evaluation Count:4424
yes
Evaluation Count:482996
4424-482996
1690 QObjectConnectionListVector *connectionLists = QObjectPrivate::get(s)->connectionLists; -
1691 if (connectionLists && connectionLists->count() > signal_index) {
evaluated: connectionLists
TRUEFALSE
yes
Evaluation Count:2464
yes
Evaluation Count:1960
evaluated: connectionLists->count() > signal_index
TRUEFALSE
yes
Evaluation Count:2127
yes
Evaluation Count:337
337-2464
1692 const QObjectPrivate::Connection *c2 = -
1693 (*connectionLists)[signal_index].first; -
1694 -
1695 int method_index_absolute = method_index + method_offset; -
1696 -
1697 while (c2) {
evaluated: c2
TRUEFALSE
yes
Evaluation Count:1303
yes
Evaluation Count:1017
1017-1303
1698 if (c2->receiver == receiver && c2->method() == method_index_absolute)
evaluated: c2->receiver == receiver
TRUEFALSE
yes
Evaluation Count:1112
yes
Evaluation Count:191
evaluated: c2->method() == method_index_absolute
TRUEFALSE
yes
Evaluation Count:1110
yes
Evaluation Count:2
2-1112
1699 return 0;
executed: return 0;
Execution Count:1110
1110
1700 c2 = c2->nextConnectionList; -
1701 }
executed: }
Execution Count:193
193
1702 }
executed: }
Execution Count:1017
1017
1703 type &= Qt::UniqueConnection - 1; -
1704 }
executed: }
Execution Count:3314
3314
1705 -
1706 QScopedPointer<QObjectPrivate::Connection> c(new QObjectPrivate::Connection); -
1707 c->sender = s; -
1708 c->signal_index = signal_index; -
1709 c->receiver = r; -
1710 c->method_relative = method_index; -
1711 c->method_offset = method_offset; -
1712 c->connectionType = type; -
1713 c->isSlotObject = false; -
1714 c->argumentTypes.store(types); -
1715 c->nextConnectionList = 0; -
1716 c->callFunction = callFunction; -
1717 -
1718 QObjectPrivate::get(s)->addConnection(signal_index, c.data()); -
1719 -
1720 locker.unlock(); -
1721 QMetaMethod smethod = QMetaObjectPrivate::signal(smeta, signal_index); -
1722 if (smethod.isValid())
evaluated: smethod.isValid()
TRUEFALSE
yes
Evaluation Count:486165
yes
Evaluation Count:135
135-486165
1723 s->connectNotify(smethod);
executed: s->connectNotify(smethod);
Execution Count:486166
486166
1724 -
1725 return c.take();
executed: return c.take();
Execution Count:486299
486299
1726} -
1727 -
1728 -
1729 -
1730 -
1731bool QMetaObject::disconnect(const QObject *sender, int signal_index, -
1732 const QObject *receiver, int method_index) -
1733{ -
1734 const QMetaObject *smeta = sender->metaObject(); -
1735 signal_index = methodIndexToSignalIndex(&smeta, signal_index); -
1736 return QMetaObjectPrivate::disconnect(sender, signal_index, smeta, 100733
1737 receiver, method_index, 0);
executed: return QMetaObjectPrivate::disconnect(sender, signal_index, smeta, receiver, method_index, 0);
Execution Count:100733
100733
1738} -
1739bool QMetaObject::disconnectOne(const QObject *sender, int signal_index, -
1740 const QObject *receiver, int method_index) -
1741{ -
1742 const QMetaObject *smeta = sender->metaObject(); -
1743 signal_index = methodIndexToSignalIndex(&smeta, signal_index); -
1744 return QMetaObjectPrivate::disconnect(sender, signal_index, smeta, 6
1745 receiver, method_index, 0, 6
1746 QMetaObjectPrivate::DisconnectOne);
executed: return QMetaObjectPrivate::disconnect(sender, signal_index, smeta, receiver, method_index, 0, QMetaObjectPrivate::DisconnectOne);
Execution Count:6
6
1747} -
1748 -
1749 -
1750 -
1751 -
1752 -
1753bool QMetaObjectPrivate::disconnectHelper(QObjectPrivate::Connection *c, -
1754 const QObject *receiver, int method_index, void **slot, -
1755 QMutex *senderMutex, DisconnectType disconnectType) -
1756{ -
1757 bool success = false; -
1758 while (c) {
evaluated: c
TRUEFALSE
yes
Evaluation Count:148305
yes
Evaluation Count:136283
136283-148305
1759 if (c->receiver
evaluated: c->receiver
TRUEFALSE
yes
Evaluation Count:143183
yes
Evaluation Count:5122
5122-143183
1760 && (receiver == 0 || (c->receiver == receiver
evaluated: receiver == 0
TRUEFALSE
yes
Evaluation Count:67
yes
Evaluation Count:143116
evaluated: c->receiver == receiver
TRUEFALSE
yes
Evaluation Count:122827
yes
Evaluation Count:20289
67-143116
1761 && (method_index < 0 || c->method() == method_index)
evaluated: method_index < 0
TRUEFALSE
yes
Evaluation Count:4663
yes
Evaluation Count:118164
evaluated: c->method() == method_index
TRUEFALSE
yes
Evaluation Count:116498
yes
Evaluation Count:1666
1666-118164
1762 && (slot == 0 || (c->isSlotObject && c->slotObj->compare(slot)))))) {
evaluated: slot == 0
TRUEFALSE
yes
Evaluation Count:121157
yes
Evaluation Count:4
partially evaluated: c->isSlotObject
TRUEFALSE
yes
Evaluation Count:4
no
Evaluation Count:0
partially evaluated: c->slotObj->compare(slot)
TRUEFALSE
yes
Evaluation Count:4
no
Evaluation Count:0
0-121157
1763 bool needToUnlock = false; -
1764 QMutex *receiverMutex = 0; -
1765 if (!receiver) {
evaluated: !receiver
TRUEFALSE
yes
Evaluation Count:67
yes
Evaluation Count:121161
67-121161
1766 receiverMutex = signalSlotLock(c->receiver); -
1767 -
1768 needToUnlock = QOrderedMutexLocker::relock(senderMutex, receiverMutex); -
1769 }
executed: }
Execution Count:67
67
1770 if (c->receiver) {
partially evaluated: c->receiver
TRUEFALSE
yes
Evaluation Count:121228
no
Evaluation Count:0
0-121228
1771 *c->prev = c->next; -
1772 if (c->next)
evaluated: c->next
TRUEFALSE
yes
Evaluation Count:22812
yes
Evaluation Count:98416
22812-98416
1773 c->next->prev = c->prev;
executed: c->next->prev = c->prev;
Execution Count:22812
22812
1774 }
executed: }
Execution Count:121228
121228
1775 -
1776 if (needToUnlock)
evaluated: needToUnlock
TRUEFALSE
yes
Evaluation Count:50
yes
Evaluation Count:121178
50-121178
1777 receiverMutex->unlock();
executed: receiverMutex->unlock();
Execution Count:50
50
1778 -
1779 c->receiver = 0; -
1780 -
1781 success = true; -
1782 -
1783 if (disconnectType == DisconnectOne)
evaluated: disconnectType == DisconnectOne
TRUEFALSE
yes
Evaluation Count:4
yes
Evaluation Count:121224
4-121224
1784 return success;
executed: return success;
Execution Count:4
4
1785 }
executed: }
Execution Count:121224
121224
1786 c = c->nextConnectionList; -
1787 }
executed: }
Execution Count:148301
148301
1788 return success;
executed: return success;
Execution Count:136283
136283
1789} -
1790 -
1791 -
1792 -
1793 -
1794 -
1795bool QMetaObjectPrivate::disconnect(const QObject *sender, -
1796 int signal_index, const QMetaObject *smeta, -
1797 const QObject *receiver, int method_index, void **slot, -
1798 DisconnectType disconnectType) -
1799{ -
1800 if (!sender)
partially evaluated: !sender
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:135950
0-135950
1801 return false;
never executed: return false;
0
1802 -
1803 QObject *s = const_cast<QObject *>(sender); -
1804 -
1805 QMutex *senderMutex = signalSlotLock(sender); -
1806 QMutex *receiverMutex = receiver ? signalSlotLock(receiver) : 0;
evaluated: receiver
TRUEFALSE
yes
Evaluation Count:125945
yes
Evaluation Count:10005
10005-125945
1807 QOrderedMutexLocker locker(senderMutex, receiverMutex); -
1808 -
1809 QObjectConnectionListVector *connectionLists = QObjectPrivate::get(s)->connectionLists; -
1810 if (!connectionLists)
evaluated: !connectionLists
TRUEFALSE
yes
Evaluation Count:6751
yes
Evaluation Count:129201
6751-129201
1811 return false;
executed: return false;
Execution Count:6751
6751
1812 -
1813 -
1814 ++connectionLists->inUse; -
1815 -
1816 bool success = false; -
1817 if (signal_index < 0) {
evaluated: signal_index < 0
TRUEFALSE
yes
Evaluation Count:1717
yes
Evaluation Count:127484
1717-127484
1818 -
1819 for (int sig_index = -1; sig_index < connectionLists->count(); ++sig_index) {
evaluated: sig_index < connectionLists->count()
TRUEFALSE
yes
Evaluation Count:14550
yes
Evaluation Count:1717
1717-14550
1820 QObjectPrivate::Connection *c = -
1821 (*connectionLists)[sig_index].first; -
1822 if (disconnectHelper(c, receiver, method_index, slot, senderMutex, disconnectType)) {
evaluated: disconnectHelper(c, receiver, method_index, slot, senderMutex, disconnectType)
TRUEFALSE
yes
Evaluation Count:4280
yes
Evaluation Count:10270
4280-10270
1823 success = true; -
1824 connectionLists->dirty = true; -
1825 }
executed: }
Execution Count:4280
4280
1826 }
executed: }
Execution Count:14550
14550
1827 } else if (signal_index < connectionLists->count()) {
executed: }
Execution Count:1717
evaluated: signal_index < connectionLists->count()
TRUEFALSE
yes
Evaluation Count:121737
yes
Evaluation Count:5747
1717-121737
1828 QObjectPrivate::Connection *c = -
1829 (*connectionLists)[signal_index].first; -
1830 if (disconnectHelper(c, receiver, method_index, slot, senderMutex, disconnectType)) {
evaluated: disconnectHelper(c, receiver, method_index, slot, senderMutex, disconnectType)
TRUEFALSE
yes
Evaluation Count:116593
yes
Evaluation Count:5144
5144-116593
1831 success = true; -
1832 connectionLists->dirty = true; -
1833 }
executed: }
Execution Count:116593
116593
1834 }
executed: }
Execution Count:121737
121737
1835 -
1836 --connectionLists->inUse; -
1837 qt_noop(); -
1838 if (connectionLists->orphaned && !connectionLists->inUse)
partially evaluated: connectionLists->orphaned
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:129201
never evaluated: !connectionLists->inUse
0-129201
1839 delete connectionLists;
never executed: delete connectionLists;
0
1840 -
1841 locker.unlock(); -
1842 if (success) {
evaluated: success
TRUEFALSE
yes
Evaluation Count:118274
yes
Evaluation Count:10927
10927-118274
1843 QMetaMethod smethod = QMetaObjectPrivate::signal(smeta, signal_index); -
1844 if (smethod.isValid())
evaluated: smethod.isValid()
TRUEFALSE
yes
Evaluation Count:116593
yes
Evaluation Count:1681
1681-116593
1845 s->disconnectNotify(smethod);
executed: s->disconnectNotify(smethod);
Execution Count:116593
116593
1846 }
executed: }
Execution Count:118274
118274
1847 -
1848 return success;
executed: return success;
Execution Count:129201
129201
1849} -
1850void QMetaObject::connectSlotsByName(QObject *o) -
1851{ -
1852 if (!o)
partially evaluated: !o
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:203
0-203
1853 return;
never executed: return;
0
1854 const QMetaObject *mo = o->metaObject(); -
1855 qt_noop(); -
1856 const QObjectList list = o->findChildren<QObject *>(QString()); -
1857 for (int i = 0; i < mo->methodCount(); ++i) {
evaluated: i < mo->methodCount()
TRUEFALSE
yes
Evaluation Count:12945
yes
Evaluation Count:203
203-12945
1858 QByteArray slotSignature = mo->method(i).methodSignature(); -
1859 const char *slot = slotSignature.constData(); -
1860 qt_noop(); -
1861 if (slot[0] != 'o' || slot[1] != 'n' || slot[2] != '_')
evaluated: slot[0] != 'o'
TRUEFALSE
yes
Evaluation Count:12527
yes
Evaluation Count:418
evaluated: slot[1] != 'n'
TRUEFALSE
yes
Evaluation Count:394
yes
Evaluation Count:24
evaluated: slot[2] != '_'
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:23
1-12527
1862 continue;
executed: continue;
Execution Count:12922
12922
1863 bool foundIt = false; -
1864 for(int j = 0; j < list.count(); ++j) {
evaluated: j < list.count()
TRUEFALSE
yes
Evaluation Count:26
yes
Evaluation Count:7
7-26
1865 const QObject *co = list.at(j); -
1866 QByteArray objName = co->objectName().toLatin1(); -
1867 int len = objName.length(); -
1868 if (!len || qstrncmp(slot + 3, objName.data(), len) || slot[len+3] != '_')
partially evaluated: !len
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:26
evaluated: qstrncmp(slot + 3, objName.data(), len)
TRUEFALSE
yes
Evaluation Count:10
yes
Evaluation Count:16
partially evaluated: slot[len+3] != '_'
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:16
0-26
1869 continue;
executed: continue;
Execution Count:10
10
1870 const QMetaObject *smeta; -
1871 int sigIndex = co->d_func()->signalIndex(slot + len + 4, &smeta); -
1872 if (sigIndex < 0) {
evaluated: sigIndex < 0
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:15
1-15
1873 const QMetaObject *smo = co->metaObject(); -
1874 int slotlen = qstrlen(slot + len + 4) - 1; -
1875 for (int k = 0; k < QMetaObjectPrivate::absoluteSignalCount(smo); ++k) {
partially evaluated: k < QMetaObjectPrivate::absoluteSignalCount(smo)
TRUEFALSE
yes
Evaluation Count:7
no
Evaluation Count:0
0-7
1876 QMetaMethod method = QMetaObjectPrivate::signal(smo, k); -
1877 if (!qstrncmp(method.methodSignature().constData(), slot + len + 4, slotlen)) {
evaluated: !qstrncmp(method.methodSignature().constData(), slot + len + 4, slotlen)
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:6
1-6
1878 smeta = method.enclosingMetaObject(); -
1879 sigIndex = k; -
1880 break;
executed: break;
Execution Count:1
1
1881 } -
1882 }
executed: }
Execution Count:6
6
1883 }
executed: }
Execution Count:1
1
1884 if (sigIndex < 0)
partially evaluated: sigIndex < 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:16
0-16
1885 continue;
never executed: continue;
0
1886 -
1887 if (Connection(QMetaObjectPrivate::connect(co, sigIndex, smeta, o, i))) {
partially evaluated: Connection(QMetaObjectPrivate::connect(co, sigIndex, smeta, o, i))
TRUEFALSE
yes
Evaluation Count:16
no
Evaluation Count:0
0-16
1888 foundIt = true; -
1889 break;
executed: break;
Execution Count:16
16
1890 } -
1891 }
never executed: }
0
1892 if (foundIt) {
evaluated: foundIt
TRUEFALSE
yes
Evaluation Count:16
yes
Evaluation Count:7
7-16
1893 -
1894 while (mo->method(i + 1).attributes() & QMetaMethod::Cloned)
evaluated: mo->method(i + 1).attributes() & QMetaMethod::Cloned
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:16
3-16
1895 ++i;
executed: ++i;
Execution Count:3
3
1896 } else if (!(mo->method(i).attributes() & QMetaMethod::Cloned)) {
executed: }
Execution Count:16
evaluated: !(mo->method(i).attributes() & QMetaMethod::Cloned)
TRUEFALSE
yes
Evaluation Count:5
yes
Evaluation Count:2
2-16
1897 QMessageLogger("kernel/qobject.cpp", 3271, __PRETTY_FUNCTION__).warning("QMetaObject::connectSlotsByName: No matching signal for %s", slot); -
1898 }
executed: }
Execution Count:5
5
1899 } -
1900}
executed: }
Execution Count:203
203
1901 -
1902 -
1903 -
1904 -
1905 -
1906 -
1907static void queued_activate(QObject *sender, int signal, QObjectPrivate::Connection *c, void **argv) -
1908{ -
1909 const int *argumentTypes = c->argumentTypes.load(); -
1910 if (!argumentTypes && argumentTypes != &DIRECT_CONNECTION_ONLY) {
evaluated: !argumentTypes
TRUEFALSE
yes
Evaluation Count:1780
yes
Evaluation Count:23174
partially evaluated: argumentTypes != &DIRECT_CONNECTION_ONLY
TRUEFALSE
yes
Evaluation Count:1780
no
Evaluation Count:0
0-23174
1911 QMetaMethod m = QMetaObjectPrivate::signal(sender->metaObject(), signal); -
1912 argumentTypes = queuedConnectionTypes(m.parameterTypes()); -
1913 if (!argumentTypes)
partially evaluated: !argumentTypes
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1780
0-1780
1914 argumentTypes = &DIRECT_CONNECTION_ONLY;
never executed: argumentTypes = &DIRECT_CONNECTION_ONLY;
0
1915 if (!c->argumentTypes.testAndSetOrdered(0, argumentTypes)) {
partially evaluated: !c->argumentTypes.testAndSetOrdered(0, argumentTypes)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1780
0-1780
1916 if (argumentTypes != &DIRECT_CONNECTION_ONLY)
never evaluated: argumentTypes != &DIRECT_CONNECTION_ONLY
0
1917 delete [] argumentTypes;
never executed: delete [] argumentTypes;
0
1918 argumentTypes = c->argumentTypes.load(); -
1919 }
never executed: }
0
1920 }
executed: }
Execution Count:1780
1780
1921 if (argumentTypes == &DIRECT_CONNECTION_ONLY)
partially evaluated: argumentTypes == &DIRECT_CONNECTION_ONLY
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:24954
0-24954
1922 return;
never executed: return;
0
1923 int nargs = 1; -
1924 while (argumentTypes[nargs-1])
evaluated: argumentTypes[nargs-1]
TRUEFALSE
yes
Evaluation Count:35745
yes
Evaluation Count:24954
24954-35745
1925 ++nargs;
executed: ++nargs;
Execution Count:35745
35745
1926 int *types = (int *) malloc(nargs*sizeof(int)); -
1927 do { if (!(types)) qBadAlloc(); } while (0);
never executed: qBadAlloc();
executed: }
Execution Count:24954
partially evaluated: !(types)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:24954
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:24954
0-24954
1928 void **args = (void **) malloc(nargs*sizeof(void *)); -
1929 do { if (!(args)) qBadAlloc(); } while (0);
never executed: qBadAlloc();
executed: }
Execution Count:24954
partially evaluated: !(args)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:24954
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:24954
0-24954
1930 types[0] = 0; -
1931 args[0] = 0; -
1932 for (int n = 1; n < nargs; ++n)
evaluated: n < nargs
TRUEFALSE
yes
Evaluation Count:35745
yes
Evaluation Count:24954
24954-35745
1933 args[n] = QMetaType::create((types[n] = argumentTypes[n-1]), argv[n]);
executed: args[n] = QMetaType::create((types[n] = argumentTypes[n-1]), argv[n]);
Execution Count:35745
35745
1934 QMetaCallEvent *ev = c->isSlotObject ?
evaluated: c->isSlotObject
TRUEFALSE
yes
Evaluation Count:15
yes
Evaluation Count:24939
15-24939
1935 new QMetaCallEvent(c->slotObj, sender, signal, nargs, types, args) : -
1936 new QMetaCallEvent(c->method_offset, c->method_relative, c->callFunction, sender, signal, nargs, types, args); -
1937 QCoreApplication::postEvent(c->receiver, ev); -
1938}
executed: }
Execution Count:24954
24954
1939 -
1940 -
1941 -
1942 -
1943void QMetaObject::activate(QObject *sender, const QMetaObject *m, int local_signal_index, -
1944 void **argv) -
1945{ -
1946 activate(sender, QMetaObjectPrivate::signalOffset(m), local_signal_index, argv); -
1947}
executed: }
Execution Count:20609033
20609033
1948 -
1949 -
1950 -
1951 -
1952void QMetaObject::activate(QObject *sender, int signalOffset, int local_signal_index, void **argv) -
1953{ -
1954 int signal_index = signalOffset + local_signal_index; -
1955 -
1956 if (!sender->d_func()->isSignalConnected(signal_index))
evaluated: !sender->d_func()->isSignalConnected(signal_index)
TRUEFALSE
yes
Evaluation Count:12917625
yes
Evaluation Count:7691301
7691301-12917625
1957 return;
executed: return;
Execution Count:12917631
12917631
1958 -
1959 if (sender->d_func()->blockSig)
evaluated: sender->d_func()->blockSig
TRUEFALSE
yes
Evaluation Count:38011
yes
Evaluation Count:7653290
38011-7653290
1960 return;
executed: return;
Execution Count:38011
38011
1961 -
1962 if (sender->d_func()->declarativeData && QAbstractDeclarativeData::signalEmitted)
partially evaluated: sender->d_func()->declarativeData
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:7653288
never evaluated: QAbstractDeclarativeData::signalEmitted
0-7653288
1963 QAbstractDeclarativeData::signalEmitted(sender->d_func()->declarativeData, sender, 0
1964 signal_index, argv);
never executed: QAbstractDeclarativeData::signalEmitted(sender->d_func()->declarativeData, sender, signal_index, argv);
0
1965 -
1966 void *empty_argv[] = { 0 }; -
1967 if (qt_signal_spy_callback_set.signal_begin_callback != 0) {
partially evaluated: qt_signal_spy_callback_set.signal_begin_callback != 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:7653287
0-7653287
1968 qt_signal_spy_callback_set.signal_begin_callback(sender, signal_index, -
1969 argv ? argv : empty_argv); -
1970 }
never executed: }
0
1971 -
1972 Qt::HANDLE currentThreadId = QThread::currentThreadId(); -
1973 -
1974 { -
1975 QMutexLocker locker(signalSlotLock(sender)); -
1976 struct ConnectionListsRef { -
1977 QObjectConnectionListVector *connectionLists; -
1978 ConnectionListsRef(QObjectConnectionListVector *connectionLists) : connectionLists(connectionLists) -
1979 { -
1980 if (connectionLists)
evaluated: connectionLists
TRUEFALSE
yes
Evaluation Count:7652687
yes
Evaluation Count:619
619-7652687
1981 ++connectionLists->inUse;
executed: ++connectionLists->inUse;
Execution Count:7652685
7652685
1982 }
executed: }
Execution Count:7653300
7653300
1983 ~ConnectionListsRef() -
1984 { -
1985 if (!connectionLists)
evaluated: !connectionLists
TRUEFALSE
yes
Evaluation Count:619
yes
Evaluation Count:7652632
619-7652632
1986 return;
executed: return;
Execution Count:619
619
1987 -
1988 --connectionLists->inUse; -
1989 qt_noop(); -
1990 if (connectionLists->orphaned) {
evaluated: connectionLists->orphaned
TRUEFALSE
yes
Evaluation Count:75
yes
Evaluation Count:7652557
75-7652557
1991 if (!connectionLists->inUse)
evaluated: !connectionLists->inUse
TRUEFALSE
yes
Evaluation Count:74
yes
Evaluation Count:1
1-74
1992 delete connectionLists;
executed: delete connectionLists;
Execution Count:74
74
1993 }
executed: }
Execution Count:75
75
1994 }
executed: }
Execution Count:7652635
7652635
1995 -
1996 QObjectConnectionListVector *operator->() const { return connectionLists; }
executed: return connectionLists;
Execution Count:54241509
54241509
1997 }; -
1998 ConnectionListsRef connectionLists = sender->d_func()->connectionLists; -
1999 if (!connectionLists.connectionLists) {
evaluated: !connectionLists.connectionLists
TRUEFALSE
yes
Evaluation Count:619
yes
Evaluation Count:7652682
619-7652682
2000 locker.unlock(); -
2001 if (qt_signal_spy_callback_set.signal_end_callback != 0)
partially evaluated: qt_signal_spy_callback_set.signal_end_callback != 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:619
0-619
2002 qt_signal_spy_callback_set.signal_end_callback(sender, signal_index);
never executed: qt_signal_spy_callback_set.signal_end_callback(sender, signal_index);
0
2003 return;
executed: return;
Execution Count:619
619
2004 } -
2005 -
2006 const QObjectPrivate::ConnectionList *list; -
2007 if (signal_index < connectionLists->count())
evaluated: signal_index < connectionLists->count()
TRUEFALSE
yes
Evaluation Count:7652448
yes
Evaluation Count:206
206-7652448
2008 list = &connectionLists->at(signal_index);
executed: list = &connectionLists->at(signal_index);
Execution Count:7652452
7652452
2009 else -
2010 list = &connectionLists->allsignals;
executed: list = &connectionLists->allsignals;
Execution Count:206
206
2011 -
2012 do { -
2013 QObjectPrivate::Connection *c = list->first; -
2014 if (!c) continue;
executed: continue;
Execution Count:7652418
evaluated: !c
TRUEFALSE
yes
Evaluation Count:7652421
yes
Evaluation Count:7652579
7652418-7652579
2015 -
2016 -
2017 QObjectPrivate::Connection *last = list->last; -
2018 -
2019 do { -
2020 if (!c->receiver)
evaluated: !c->receiver
TRUEFALSE
yes
Evaluation Count:38874
yes
Evaluation Count:8352307
38874-8352307
2021 continue;
executed: continue;
Execution Count:38874
38874
2022 -
2023 QObject * const receiver = c->receiver; -
2024 const bool receiverInSameThread = currentThreadId == receiver->d_func()->threadData->threadId; -
2025 -
2026 -
2027 -
2028 if ((c->connectionType == Qt::AutoConnection && !receiverInSameThread)
evaluated: c->connectionType == Qt::AutoConnection
TRUEFALSE
yes
Evaluation Count:8305468
yes
Evaluation Count:46864
evaluated: !receiverInSameThread
TRUEFALSE
yes
Evaluation Count:7443
yes
Evaluation Count:8298028
7443-8305468
2029 || (c->connectionType == Qt::QueuedConnection)) {
evaluated: (c->connectionType == Qt::QueuedConnection)
TRUEFALSE
yes
Evaluation Count:17511
yes
Evaluation Count:8327362
17511-8327362
2030 queued_activate(sender, signal_index, c, argv ? argv : empty_argv); -
2031 continue;
executed: continue;
Execution Count:24954
24954
2032 -
2033 } else if (c->connectionType == Qt::BlockingQueuedConnection) {
evaluated: c->connectionType == Qt::BlockingQueuedConnection
TRUEFALSE
yes
Evaluation Count:544
yes
Evaluation Count:8326817
544-8326817
2034 locker.unlock(); -
2035 if (receiverInSameThread) {
partially evaluated: receiverInSameThread
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:544
0-544
2036 QMessageLogger("kernel/qobject.cpp", 3410, __PRETTY_FUNCTION__).warning("Qt: Dead lock detected while activating a BlockingQueuedConnection: " -
2037 "Sender is %s(%p), receiver is %s(%p)", -
2038 sender->metaObject()->className(), sender, -
2039 receiver->metaObject()->className(), receiver); -
2040 }
never executed: }
0
2041 QSemaphore semaphore; -
2042 QMetaCallEvent *ev = c->isSlotObject ?
evaluated: c->isSlotObject
TRUEFALSE
yes
Evaluation Count:52
yes
Evaluation Count:492
52-492
2043 new QMetaCallEvent(c->slotObj, sender, signal_index, 0, 0, argv ? argv : empty_argv, &semaphore) : -
2044 new QMetaCallEvent(c->method_offset, c->method_relative, c->callFunction, sender, signal_index, 0, 0, argv ? argv : empty_argv, &semaphore); -
2045 QCoreApplication::postEvent(receiver, ev); -
2046 semaphore.acquire(); -
2047 locker.relock(); -
2048 continue;
executed: continue;
Execution Count:544
544
2049 -
2050 } -
2051 -
2052 QConnectionSenderSwitcher sw; -
2053 -
2054 if (receiverInSameThread) {
evaluated: receiverInSameThread
TRUEFALSE
yes
Evaluation Count:8326713
yes
Evaluation Count:105
105-8326713
2055 sw.switchSender(receiver, sender, signal_index); -
2056 }
executed: }
Execution Count:8326713
8326713
2057 const QObjectPrivate::StaticMetaCallFunction callFunction = c->callFunction; -
2058 const int method_relative = c->method_relative; -
2059 if (c->isSlotObject) {
evaluated: c->isSlotObject
TRUEFALSE
yes
Evaluation Count:372
yes
Evaluation Count:8326447
372-8326447
2060 c->slotObj->ref(); -
2061 const QScopedPointer<QtPrivate::QSlotObjectBase, QSlotObjectBaseDeleter> obj(c->slotObj); -
2062 locker.unlock(); -
2063 obj->call(receiver, argv ? argv : empty_argv); -
2064 locker.relock(); -
2065 } else if (callFunction && c->method_offset <= receiver->metaObject()->methodOffset()) {
executed: }
Execution Count:372
evaluated: callFunction
TRUEFALSE
yes
Evaluation Count:8319188
yes
Evaluation Count:7261
evaluated: c->method_offset <= receiver->metaObject()->methodOffset()
TRUEFALSE
yes
Evaluation Count:8316572
yes
Evaluation Count:2622
372-8319188
2066 -
2067 locker.unlock(); -
2068 if (qt_signal_spy_callback_set.slot_begin_callback != 0)
partially evaluated: qt_signal_spy_callback_set.slot_begin_callback != 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:8316594
0-8316594
2069 qt_signal_spy_callback_set.slot_begin_callback(receiver, c->method(), argv ? argv : empty_argv);
never executed: qt_signal_spy_callback_set.slot_begin_callback(receiver, c->method(), argv ? argv : empty_argv);
0
2070 -
2071 callFunction(receiver, QMetaObject::InvokeMetaMethod, method_relative, argv ? argv : empty_argv); -
2072 -
2073 if (qt_signal_spy_callback_set.slot_end_callback != 0)
partially evaluated: qt_signal_spy_callback_set.slot_end_callback != 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:8316591
0-8316591
2074 qt_signal_spy_callback_set.slot_end_callback(receiver, c->method());
never executed: qt_signal_spy_callback_set.slot_end_callback(receiver, c->method());
0
2075 locker.relock(); -
2076 } else {
executed: }
Execution Count:8316592
8316592
2077 const int method = method_relative + c->method_offset; -
2078 locker.unlock(); -
2079 -
2080 if (qt_signal_spy_callback_set.slot_begin_callback != 0) {
partially evaluated: qt_signal_spy_callback_set.slot_begin_callback != 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:9883
0-9883
2081 qt_signal_spy_callback_set.slot_begin_callback(receiver, -
2082 method, -
2083 argv ? argv : empty_argv); -
2084 }
never executed: }
0
2085 -
2086 metacall(receiver, QMetaObject::InvokeMetaMethod, method, argv ? argv : empty_argv); -
2087 -
2088 if (qt_signal_spy_callback_set.slot_end_callback != 0)
partially evaluated: qt_signal_spy_callback_set.slot_end_callback != 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:9883
0-9883
2089 qt_signal_spy_callback_set.slot_end_callback(receiver, method);
never executed: qt_signal_spy_callback_set.slot_end_callback(receiver, method);
0
2090 -
2091 locker.relock(); -
2092 }
executed: }
Execution Count:9883
9883
2093 -
2094 if (connectionLists->orphaned)
evaluated: connectionLists->orphaned
TRUEFALSE
yes
Evaluation Count:74
yes
Evaluation Count:8326766
74-8326766
2095 break;
executed: break;
Execution Count:74
74
2096 } while (c != last && (c = c->nextConnectionList) != 0);
executed: }
Execution Count:8326757
evaluated: c != last
TRUEFALSE
yes
Evaluation Count:738601
yes
Evaluation Count:7652512
partially evaluated: (c = c->nextConnectionList) != 0
TRUEFALSE
yes
Evaluation Count:738601
no
Evaluation Count:0
0-8326757
2097 -
2098 if (connectionLists->orphaned)
evaluated: connectionLists->orphaned
TRUEFALSE
yes
Evaluation Count:75
yes
Evaluation Count:7652503
75-7652503
2099 break;
executed: break;
Execution Count:75
75
2100 } while (list != &connectionLists->allsignals &&
executed: }
Execution Count:7652504
evaluated: list != &connectionLists->allsignals
TRUEFALSE
yes
Evaluation Count:7652359
yes
Evaluation Count:7652555
7652359-7652555
2101 -
2102 ((list = &connectionLists->allsignals), true));
partially evaluated: ((list = &connectionLists->allsignals), true)
TRUEFALSE
yes
Evaluation Count:7652344
no
Evaluation Count:0
0-7652344
2103 -
2104 } -
2105 -
2106 if (qt_signal_spy_callback_set.signal_end_callback != 0)
partially evaluated: qt_signal_spy_callback_set.signal_end_callback != 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:7652683
0-7652683
2107 qt_signal_spy_callback_set.signal_end_callback(sender, signal_index);
never executed: qt_signal_spy_callback_set.signal_end_callback(sender, signal_index);
0
2108 -
2109}
executed: }
Execution Count:7652686
7652686
2110 -
2111 -
2112 -
2113 -
2114 -
2115void QMetaObject::activate(QObject *sender, int signal_index, void **argv) -
2116{ -
2117 const QMetaObject *mo = sender->metaObject(); -
2118 while (mo->methodOffset() > signal_index)
partially evaluated: mo->methodOffset() > signal_index
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:3
0-3
2119 mo = mo->superClass();
never executed: mo = mo->superClass();
0
2120 activate(sender, mo, signal_index - mo->methodOffset(), argv); -
2121}
executed: }
Execution Count:3
3
2122 -
2123 -
2124 -
2125 -
2126 -
2127int QObjectPrivate::senderSignalIndex() const -
2128{ -
2129 const QObject * const q = q_func(); -
2130 QMutexLocker locker(signalSlotLock(q)); -
2131 if (!currentSender)
evaluated: !currentSender
TRUEFALSE
yes
Evaluation Count:5
yes
Evaluation Count:228
5-228
2132 return -1;
executed: return -1;
Execution Count:5
5
2133 -
2134 for (QObjectPrivate::Connection *c = senders; c; c = c->next) {
evaluated: c
TRUEFALSE
yes
Evaluation Count:422
yes
Evaluation Count:2
2-422
2135 if (c->sender == currentSender->sender)
evaluated: c->sender == currentSender->sender
TRUEFALSE
yes
Evaluation Count:226
yes
Evaluation Count:196
196-226
2136 return currentSender->signal;
executed: return currentSender->signal;
Execution Count:226
226
2137 }
executed: }
Execution Count:196
196
2138 -
2139 return -1;
executed: return -1;
Execution Count:2
2
2140} -
2141int QObjectPrivate::signalIndex(const char *signalName, -
2142 const QMetaObject **meta) const -
2143{ -
2144 const QObject * const q = q_func(); -
2145 const QMetaObject *base = q->metaObject(); -
2146 qt_noop(); -
2147 QArgumentTypeArray types; -
2148 QByteArray name = QMetaObjectPrivate::decodeMethodSignature(signalName, types); -
2149 int relative_index = QMetaObjectPrivate::indexOfSignalRelative( -
2150 &base, name, types.size(), types.constData()); -
2151 if (relative_index < 0)
evaluated: relative_index < 0
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:866
1-866
2152 return relative_index;
executed: return relative_index;
Execution Count:1
1
2153 relative_index = QMetaObjectPrivate::originalClone(base, relative_index); -
2154 if (meta)
evaluated: meta
TRUEFALSE
yes
Evaluation Count:15
yes
Evaluation Count:851
15-851
2155 *meta = base;
executed: *meta = base;
Execution Count:15
15
2156 return relative_index + QMetaObjectPrivate::signalOffset(base);
executed: return relative_index + QMetaObjectPrivate::signalOffset(base);
Execution Count:866
866
2157} -
2158bool QObject::setProperty(const char *name, const QVariant &value) -
2159{ -
2160 QObjectPrivate * const d = d_func(); -
2161 const QMetaObject* meta = metaObject(); -
2162 if (!name || !meta)
partially evaluated: !name
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:8179
partially evaluated: !meta
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:8179
0-8179
2163 return false;
never executed: return false;
0
2164 -
2165 int id = meta->indexOfProperty(name); -
2166 if (id < 0) {
evaluated: id < 0
TRUEFALSE
yes
Evaluation Count:7545
yes
Evaluation Count:634
634-7545
2167 if (!d->extraData)
evaluated: !d->extraData
TRUEFALSE
yes
Evaluation Count:4567
yes
Evaluation Count:2978
2978-4567
2168 d->extraData = new QObjectPrivate::ExtraData;
executed: d->extraData = new QObjectPrivate::ExtraData;
Execution Count:4567
4567
2169 -
2170 const int idx = d->extraData->propertyNames.indexOf(name); -
2171 -
2172 if (!value.isValid()) {
evaluated: !value.isValid()
TRUEFALSE
yes
Evaluation Count:4124
yes
Evaluation Count:3421
3421-4124
2173 if (idx == -1)
evaluated: idx == -1
TRUEFALSE
yes
Evaluation Count:4118
yes
Evaluation Count:6
6-4118
2174 return false;
executed: return false;
Execution Count:4118
4118
2175 d->extraData->propertyNames.removeAt(idx); -
2176 d->extraData->propertyValues.removeAt(idx); -
2177 } else {
executed: }
Execution Count:6
6
2178 if (idx == -1) {
evaluated: idx == -1
TRUEFALSE
yes
Evaluation Count:2148
yes
Evaluation Count:1273
1273-2148
2179 d->extraData->propertyNames.append(name); -
2180 d->extraData->propertyValues.append(value); -
2181 } else {
executed: }
Execution Count:2148
2148
2182 d->extraData->propertyValues[idx] = value; -
2183 }
executed: }
Execution Count:1273
1273
2184 } -
2185 -
2186 QDynamicPropertyChangeEvent ev(name); -
2187 QCoreApplication::sendEvent(this, &ev); -
2188 -
2189 return false;
executed: return false;
Execution Count:3427
3427
2190 } -
2191 QMetaProperty p = meta->property(id); -
2192 -
2193 -
2194 -
2195 -
2196 -
2197 return p.write(this, value);
executed: return p.write(this, value);
Execution Count:634
634
2198} -
2199QVariant QObject::property(const char *name) const -
2200{ -
2201 const QObjectPrivate * const d = d_func(); -
2202 const QMetaObject* meta = metaObject(); -
2203 if (!name || !meta)
partially evaluated: !name
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:25046
partially evaluated: !meta
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:25046
0-25046
2204 return QVariant();
never executed: return QVariant();
0
2205 -
2206 int id = meta->indexOfProperty(name); -
2207 if (id < 0) {
evaluated: id < 0
TRUEFALSE
yes
Evaluation Count:16645
yes
Evaluation Count:8401
8401-16645
2208 if (!d->extraData)
evaluated: !d->extraData
TRUEFALSE
yes
Evaluation Count:5600
yes
Evaluation Count:11045
5600-11045
2209 return QVariant();
executed: return QVariant();
Execution Count:5600
5600
2210 const int i = d->extraData->propertyNames.indexOf(name); -
2211 return d->extraData->propertyValues.value(i);
executed: return d->extraData->propertyValues.value(i);
Execution Count:11045
11045
2212 } -
2213 QMetaProperty p = meta->property(id); -
2214 -
2215 -
2216 -
2217 -
2218 -
2219 return p.read(this);
executed: return p.read(this);
Execution Count:8401
8401
2220} -
2221 -
2222 -
2223 -
2224 -
2225 -
2226 -
2227 -
2228QList<QByteArray> QObject::dynamicPropertyNames() const -
2229{ -
2230 const QObjectPrivate * const d = d_func(); -
2231 if (d->extraData)
evaluated: d->extraData
TRUEFALSE
yes
Evaluation Count:188
yes
Evaluation Count:1
1-188
2232 return d->extraData->propertyNames;
executed: return d->extraData->propertyNames;
Execution Count:188
188
2233 return QList<QByteArray>();
executed: return QList<QByteArray>();
Execution Count:1
1
2234} -
2235static void dumpRecursive(int level, QObject *object) -
2236{ -
2237 (void)level; -
2238 (void)object; -
2239 -
2240}
never executed: }
0
2241void QObject::dumpObjectTree() -
2242{ -
2243 dumpRecursive(0, this); -
2244}
never executed: }
0
2245void QObject::dumpObjectInfo() -
2246{ -
2247} -
2248 -
2249 -
2250 -
2251 -
2252 -
2253uint QObject::registerUserData() -
2254{ -
2255 static int user_data_registration = 0; -
2256 return user_data_registration++;
executed: return user_data_registration++;
Execution Count:100
100
2257} -
2258 -
2259 -
2260 -
2261 -
2262QObjectUserData::~QObjectUserData() -
2263{ -
2264} -
2265 -
2266 -
2267 -
2268 -
2269void QObject::setUserData(uint id, QObjectUserData* data) -
2270{ -
2271 QObjectPrivate * const d = d_func(); -
2272 if (!d->extraData)
evaluated: !d->extraData
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:99
1-99
2273 d->extraData = new QObjectPrivate::ExtraData;
executed: d->extraData = new QObjectPrivate::ExtraData;
Execution Count:1
1
2274 -
2275 if (d->extraData->userData.size() <= (int) id)
evaluated: d->extraData->userData.size() <= (int) id
TRUEFALSE
yes
Evaluation Count:4
yes
Evaluation Count:96
4-96
2276 d->extraData->userData.resize((int) id + 1);
executed: d->extraData->userData.resize((int) id + 1);
Execution Count:4
4
2277 d->extraData->userData[id] = data; -
2278}
executed: }
Execution Count:100
100
2279 -
2280 -
2281 -
2282 -
2283QObjectUserData* QObject::userData(uint id) const -
2284{ -
2285 const QObjectPrivate * const d = d_func(); -
2286 if (!d->extraData)
partially evaluated: !d->extraData
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:100
0-100
2287 return 0;
never executed: return 0;
0
2288 if ((int)id < d->extraData->userData.size())
partially evaluated: (int)id < d->extraData->userData.size()
TRUEFALSE
yes
Evaluation Count:100
no
Evaluation Count:0
0-100
2289 return d->extraData->userData.at(id);
executed: return d->extraData->userData.at(id);
Execution Count:100
100
2290 return 0;
never executed: return 0;
0
2291} -
2292 -
2293 -
2294 -
2295 -
2296 -
2297QDebug operator<<(QDebug dbg, const QObject *o) { -
2298 if (!o)
evaluated: !o
TRUEFALSE
yes
Evaluation Count:13
yes
Evaluation Count:33
13-33
2299 return dbg << "QObject(0x0) ";
executed: return dbg << "QObject(0x0) ";
Execution Count:13
13
2300 dbg.nospace() << o->metaObject()->className() << '(' << (void *)o; -
2301 if (!o->objectName().isEmpty())
partially evaluated: !o->objectName().isEmpty()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:33
0-33
2302 dbg << ", name = " << o->objectName();
never executed: dbg << ", name = " << o->objectName();
0
2303 dbg << ')'; -
2304 return dbg.space();
executed: return dbg.space();
Execution Count:33
33
2305} -
2306void qDeleteInEventHandler(QObject *o) -
2307{ -
2308 delete o; -
2309}
executed: }
Execution Count:18530
18530
2310QMetaObject::Connection QObject::connectImpl(const QObject *sender, void **signal, -
2311 const QObject *receiver, void **slot, -
2312 QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type, -
2313 const int *types, const QMetaObject *senderMetaObject) -
2314{ -
2315 if (!sender || !signal || !slotObj || !senderMetaObject) {
partially evaluated: !sender
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:4007
partially evaluated: !signal
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:4007
partially evaluated: !slotObj
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:4007
partially evaluated: !senderMetaObject
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:4007
0-4007
2316 QMessageLogger("kernel/qobject.cpp", 4212, __PRETTY_FUNCTION__).warning("QObject::connect: invalid null parametter"); -
2317 if (slotObj)
never evaluated: slotObj
0
2318 slotObj->destroyIfLastRef();
never executed: slotObj->destroyIfLastRef();
0
2319 return QMetaObject::Connection();
never executed: return QMetaObject::Connection();
0
2320 } -
2321 int signal_index = -1; -
2322 void *args[] = { &signal_index, signal }; -
2323 senderMetaObject->static_metacall(QMetaObject::IndexOfMethod, 0, args); -
2324 if (signal_index < 0 || signal_index >= QMetaObjectPrivate::get(senderMetaObject)->signalCount) {
evaluated: signal_index < 0
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:4005
partially evaluated: signal_index >= QMetaObjectPrivate::get(senderMetaObject)->signalCount
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:4005
0-4005
2325 QMessageLogger("kernel/qobject.cpp", 4221, __PRETTY_FUNCTION__).warning("QObject::connect: signal not found in %s", senderMetaObject->className()); -
2326 slotObj->destroyIfLastRef(); -
2327 return QMetaObject::Connection(0);
executed: return QMetaObject::Connection(0);
Execution Count:2
2
2328 } -
2329 signal_index += QMetaObjectPrivate::signalOffset(senderMetaObject); -
2330 -
2331 QObject *s = const_cast<QObject *>(sender); -
2332 QObject *r = const_cast<QObject *>(receiver); -
2333 -
2334 QOrderedMutexLocker locker(signalSlotLock(sender), -
2335 signalSlotLock(receiver)); -
2336 -
2337 if (type & Qt::UniqueConnection) {
evaluated: type & Qt::UniqueConnection
TRUEFALSE
yes
Evaluation Count:11
yes
Evaluation Count:3994
11-3994
2338 QObjectConnectionListVector *connectionLists = QObjectPrivate::get(s)->connectionLists; -
2339 if (connectionLists && connectionLists->count() > signal_index) {
evaluated: connectionLists
TRUEFALSE
yes
Evaluation Count:9
yes
Evaluation Count:2
evaluated: connectionLists->count() > signal_index
TRUEFALSE
yes
Evaluation Count:7
yes
Evaluation Count:2
2-9
2340 const QObjectPrivate::Connection *c2 = -
2341 (*connectionLists)[signal_index].first; -
2342 -
2343 while (c2) {
evaluated: c2
TRUEFALSE
yes
Evaluation Count:11
yes
Evaluation Count:4
4-11
2344 if (c2->receiver == receiver && c2->isSlotObject && c2->slotObj->compare(slot)) {
evaluated: c2->receiver == receiver
TRUEFALSE
yes
Evaluation Count:5
yes
Evaluation Count:6
partially evaluated: c2->isSlotObject
TRUEFALSE
yes
Evaluation Count:5
no
Evaluation Count:0
evaluated: c2->slotObj->compare(slot)
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:2
0-6
2345 slotObj->destroyIfLastRef(); -
2346 return QMetaObject::Connection();
executed: return QMetaObject::Connection();
Execution Count:3
3
2347 } -
2348 c2 = c2->nextConnectionList; -
2349 }
executed: }
Execution Count:8
8
2350 }
executed: }
Execution Count:4
4
2351 type = static_cast<Qt::ConnectionType>(type ^ Qt::UniqueConnection); -
2352 }
executed: }
Execution Count:8
8
2353 -
2354 QScopedPointer<QObjectPrivate::Connection> c(new QObjectPrivate::Connection); -
2355 c->sender = s; -
2356 c->signal_index = signal_index; -
2357 c->receiver = r; -
2358 c->slotObj = slotObj; -
2359 c->connectionType = type; -
2360 c->isSlotObject = true; -
2361 if (types) {
evaluated: types
TRUEFALSE
yes
Evaluation Count:35
yes
Evaluation Count:3967
35-3967
2362 c->argumentTypes.store(types); -
2363 c->ownArgumentTypes = false; -
2364 }
executed: }
Execution Count:35
35
2365 -
2366 QObjectPrivate::get(s)->addConnection(signal_index, c.data()); -
2367 QMetaObject::Connection ret(c.take()); -
2368 locker.unlock(); -
2369 -
2370 QMetaMethod method = QMetaObjectPrivate::signal(senderMetaObject, signal_index); -
2371 qt_noop(); -
2372 s->connectNotify(method); -
2373 -
2374 return ret;
executed: return ret;
Execution Count:4002
4002
2375} -
2376bool QObject::disconnect(const QMetaObject::Connection &connection) -
2377{ -
2378 QObjectPrivate::Connection *c = static_cast<QObjectPrivate::Connection *>(connection.d_ptr); -
2379 -
2380 if (!c || !c->receiver)
evaluated: !c
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:8
partially evaluated: !c->receiver
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:8
0-8
2381 return false;
executed: return false;
Execution Count:3
3
2382 -
2383 QMutex *senderMutex = signalSlotLock(c->sender); -
2384 QMutex *receiverMutex = signalSlotLock(c->receiver); -
2385 QOrderedMutexLocker locker(senderMutex, receiverMutex); -
2386 -
2387 QObjectConnectionListVector *connectionLists = QObjectPrivate::get(c->sender)->connectionLists; -
2388 qt_noop(); -
2389 connectionLists->dirty = true; -
2390 -
2391 *c->prev = c->next; -
2392 if (c->next)
evaluated: c->next
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:7
1-7
2393 c->next->prev = c->prev;
executed: c->next->prev = c->prev;
Execution Count:1
1
2394 c->receiver = 0; -
2395 -
2396 -
2397 if (c->isSlotObject) {
partially evaluated: c->isSlotObject
TRUEFALSE
yes
Evaluation Count:8
no
Evaluation Count:0
0-8
2398 c->slotObj->destroyIfLastRef(); -
2399 c->isSlotObject = false; -
2400 }
executed: }
Execution Count:8
8
2401 -
2402 const_cast<QMetaObject::Connection &>(connection).d_ptr = 0; -
2403 c->deref(); -
2404 -
2405 -
2406 -
2407 return true;
executed: return true;
Execution Count:8
8
2408} -
2409bool QObject::disconnectImpl(const QObject *sender, void **signal, const QObject *receiver, void **slot, const QMetaObject *senderMetaObject) -
2410{ -
2411 if (sender == 0 || (receiver == 0 && slot != 0)) {
partially evaluated: sender == 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:9
evaluated: receiver == 0
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:8
partially evaluated: slot != 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1
0-9
2412 QMessageLogger("kernel/qobject.cpp", 4378, __PRETTY_FUNCTION__).warning("QObject::disconnect: Unexpected null parameter"); -
2413 return false;
never executed: return false;
0
2414 } -
2415 -
2416 int signal_index = -1; -
2417 if (signal) {
partially evaluated: signal
TRUEFALSE
yes
Evaluation Count:9
no
Evaluation Count:0
0-9
2418 void *args[] = { &signal_index, signal }; -
2419 senderMetaObject->static_metacall(QMetaObject::IndexOfMethod, 0, args); -
2420 if (signal_index < 0 || signal_index >= QMetaObjectPrivate::get(senderMetaObject)->signalCount) {
partially evaluated: signal_index < 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:9
partially evaluated: signal_index >= QMetaObjectPrivate::get(senderMetaObject)->signalCount
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:9
0-9
2421 QMessageLogger("kernel/qobject.cpp", 4387, __PRETTY_FUNCTION__).warning("QObject::disconnect: signal not found in %s", senderMetaObject->className()); -
2422 return false;
never executed: return false;
0
2423 } -
2424 signal_index += QMetaObjectPrivate::signalOffset(senderMetaObject); -
2425 }
executed: }
Execution Count:9
9
2426 -
2427 return QMetaObjectPrivate::disconnect(sender, signal_index, senderMetaObject, receiver, -1, slot);
executed: return QMetaObjectPrivate::disconnect(sender, signal_index, senderMetaObject, receiver, -1, slot);
Execution Count:9
9
2428} -
2429QMetaObject::Connection::Connection(const QMetaObject::Connection &other) : d_ptr(other.d_ptr) -
2430{ -
2431 if (d_ptr)
never evaluated: d_ptr
0
2432 static_cast<QObjectPrivate::Connection *>(d_ptr)->ref();
never executed: static_cast<QObjectPrivate::Connection *>(d_ptr)->ref();
0
2433}
never executed: }
0
2434 -
2435QMetaObject::Connection& QMetaObject::Connection::operator=(const QMetaObject::Connection& other) -
2436{ -
2437 if (other.d_ptr != d_ptr) {
evaluated: other.d_ptr != d_ptr
TRUEFALSE
yes
Evaluation Count:6
yes
Evaluation Count:1
1-6
2438 if (d_ptr)
evaluated: d_ptr
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:5
1-5
2439 static_cast<QObjectPrivate::Connection *>(d_ptr)->deref();
executed: static_cast<QObjectPrivate::Connection *>(d_ptr)->deref();
Execution Count:1
1
2440 d_ptr = other.d_ptr; -
2441 if (other.d_ptr)
evaluated: other.d_ptr
TRUEFALSE
yes
Evaluation Count:5
yes
Evaluation Count:1
1-5
2442 static_cast<QObjectPrivate::Connection *>(other.d_ptr)->ref();
executed: static_cast<QObjectPrivate::Connection *>(other.d_ptr)->ref();
Execution Count:5
5
2443 }
executed: }
Execution Count:6
6
2444 return *this;
executed: return *this;
Execution Count:7
7
2445} -
2446 -
2447QMetaObject::Connection::Connection() : d_ptr(0) {}
executed: }
Execution Count:7
7
2448 -
2449QMetaObject::Connection::~Connection() -
2450{ -
2451 if (d_ptr)
evaluated: d_ptr
TRUEFALSE
yes
Evaluation Count:490308
yes
Evaluation Count:385629
385629-490308
2452 static_cast<QObjectPrivate::Connection *>(d_ptr)->deref();
executed: static_cast<QObjectPrivate::Connection *>(d_ptr)->deref();
Execution Count:490308
490308
2453}
executed: }
Execution Count:875925
875925
2454 -
2455 -
2456 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial