qobject.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/kernel/qobject.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10static int DIRECT_CONNECTION_ONLY = 0;-
11-
12-
13QDynamicMetaObjectData::~QDynamicMetaObjectData()-
14{-
15}-
16-
17QAbstractDynamicMetaObject::~QAbstractDynamicMetaObject()-
18{-
19}-
20-
21-
22struct QSlotObjectBaseDeleter {-
23 static void cleanup(QtPrivate::QSlotObjectBase *slot) {-
24 if (slot) slot->destroyIfLastRef();-
25 }-
26};-
27static int *queuedConnectionTypes(const QList<QByteArray> &typeNames)-
28{-
29 int *types = new int [typeNames.count() + 1];-
30 do { if (!(types)) qBadAlloc(); } while (0);-
31 for (int i = 0; i < typeNames.count(); ++i) {-
32 const QByteArray typeName = typeNames.at(i);-
33 if (typeName.endsWith('*'))-
34 types[i] = QMetaType::VoidStar;-
35 else-
36 types[i] = QMetaType::type(typeName);-
37-
38 if (!types[i]) {-
39 QMessageLogger(__FILE__, 95102, __PRETTY_FUNCTION__).warning("QObject::connect: Cannot queue arguments of type '%s'\n"-
40 "(Make sure '%s' is registered using qRegisterMetaType().)",-
41 typeName.constData(), typeName.constData());-
42 delete [] types;-
43 return 0;-
44 }-
45 }-
46 types[typeNames.count()] = 0;-
47-
48 return types;-
49}-
50-
51static int *queuedConnectionTypes(const QArgumentType *argumentTypes, int argc)-
52{-
53 QScopedArrayPointer<int> types(new int [argc + 1]);-
54 for (int i = 0; i < argc; ++i) {-
55 const QArgumentType &type = argumentTypes[i];-
56 if (type.type())-
57 types[i] = type.type();-
58 else if (type.name().endsWith('*'))-
59 types[i] = QMetaType::VoidStar;-
60 else-
61 types[i] = QMetaType::type(type.name());-
62-
63 if (!types[i]) {-
64 QMessageLogger(__FILE__, 120127, __PRETTY_FUNCTION__).warning("QObject::connect: Cannot queue arguments of type '%s'\n"-
65 "(Make sure '%s' is registered using qRegisterMetaType().)",-
66 type.name().constData(), type.name().constData());-
67 return 0;-
68 }-
69 }-
70 types[argc] = 0;-
71-
72 return types.take();-
73}-
74-
75static QBasicMutex _q_ObjectMutexPool[131];-
76-
77-
78-
79-
80-
81static inline QMutex *signalSlotLock(const QObject *o)-
82{-
83 return static_cast<QMutex *>(&_q_ObjectMutexPool[-
84 uint(quintptr(o)) % sizeof(_q_ObjectMutexPool)/sizeof(QBasicMutex)]);-
85}-
86-
87-
88extern "C" __attribute__((visibility("default"))) void qt_addObject(QObject *)-
89{}-
90-
91extern "C" __attribute__((visibility("default"))) void qt_removeObject(QObject *)-
92{}-
93-
94struct QConnectionSenderSwitcher {-
95 QObject *receiver;-
96 QObjectPrivate::Sender *previousSender;-
97 QObjectPrivate::Sender currentSender;-
98 bool switched;-
99-
100 inline QConnectionSenderSwitcher() : switched(false) {}-
101-
102 inline QConnectionSenderSwitcher(QObject *receiver, QObject *sender, int signal_absolute_id)-
103 {-
104 switchSender(receiver, sender, signal_absolute_id);-
105 }-
106-
107 inline void switchSender(QObject *receiver, QObject *sender, int signal_absolute_id)-
108 {-
109 this->receiver = receiver;-
110 currentSender.sender = sender;-
111 currentSender.signal = signal_absolute_id;-
112 currentSender.ref = 1;-
113 previousSender = QObjectPrivate::setCurrentSender(receiver, &currentSender);-
114 switched = true;-
115 }-
116-
117 inline ~QConnectionSenderSwitcher()-
118 {-
119 if (switched)-
120 QObjectPrivate::resetCurrentSender(receiver, &currentSender, previousSender);-
121 }-
122private:-
123 QConnectionSenderSwitcher(const QConnectionSenderSwitcher &) = delete; QConnectionSenderSwitcher &operator=(const QConnectionSenderSwitcher &) = delete;-
124};-
125-
126-
127void (*QAbstractDeclarativeData::destroyed)(QAbstractDeclarativeData *, QObject *) = 0;-
128void (*QAbstractDeclarativeData::destroyed_qml1)(QAbstractDeclarativeData *, QObject *) = 0;-
129void (*QAbstractDeclarativeData::parentChanged)(QAbstractDeclarativeData *, QObject *, QObject *) = 0;-
130void (*QAbstractDeclarativeData::signalEmitted)(QAbstractDeclarativeData *, QObject *, int, void **) = 0;-
131int (*QAbstractDeclarativeData::receivers)(QAbstractDeclarativeData *, const QObject *, int) = 0;-
132bool (*QAbstractDeclarativeData::isSignalConnected)(QAbstractDeclarativeData *, const QObject *, int) = 0;-
133void (*QAbstractDeclarativeData::setWidgetParent)(QObject *, QObject *) = 0;-
134-
135QObjectData::~QObjectData() {}-
136-
137QMetaObject *QObjectData::dynamicMetaObject() const-
138{-
139 return metaObject->toDynamicMetaObject(q_ptr);-
140}-
141-
142QObjectPrivate::QObjectPrivate(int version)-
143 : threadData(0), connectionLists(0), senders(0), currentSender(0), currentChildBeingDeleted(0)-
144{-
145-
146-
147-
148 (void)version;;-
149-
150-
151-
152-
153-
154-
155-
156 q_ptr = 0;-
157 parent = 0;-
158 isWidget = false;-
159 blockSig = false;-
160 wasDeleted = false;-
161 isDeletingChildren = false;-
162 sendChildEvents = true;-
163 receiveChildEvents = true;-
164 postedEvents = 0;-
165 extraData = 0;-
166 connectedSignals[0] = connectedSignals[1] = 0;-
167 metaObject = 0;-
168 isWindow = false;-
169}
executed 1911164 times by 907 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
1911164
170-
171QObjectPrivate::~QObjectPrivate()-
172{-
173 if (extraData && !extraData->runningTimers.isEmpty()) {-
174 if (__builtin_expect(!!(threadData->thread == QThread::currentThread()), true)) {-
175-
176 if (threadData->eventDispatcher.load())-
177 threadData->eventDispatcher.load()->unregisterTimers(q_ptr);-
178-
179-
180 for (int i = 0; i < extraData->runningTimers.size(); ++i)-
181 QAbstractEventDispatcherPrivate::releaseTimerId(extraData->runningTimers.at(i));-
182 } else {-
183 QMessageLogger(__FILE__, 239246, __PRETTY_FUNCTION__).warning("QObject::~QObject: Timers cannot be stopped from another thread");-
184 }-
185 }-
186-
187 if (postedEvents)-
188 QCoreApplication::removePostedEvents(q_ptr, 0);-
189-
190 threadData->deref();-
191-
192 if (metaObject) metaObject->objectDestroyed(q_ptr);-
193-
194-
195 if (extraData)-
196 qDeleteAll(extraData->userData);-
197-
198 delete extraData;-
199}-
200-
201-
202-
203-
204-
205static void computeOffsets(const QMetaObject *metaobject, int *signalOffset, int *methodOffset)-
206{-
207 *signalOffset = *methodOffset = 0;-
208 const QMetaObject *m = metaobject->d.superdata;-
209 while (m) {-
210 const QMetaObjectPrivate *d = QMetaObjectPrivate::get(m);-
211 *methodOffset += d->methodCount;-
212 ((!(d->revision >= 4)) ? qt_assert("d->revision >= 4",__FILE__,268275) : qt_noop());-
213 *signalOffset += d->signalCount;-
214 m = m->d.superdata;-
215 }-
216}-
217class QObjectConnectionListVector : public QVector<QObjectPrivate::ConnectionList>-
218{-
219public:-
220 bool orphaned;-
221 bool dirty;-
222 int inUse;-
223 QObjectPrivate::ConnectionList allsignals;-
224-
225 QObjectConnectionListVector()-
226 : QVector<QObjectPrivate::ConnectionList>(), orphaned(false), dirty(false), inUse(0)-
227 { }-
228-
229 QObjectPrivate::ConnectionList &operator[](int at)-
230 {-
231 if (at < 0)-
232 return allsignals;-
233 return QVector<QObjectPrivate::ConnectionList>::operator[](at);-
234 }-
235};-
236-
237-
238bool QObjectPrivate::isSender(const QObject *receiver, const char *signal) const-
239{-
240 const QObject * const q = q_func();-
241 int signal_index = signalIndex(signal);-
242 if (signal_index < 0)-
243 return false;-
244 QMutexLocker locker(signalSlotLock(q));-
245 if (connectionLists) {-
246 if (signal_index < connectionLists->count()) {-
247 const QObjectPrivate::Connection *c =-
248 connectionLists->at(signal_index).first;-
249-
250 while (c) {-
251 if (c->receiver == receiver)-
252 return true;-
253 c = c->nextConnectionList;-
254 }-
255 }-
256 }-
257 return false;-
258}-
259-
260-
261QObjectList QObjectPrivate::receiverList(const char *signal) const-
262{-
263 const QObject * const q = q_func();-
264 QObjectList returnValue;-
265 int signal_index = signalIndex(signal);-
266 if (signal_index < 0)-
267 return returnValue;-
268 QMutexLocker locker(signalSlotLock(q));-
269 if (connectionLists) {-
270 if (signal_index < connectionLists->count()) {-
271 const QObjectPrivate::Connection *c = connectionLists->at(signal_index).first;-
272-
273 while (c) {-
274 if (c->receiver)-
275 returnValue << c->receiver;-
276 c = c->nextConnectionList;-
277 }-
278 }-
279 }-
280 return returnValue;-
281}-
282-
283-
284QObjectList QObjectPrivate::senderList() const-
285{-
286 QObjectList returnValue;-
287 QMutexLocker locker(signalSlotLock(q_func()));-
288 for (Connection *c = senders; c; c = c->next)-
289 returnValue << c->sender;-
290 return returnValue;-
291}-
292void QObjectPrivate::addConnection(int signal, Connection *c)-
293{-
294 ((!(c->sender == q_ptr)) ? qt_assert("c->sender == q_ptr",__FILE__,377384) : qt_noop());-
295 if (!connectionLists)-
296 connectionLists = new QObjectConnectionListVector();-
297 if (signal >= connectionLists->count())-
298 connectionLists->resize(signal + 1);-
299-
300 ConnectionList &connectionList = (*connectionLists)[signal];-
301 if (connectionList.last) {-
302 connectionList.last->nextConnectionList = c;-
303 } else {-
304 connectionList.first = c;-
305 }-
306 connectionList.last = c;-
307-
308 cleanConnectionLists();-
309-
310 c->prev = &(QObjectPrivate::get(c->receiver)->senders);-
311 c->next = *c->prev;-
312 *c->prev = c;-
313 if (c->next)-
314 c->next->prev = &c->next;-
315-
316 if (signal < 0) {-
317 connectedSignals[0] = connectedSignals[1] = ~0;-
318 } else if (signal < (int)sizeof(connectedSignals) * 8) {-
319 connectedSignals[signal >> 5] |= (1 << (signal & 0x1f));-
320 }-
321}-
322-
323void QObjectPrivate::cleanConnectionLists()-
324{-
325 if (connectionLists->dirty && !connectionLists->inUse) {-
326-
327 for (int signal = -1; signal < connectionLists->count(); ++signal) {-
328 QObjectPrivate::ConnectionList &connectionList =-
329 (*connectionLists)[signal];-
330-
331-
332-
333-
334 QObjectPrivate::Connection *last = 0;-
335-
336 QObjectPrivate::Connection **prev = &connectionList.first;-
337 QObjectPrivate::Connection *c = *prev;-
338 while (c) {-
339 if (c->receiver) {-
340 last = c;-
341 prev = &c->nextConnectionList;-
342 c = *prev;-
343 } else {-
344 QObjectPrivate::Connection *next = c->nextConnectionList;-
345 *prev = next;-
346 c->deref();-
347 c = next;-
348 }-
349 }-
350-
351-
352-
353 connectionList.last = last;-
354 }-
355 connectionLists->dirty = false;-
356 }-
357}-
358-
359-
360-
361-
362QMetaCallEvent::QMetaCallEvent(ushort method_offset, ushort method_relative, QObjectPrivate::StaticMetaCallFunction callFunction,-
363 const QObject *sender, int signalId,-
364 int nargs, int *types, void **args, QSemaphore *semaphore)-
365 : QEvent(MetaCall), slotObj_(0), sender_(sender), signalId_(signalId),-
366 nargs_(nargs), types_(types), args_(args), semaphore_(semaphore),-
367 callFunction_(callFunction), method_offset_(method_offset), method_relative_(method_relative)-
368{ }-
369-
370-
371-
372-
373QMetaCallEvent::QMetaCallEvent(QtPrivate::QSlotObjectBase *slotO, const QObject *sender, int signalId,-
374 int nargs, int *types, void **args, QSemaphore *semaphore)-
375 : QEvent(MetaCall), slotObj_(slotO), sender_(sender), signalId_(signalId),-
376 nargs_(nargs), types_(types), args_(args), semaphore_(semaphore),-
377 callFunction_(0), method_offset_(0), method_relative_(ushort(-1))-
378{-
379 if (slotObj_)-
380 slotObj_->ref();-
381}-
382-
383-
384-
385-
386QMetaCallEvent::~QMetaCallEvent()-
387{-
388 if (types_) {-
389 for (int i = 0; i < nargs_; ++i) {-
390 if (types_[i] && args_[i])-
391 QMetaType::destroy(types_[i], args_[i]);-
392 }-
393 free(types_);-
394 free(args_);-
395 }-
396-
397 if (semaphore_)-
398 semaphore_->release();-
399-
400 if (slotObj_)-
401 slotObj_->destroyIfLastRef();-
402}-
403-
404-
405-
406-
407void QMetaCallEvent::placeMetaCall(QObject *object)-
408{-
409 if (slotObj_) {-
410 slotObj_->call(object, args_);-
411 } else if (callFunction_ && method_offset_ <= object->metaObject()->methodOffset()) {-
412 callFunction_(object, QMetaObject::InvokeMetaMethod, method_relative_, args_);-
413 } else {-
414 QMetaObject::metacall(object, QMetaObject::InvokeMetaMethod, method_offset_ + method_relative_, args_);-
415 }-
416}-
417void *qt_find_obj_child(QObject *parent, const char *type, const QString &name)-
418{-
419 QObjectList list = parent->children();-
420 if (list.size() == 0) return 0;-
421 for (int i = 0; i < list.size(); ++i) {-
422 QObject *obj = list.at(i);-
423 if (name == obj->objectName() && obj->inherits(type))-
424 return obj;-
425 }-
426 return 0;-
427}-
428-
429-
430-
431-
432-
433-
434-
435static bool check_parent_thread(QObject *parent,-
436 QThreadData *parentThreadData,-
437 QThreadData *currentThreadData)-
438{-
439 if (parent && parentThreadData != currentThreadData) {-
440 QThread *parentThread = parentThreadData->thread;-
441 QThread *currentThread = currentThreadData->thread;-
442 QMessageLogger(__FILE__, 786793, __PRETTY_FUNCTION__).warning("QObject: Cannot create children for a parent that is in a different thread.\n"-
443 "(Parent is %s(%p), parent's thread is %s(%p), current thread is %s(%p)",-
444 parent->metaObject()->className(),-
445 parent,-
446 parentThread ? parentThread->metaObject()->className() : "QThread",-
447 parentThread,-
448 currentThread ? currentThread->metaObject()->className() : "QThread",-
449 currentThread);-
450 return false;-
451 }-
452 return true;-
453}-
454QObject::QObject(QObject *parent)-
455 : d_ptr(new QObjectPrivate)-
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();-
460 d->threadData->ref();-
461 if (parent) {-
462 try {-
463 if (!check_parent_thread(parent, parent ? parent->d_func()->threadData : 0, d->threadData))-
464 parent = 0;-
465 setParent(parent);-
466 } catch (...) {-
467 d->threadData->deref();-
468 throw;-
469 }-
470 }-
471 qt_addObject(this);-
472 if (__builtin_expect(!!(qtHookData[QHooks::AddQObject]), false))-
473 reinterpret_cast<QHooks::AddQObjectCallback>(qtHookData[QHooks::AddQObject])(this);-
474}-
475-
476-
477-
478-
479QObject::QObject(QObjectPrivate &dd, QObject *parent)-
480 : d_ptr(&dd)-
481{-
482 QObjectPrivate * const d = d_func();-
483 d_ptr->q_ptr = this;-
484 d->threadData = (parent && !parent->thread()) ? parent->d_func()->threadData : QThreadData::current();-
485 d->threadData->ref();-
486 if (parent) {-
487 try {-
488 if (!check_parent_thread(parent, parent ? parent->d_func()->threadData : 0, d->threadData))-
489 parent = 0;-
490 if (d->isWidget) {-
491 if (parent) {-
492 d->parent = parent;-
493 d->parent->d_func()->children.append(this);-
494 }-
495-
496 } else {-
497 setParent(parent);-
498 }-
499 } catch (...) {-
500 d->threadData->deref();-
501 throw;-
502 }-
503 }-
504 qt_addObject(this);-
505 if (__builtin_expect(!!(qtHookData[QHooks::AddQObject]), false))-
506 reinterpret_cast<QHooks::AddQObjectCallback>(qtHookData[QHooks::AddQObject])(this);-
507}-
508QObject::~QObject()-
509{-
510 QObjectPrivate * const d = d_func();-
511 d->wasDeleted = true;-
512 d->blockSig = 0;-
513-
514 QtSharedPointer::ExternalRefCountData *sharedRefcount = d->sharedRefcount.load();-
515 if (sharedRefcount) {-
516 if (sharedRefcount->strongref.load() > 0) {-
517 QMessageLogger(__FILE__, 902909, __PRETTY_FUNCTION__).warning("QObject: shared QObject was deleted directly. The program is malformed and may crash.");-
518-
519 }-
520-
521-
522 sharedRefcount->strongref.store(0);-
523 if (!sharedRefcount->weakref.deref())-
524 delete sharedRefcount;-
525 }-
526-
527 if (!d->isWidget && d->isSignalConnected(0)) {-
528 destroyed(this);-
529 }-
530-
531 if (d->declarativeData) {-
532 if (static_cast<QAbstractDeclarativeDataImpl*>(d->declarativeData)->ownedByQml1) {-
533 if (QAbstractDeclarativeData::destroyed_qml1)-
534 QAbstractDeclarativeData::destroyed_qml1(d->declarativeData, this);-
535 } else {-
536 if (QAbstractDeclarativeData::destroyed)-
537 QAbstractDeclarativeData::destroyed(d->declarativeData, this);-
538 }-
539 }-
540-
541-
542 if (d->currentSender != 0)-
543 d->currentSender->ref = 0;-
544 d->currentSender = 0;-
545-
546 if (d->connectionLists || d->senders) {-
547 QMutex *signalSlotMutex = signalSlotLock(this);-
548 QMutexLocker locker(signalSlotMutex);-
549-
550-
551 if (d->connectionLists) {-
552 ++d->connectionLists->inUse;-
553 int connectionListsCount = d->connectionLists->count();-
554 for (int signal = -1; signal < connectionListsCount; ++signal) {-
555 QObjectPrivate::ConnectionList &connectionList =-
556 (*d->connectionLists)[signal];-
557-
558 while (QObjectPrivate::Connection *c = connectionList.first) {-
559 if (!c->receiver) {-
560 connectionList.first = c->nextConnectionList;-
561 c->deref();-
562 continue;-
563 }-
564-
565 QMutex *m = signalSlotLock(c->receiver);-
566 bool needToUnlock = QOrderedMutexLocker::relock(signalSlotMutex, m);-
567-
568 if (c->receiver) {-
569 *c->prev = c->next;-
570 if (c->next) c->next->prev = c->prev;-
571 }-
572 c->receiver = 0;-
573 if (needToUnlock)-
574 m->unlock();-
575-
576 connectionList.first = c->nextConnectionList;-
577-
578-
579 if (c->isSlotObject) {-
580 c->isSlotObject = false;-
581 locker.unlock();-
582 c->slotObj->destroyIfLastRef();-
583 locker.relock();-
584 }-
585 c->deref();-
586 }-
587 }-
588-
589 if (!--d->connectionLists->inUse) {-
590 delete d->connectionLists;-
591 } else {-
592 d->connectionLists->orphaned = true;-
593 }-
594 d->connectionLists = 0;-
595 }-
596 QObjectPrivate::Connection *node = d->senders;-
597 while (node) {-
598 QObject *sender = node->sender;-
599-
600-
601-
602 sender->disconnectNotify(QMetaObjectPrivate::signal(sender->metaObject(), node->signal_index));-
603 QMutex *m = signalSlotLock(sender);-
604 node->prev = &node;-
605 bool needToUnlock = QOrderedMutexLocker::relock(signalSlotMutex, m);-
606-
607 if (!node || node->sender != sender) {-
608-
609 ((!(needToUnlock)) ? qt_assert("needToUnlock",__FILE__,10041011) : qt_noop());-
610 m->unlock();-
611 continue;-
612 }-
613 node->receiver = 0;-
614 QObjectConnectionListVector *senderLists = sender->d_func()->connectionLists;-
615 if (senderLists)-
616 senderLists->dirty = true;-
617-
618 QtPrivate::QSlotObjectBase *slotObj = nullptr;-
619 if (node->isSlotObject) {-
620 slotObj = node->slotObj;-
621 node->isSlotObject = false;-
622 }-
623-
624 node = node->next;-
625 if (needToUnlock)-
626 m->unlock();-
627-
628 if (slotObj) {-
629 if (node)-
630 node->prev = &node;-
631 locker.unlock();-
632 slotObj->destroyIfLastRef();-
633 locker.relock();-
634 }-
635 }-
636 }-
637-
638 if (!d->children.isEmpty())-
639 d->deleteChildren();-
640-
641 qt_removeObject(this);-
642 if (__builtin_expect(!!(qtHookData[QHooks::RemoveQObject]), false))-
643 reinterpret_cast<QHooks::RemoveQObjectCallback>(qtHookData[QHooks::RemoveQObject])(this);-
644-
645 if (d->parent)-
646 d->setParent_helper(0);-
647}-
648-
649QObjectPrivate::Connection::~Connection()-
650{-
651 if (ownArgumentTypes) {-
652 const int *v = argumentTypes.load();-
653 if (v != &DIRECT_CONNECTION_ONLY)-
654 delete [] v;-
655 }-
656 if (isSlotObject)-
657 slotObj->destroyIfLastRef();-
658}-
659QString QObject::objectName() const-
660{-
661 const QObjectPrivate * const d = d_func();-
662 return d->extraData ? d->extraData->objectName : QString();-
663}-
664-
665-
666-
667-
668void QObject::setObjectName(const QString &name)-
669{-
670 QObjectPrivate * const d = d_func();-
671 if (!d->extraData)-
672 d->extraData = new QObjectPrivate::ExtraData;-
673-
674 if (d->extraData->objectName != name) {-
675 d->extraData->objectName = name;-
676 objectNameChanged(d->extraData->objectName, QPrivateSignal());-
677 }-
678}-
679bool QObject::event(QEvent *e)-
680{-
681 switch (e->type()) {-
682 case QEvent::Timer:-
683 timerEvent((QTimerEvent*)e);-
684 break;-
685-
686 case QEvent::ChildAdded:-
687 case QEvent::ChildPolished:-
688 case QEvent::ChildRemoved:-
689 childEvent((QChildEvent*)e);-
690 break;-
691-
692 case QEvent::DeferredDelete:-
693 qDeleteInEventHandler(this);-
694 break;-
695-
696 case QEvent::MetaCall:-
697 {-
698 QMetaCallEvent *mce = static_cast<QMetaCallEvent*>(e);-
699-
700 QConnectionSenderSwitcher sw(this, const_cast<QObject*>(mce->sender()), mce->signalId());-
701-
702 mce->placeMetaCall(this);-
703 break;-
704 }-
705-
706 case QEvent::ThreadChange: {-
707 QObjectPrivate * const d = d_func();-
708 QThreadData *threadData = d->threadData;-
709 QAbstractEventDispatcher *eventDispatcher = threadData->eventDispatcher.load();-
710 if (eventDispatcher) {-
711 QList<QAbstractEventDispatcher::TimerInfo> timers = eventDispatcher->registeredTimers(this);-
712 if (!timers.isEmpty()) {-
713-
714 eventDispatcher->unregisterTimers(this);-
715 QMetaObject::invokeMethod(this, "_q_reregisterTimers", Qt::QueuedConnection,-
716 QArgument<void* >("void*", (new QList<QAbstractEventDispatcher::TimerInfo>(timers))));-
717 }-
718 }-
719 break;-
720 }-
721-
722 default:-
723 if (e->type() >= QEvent::User) {-
724 customEvent(e);-
725 break;-
726 }-
727 return false;-
728 }-
729 return true;-
730}-
731void QObject::timerEvent(QTimerEvent *)-
732{-
733}-
734void QObject::childEvent(QChildEvent * )-
735{-
736}-
737void QObject::customEvent(QEvent * )-
738{-
739}-
740bool QObject::eventFilter(QObject * , QEvent * )-
741{-
742 return false;-
743}-
744bool QObject::blockSignals(bool block) noexcept-
745{-
746 QObjectPrivate * const d = d_func();-
747 bool previous = d->blockSig;-
748 d->blockSig = block;-
749 return
executed 39656 times by 104 tests: return previous;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • ...
previous;
executed 39656 times by 104 tests: return previous;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBrush
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataStream
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • ...
39656
750}-
751-
752-
753-
754-
755-
756-
757QThread *QObject::thread() const-
758{-
759 return d_func()->threadData->thread;-
760}-
761void QObject::moveToThread(QThread *targetThread)-
762{-
763 QObjectPrivate * const d = d_func();-
764-
765 if (d->threadData->thread == targetThread) {-
766-
767 return;-
768 }-
769-
770 if (d->parent != 0) {-
771 QMessageLogger(__FILE__, 14721479, __PRETTY_FUNCTION__).warning("QObject::moveToThread: Cannot move objects with a parent");-
772 return;-
773 }-
774 if (d->isWidget) {-
775 QMessageLogger(__FILE__, 14761483, __PRETTY_FUNCTION__).warning("QObject::moveToThread: Widgets cannot be moved to a new thread");-
776 return;-
777 }-
778-
779 QThreadData *currentData = QThreadData::current();-
780 QThreadData *targetData = targetThread ? QThreadData::get2(targetThread) : nullptr;-
781 if (d->threadData->thread == 0 && currentData == targetData) {-
782-
783 currentData = d->threadData;-
784 } else if (d->threadData != currentData) {-
785 QMessageLogger(__FILE__, 14861493, __PRETTY_FUNCTION__).warning("QObject::moveToThread: Current thread (%p) is not the object's thread (%p).\n"-
786 "Cannot move to target thread (%p)\n",-
787 currentData->thread.load(), d->threadData->thread.load(), targetData ? targetData->thread.load() : nullptr);-
788-
789-
790-
791-
792-
793-
794-
795 return;-
796 }-
797-
798-
799 d->moveToThread_helper();-
800-
801 if (!targetData)-
802 targetData = new QThreadData(0);-
803-
804 QOrderedMutexLocker locker(&currentData->postEventList.mutex,-
805 &targetData->postEventList.mutex);-
806-
807-
808 currentData->ref();-
809-
810-
811 d_func()->setThreadData_helper(currentData, targetData);-
812-
813 locker.unlock();-
814-
815-
816 currentData->deref();-
817}-
818-
819void QObjectPrivate::moveToThread_helper()-
820{-
821 QObject * const q = q_func();-
822 QEvent e(QEvent::ThreadChange);-
823 QCoreApplication::sendEvent(q, &e);-
824 for (int i = 0; i < children.size(); ++i) {-
825 QObject *child = children.at(i);-
826 child->d_func()->moveToThread_helper();-
827 }-
828}-
829-
830void QObjectPrivate::setThreadData_helper(QThreadData *currentData, QThreadData *targetData)-
831{-
832 QObject * const q = q_func();-
833-
834-
835 int eventsMoved = 0;-
836 for (int i = 0; i < currentData->postEventList.size(); ++i) {-
837 const QPostEvent &pe = currentData->postEventList.at(i);-
838 if (!pe.event)-
839 continue;-
840 if (pe.receiver == q) {-
841-
842 targetData->postEventList.addEvent(pe);-
843 const_cast<QPostEvent &>(pe).event = 0;-
844 ++eventsMoved;-
845 }-
846 }-
847 if (eventsMoved > 0 && targetData->eventDispatcher.load()) {-
848 targetData->canWait = false;-
849 targetData->eventDispatcher.load()->wakeUp();-
850 }-
851-
852-
853 if (currentSender)-
854 currentSender->ref = 0;-
855 currentSender = 0;-
856-
857-
858 targetData->ref();-
859 threadData->deref();-
860 threadData = targetData;-
861-
862 for (int i = 0; i < children.size(); ++i) {-
863 QObject *child = children.at(i);-
864 child->d_func()->setThreadData_helper(currentData, targetData);-
865 }-
866}-
867-
868void QObjectPrivate::_q_reregisterTimers(void *pointer)-
869{-
870 QObject * const q = q_func();-
871 QList<QAbstractEventDispatcher::TimerInfo> *timerList = reinterpret_cast<QList<QAbstractEventDispatcher::TimerInfo> *>(pointer);-
872 QAbstractEventDispatcher *eventDispatcher = threadData->eventDispatcher.load();-
873 for (int i = 0; i < timerList->size(); ++i) {-
874 const QAbstractEventDispatcher::TimerInfo &ti = timerList->at(i);-
875 eventDispatcher->registerTimer(ti.timerId, ti.interval, ti.timerType, q);-
876 }-
877 delete timerList;-
878}-
879int QObject::startTimer(int interval, Qt::TimerType timerType)-
880{-
881 QObjectPrivate * const d = d_func();-
882-
883 if (__builtin_expect(!!(interval < 0), false)) {-
884 QMessageLogger(__FILE__, 16281635, __PRETTY_FUNCTION__).warning("QObject::startTimer: Timers cannot have negative intervals");-
885 return 0;-
886 }-
887 if (__builtin_expect(!!(!d->threadData->eventDispatcher.load()), false)) {-
888 QMessageLogger(__FILE__, 16321639, __PRETTY_FUNCTION__).warning("QObject::startTimer: Timers can only be used with threads started with QThread");-
889 return 0;-
890 }-
891 if (__builtin_expect(!!(thread() != QThread::currentThread()), false)) {-
892 QMessageLogger(__FILE__, 16361643, __PRETTY_FUNCTION__).warning("QObject::startTimer: Timers cannot be started from another thread");-
893 return 0;-
894 }-
895 int timerId = d->threadData->eventDispatcher.load()->registerTimer(interval, timerType, this);-
896 if (!d->extraData)-
897 d->extraData = new QObjectPrivate::ExtraData;-
898 d->extraData->runningTimers.append(timerId);-
899 return timerId;-
900}-
901void QObject::killTimer(int id)-
902{-
903 QObjectPrivate * const d = d_func();-
904 if (__builtin_expect(!!(thread() != QThread::currentThread()), false)) {-
905 QMessageLogger(__FILE__, 16591666, __PRETTY_FUNCTION__).warning("QObject::killTimer: Timers cannot be stopped from another thread");-
906 return;-
907 }-
908 if (id) {-
909 int at = d->extraData ? d->extraData->runningTimers.indexOf(id) : -1;-
910 if (at == -1) {-
911-
912 QMessageLogger(__FILE__, 16661673, __PRETTY_FUNCTION__).warning("QObject::killTimer(): Error: timer id %d is not valid for object %p (%s, %s), timer has not been killed",-
913 id,-
914 this,-
915 metaObject()->className(),-
916 QString(objectName()).toLocal8Bit().constData());-
917 return;-
918 }-
919-
920 if (d->threadData->eventDispatcher.load())-
921 d->threadData->eventDispatcher.load()->unregisterTimer(id);-
922-
923 d->extraData->runningTimers.remove(at);-
924 QAbstractEventDispatcherPrivate::releaseTimerId(id);-
925 }-
926}-
927void qt_qFindChildren_helper(const QObject *parent, const QString &name,-
928 const QMetaObject &mo, QList<void*> *list, Qt::FindChildOptions options)-
929{-
930 if (!parent || !list)-
931 return;-
932 const QObjectList &children = parent->children();-
933 QObject *obj;-
934 for (int i = 0; i < children.size(); ++i) {-
935 obj = children.at(i);-
936 if (mo.cast(obj)) {-
937 if (name.isNull() || obj->objectName() == name)-
938 list->append(obj);-
939 }-
940 if (options & Qt::FindChildrenRecursively)-
941 qt_qFindChildren_helper(obj, name, mo, list, options);-
942 }-
943}-
944-
945-
946-
947-
948-
949void qt_qFindChildren_helper(const QObject *parent, const QRegExp &re,-
950 const QMetaObject &mo, QList<void*> *list, Qt::FindChildOptions options)-
951{-
952 if (!parent || !list)-
953 return;-
954 const QObjectList &children = parent->children();-
955 QRegExp reCopy = re;-
956 QObject *obj;-
957 for (int i = 0; i < children.size(); ++i) {-
958 obj = children.at(i);-
959 if (mo.cast(obj) && reCopy.indexIn(obj->objectName()) != -1)-
960 list->append(obj);-
961-
962 if (options & Qt::FindChildrenRecursively)-
963 qt_qFindChildren_helper(obj, re, mo, list, options);-
964 }-
965}-
966-
967-
968-
969-
970-
971-
972void qt_qFindChildren_helper(const QObject *parent, const QRegularExpression &re,-
973 const QMetaObject &mo, QList<void*> *list, Qt::FindChildOptions options)-
974{-
975 if (!parent || !list)-
976 return;-
977 const QObjectList &children = parent->children();-
978 QObject *obj;-
979 for (int i = 0; i < children.size(); ++i) {-
980 obj = children.at(i);-
981 if (mo.cast(obj)) {-
982 QRegularExpressionMatch m = re.match(obj->objectName());-
983 if (m.hasMatch())-
984 list->append(obj);-
985 }-
986 if (options & Qt::FindChildrenRecursively)-
987 qt_qFindChildren_helper(obj, re, mo, list, options);-
988 }-
989}-
990-
991-
992-
993-
994-
995QObject *qt_qFindChild_helper(const QObject *parent, const QString &name, const QMetaObject &mo, Qt::FindChildOptions options)-
996{-
997 if (!parent)-
998 return 0;-
999 const QObjectList &children = parent->children();-
1000 QObject *obj;-
1001 int i;-
1002 for (i = 0; i < children.size(); ++i) {-
1003 obj = children.at(i);-
1004 if (mo.cast(obj) && (name.isNull() || obj->objectName() == name))-
1005 return obj;-
1006 }-
1007 if (options & Qt::FindChildrenRecursively) {-
1008 for (i = 0; i < children.size(); ++i) {-
1009 obj = qt_qFindChild_helper(children.at(i), name, mo, options);-
1010 if (obj)-
1011 return obj;-
1012 }-
1013 }-
1014 return 0;-
1015}-
1016-
1017-
1018-
1019-
1020-
1021-
1022void QObject::setParent(QObject *parent)-
1023{-
1024 QObjectPrivate * const d = d_func();-
1025 ((!(!d->isWidget)) ? qt_assert("!d->isWidget",__FILE__,19491956) : qt_noop());-
1026 d->setParent_helper(parent);-
1027}-
1028-
1029void QObjectPrivate::deleteChildren()-
1030{-
1031 ((!(!isDeletingChildren)) ? qt_assert_x("QObjectPrivate::deleteChildren()", "isDeletingChildren already set, did this function recurse?",__FILE__,19551962) : qt_noop());-
1032 isDeletingChildren = true;-
1033-
1034-
1035-
1036 for (int i = 0; i < children.count(); ++i) {-
1037 currentChildBeingDeleted = children.at(i);-
1038 children[i] = 0;-
1039 delete currentChildBeingDeleted;-
1040 }-
1041 children.clear();-
1042 currentChildBeingDeleted = 0;-
1043 isDeletingChildren = false;-
1044}-
1045-
1046void QObjectPrivate::setParent_helper(QObject *o)-
1047{-
1048 QObject * const q = q_func();-
1049 if (o == parent)-
1050 return;-
1051 if (parent) {-
1052 QObjectPrivate *parentD = parent->d_func();-
1053 if (parentD->isDeletingChildren && wasDeleted-
1054 && parentD->currentChildBeingDeleted == q) {-
1055-
1056-
1057 } else {-
1058 const int index = parentD->children.indexOf(q);-
1059 if (parentD->isDeletingChildren) {-
1060 parentD->children[index] = 0;-
1061 } else {-
1062 parentD->children.removeAt(index);-
1063 if (sendChildEvents && parentD->receiveChildEvents) {-
1064 QChildEvent e(QEvent::ChildRemoved, q);-
1065 QCoreApplication::sendEvent(parent, &e);-
1066 }-
1067 }-
1068 }-
1069 }-
1070 parent = o;-
1071 if (parent) {-
1072-
1073 if (threadData != parent->d_func()->threadData) {-
1074 QMessageLogger(__FILE__, 19982005, __PRETTY_FUNCTION__).warning("QObject::setParent: Cannot set parent, new parent is in a different thread");-
1075 parent = 0;-
1076 return;-
1077 }-
1078 parent->d_func()->children.append(q);-
1079 if(sendChildEvents && parent->d_func()->receiveChildEvents) {-
1080 if (!isWidget) {-
1081 QChildEvent e(QEvent::ChildAdded, q);-
1082 QCoreApplication::sendEvent(parent, &e);-
1083 }-
1084 }-
1085 }-
1086 if (!wasDeleted && !isDeletingChildren && declarativeData && QAbstractDeclarativeData::parentChanged)-
1087 QAbstractDeclarativeData::parentChanged(declarativeData, q, o);-
1088}-
1089void QObject::installEventFilter(QObject *obj)-
1090{-
1091 QObjectPrivate * const d = d_func();-
1092 if (!obj)-
1093 return;-
1094 if (d->threadData != obj->d_func()->threadData) {-
1095 QMessageLogger(__FILE__, 20622069, __PRETTY_FUNCTION__).warning("QObject::installEventFilter(): Cannot filter events for objects in a different thread.");-
1096 return;-
1097 }-
1098-
1099 if (!d->extraData)-
1100 d->extraData = new QObjectPrivate::ExtraData;-
1101-
1102-
1103 d->extraData->eventFilters.removeAll((QObject*)0);-
1104 d->extraData->eventFilters.removeAll(obj);-
1105 d->extraData->eventFilters.prepend(obj);-
1106}-
1107void QObject::removeEventFilter(QObject *obj)-
1108{-
1109 QObjectPrivate * const d = d_func();-
1110 if (d->extraData) {-
1111 for (int i = 0; i < d->extraData->eventFilters.count(); ++i) {-
1112 if (d->extraData->eventFilters.at(i) == obj)-
1113 d->extraData->eventFilters[i] = 0;-
1114 }-
1115 }-
1116}-
1117void QObject::deleteLater()-
1118{-
1119 QCoreApplication::postEvent(this, new QDeferredDeleteEvent());-
1120}-
1121const char *qFlagLocation(const char *method)-
1122{-
1123 QThreadData *currentThreadData = QThreadData::current(false);-
1124 if (currentThreadData != 0)-
1125 currentThreadData->flaggedSignatures.store(method);-
1126 return method;-
1127}-
1128-
1129static int extract_code(const char *member)-
1130{-
1131-
1132 return (((int)(*member) - '0') & 0x3);-
1133}-
1134-
1135static const char * extract_location(const char *member)-
1136{-
1137 if (QThreadData::current()->flaggedSignatures.contains(member)) {-
1138-
1139 const char *location = member + qstrlen(member) + 1;-
1140 if (*location != '\0')-
1141 return location;-
1142 }-
1143 return 0;-
1144}-
1145-
1146static bool check_signal_macro(const QObject *sender, const char *signal,-
1147 const char *func, const char *op)-
1148{-
1149 int sigcode = extract_code(signal);-
1150 if (sigcode != 2) {-
1151 if (sigcode == 1)-
1152 QMessageLogger(__FILE__, 22402247, __PRETTY_FUNCTION__).warning("QObject::%s: Attempt to %s non-signal %s::%s",-
1153 func, op, sender->metaObject()->className(), signal+1);-
1154 else-
1155 QMessageLogger(__FILE__, 22432250, __PRETTY_FUNCTION__).warning("QObject::%s: Use the SIGNAL macro to %s %s::%s",-
1156 func, op, sender->metaObject()->className(), signal);-
1157 return false;-
1158 }-
1159 return true;-
1160}-
1161-
1162static bool check_method_code(int code, const QObject *object,-
1163 const char *method, const char *func)-
1164{-
1165 if (code != 1 && code != 2) {-
1166 QMessageLogger(__FILE__, 22542261, __PRETTY_FUNCTION__).warning("QObject::%s: Use the SLOT or SIGNAL macro to "-
1167 "%s %s::%s", func, func, object->metaObject()->className(), method);-
1168 return false;-
1169 }-
1170 return true;-
1171}-
1172-
1173static void err_method_notfound(const QObject *object,-
1174 const char *method, const char *func)-
1175{-
1176 const char *type = "method";-
1177 switch (extract_code(method)) {-
1178 case 1: type = "slot"; break;-
1179 case 2: type = "signal"; break;-
1180 }-
1181 const char *loc = extract_location(method);-
1182 if (strchr(method,')') == 0)-
1183 QMessageLogger(__FILE__, 22712278, __PRETTY_FUNCTION__).warning("QObject::%s: Parentheses expected, %s %s::%s%s%s",-
1184 func, type, object->metaObject()->className(), method+1,-
1185 loc ? " in ": "", loc ? loc : "");-
1186 else-
1187 QMessageLogger(__FILE__, 22752282, __PRETTY_FUNCTION__).warning("QObject::%s: No such %s %s::%s%s%s",-
1188 func, type, object->metaObject()->className(), method+1,-
1189 loc ? " in ": "", loc ? loc : "");-
1190-
1191}-
1192-
1193-
1194static void err_info_about_objects(const char * func,-
1195 const QObject * sender,-
1196 const QObject * receiver)-
1197{-
1198 QString a = sender ? sender->objectName() : QString();-
1199 QString b = receiver ? receiver->objectName() : QString();-
1200 if (!a.isEmpty())-
1201 QMessageLogger(__FILE__, 22892296, __PRETTY_FUNCTION__).warning("QObject::%s: (sender name: '%s')", func, a.toLocal8Bit().data());-
1202 if (!b.isEmpty())-
1203 QMessageLogger(__FILE__, 22912298, __PRETTY_FUNCTION__).warning("QObject::%s: (receiver name: '%s')", func, b.toLocal8Bit().data());-
1204}-
1205QObject *QObject::sender() const-
1206{-
1207 const QObjectPrivate * const d = d_func();-
1208-
1209 QMutexLocker locker(signalSlotLock(this));-
1210 if (!d->currentSender)-
1211 return 0;-
1212-
1213 for (QObjectPrivate::Connection *c = d->senders; c; c = c->next) {-
1214 if (c->sender == d->currentSender->sender)-
1215 return d->currentSender->sender;-
1216 }-
1217-
1218 return 0;-
1219}-
1220int QObject::senderSignalIndex() const-
1221{-
1222 const QObjectPrivate * const d = d_func();-
1223-
1224 QMutexLocker locker(signalSlotLock(this));-
1225 if (!d->currentSender)-
1226 return -1;-
1227-
1228 for (QObjectPrivate::Connection *c = d->senders; c; c = c->next) {-
1229 if (c->sender == d->currentSender->sender) {-
1230-
1231 return QMetaObjectPrivate::signal(c->sender->metaObject(), d->currentSender->signal).methodIndex();-
1232 }-
1233 }-
1234-
1235 return -1;-
1236}-
1237int QObject::receivers(const char *signal) const-
1238{-
1239 const QObjectPrivate * const d = d_func();-
1240 int receivers = 0;-
1241 if (signal) {-
1242 QByteArray signal_name = QMetaObject::normalizedSignature(signal);-
1243 signal = signal_name;-
1244-
1245 if (!check_signal_macro(this, signal, "receivers", "bind"))-
1246 return 0;-
1247-
1248 signal++;-
1249 int signal_index = d->signalIndex(signal);-
1250 if (signal_index < 0) {-
1251-
1252 err_method_notfound(this, signal-1, "receivers");-
1253-
1254 return 0;-
1255 }-
1256-
1257 if (!d->isSignalConnected(signal_index))-
1258 return receivers;-
1259-
1260 if (d->declarativeData && QAbstractDeclarativeData::receivers) {-
1261 receivers += QAbstractDeclarativeData::receivers(d->declarativeData, this,-
1262 signal_index);-
1263 }-
1264-
1265 QMutexLocker locker(signalSlotLock(this));-
1266 if (d->connectionLists) {-
1267 if (signal_index < d->connectionLists->count()) {-
1268 const QObjectPrivate::Connection *c =-
1269 d->connectionLists->at(signal_index).first;-
1270 while (c) {-
1271 receivers += c->receiver ? 1 : 0;-
1272 c = c->nextConnectionList;-
1273 }-
1274 }-
1275 }-
1276 }-
1277 return receivers;-
1278}-
1279bool QObject::isSignalConnected(const QMetaMethod &signal) const-
1280{-
1281 const QObjectPrivate * const d = d_func();-
1282 if (!signal.mobj)-
1283 return false;-
1284-
1285 ((!(signal.mobj->cast(this) && signal.methodType() == QMetaMethod::Signal)) ? qt_assert_x("QObject::isSignalConnected", "the parameter must be a signal member of the object",-
1286 __FILE__-
1287 ,-
1288 24642471-
1289 ) : qt_noop())-
1290 ;-
1291 uint signalIndex = (signal.handle - QMetaObjectPrivate::get(signal.mobj)->methodData)/5;-
1292-
1293 if (signal.mobj->d.data[signal.handle + 4] & MethodCloned)-
1294 signalIndex = QMetaObjectPrivate::originalClone(signal.mobj, signalIndex);-
1295-
1296 signalIndex += QMetaObjectPrivate::signalOffset(signal.mobj);-
1297-
1298 if (signalIndex < sizeof(d->connectedSignals) * 8)-
1299 return d->isSignalConnected(signalIndex);-
1300-
1301 QMutexLocker locker(signalSlotLock(this));-
1302 if (d->connectionLists) {-
1303 if (signalIndex < uint(d->connectionLists->count())) {-
1304 const QObjectPrivate::Connection *c =-
1305 d->connectionLists->at(signalIndex).first;-
1306 while (c) {-
1307 if (c->receiver)-
1308 return true;-
1309 c = c->nextConnectionList;-
1310 }-
1311 }-
1312 }-
1313 return false;-
1314}-
1315void QMetaObjectPrivate::memberIndexes(const QObject *obj,-
1316 const QMetaMethod &member,-
1317 int *signalIndex, int *methodIndex)-
1318{-
1319 *signalIndex = -1;-
1320 *methodIndex = -1;-
1321 if (!obj || !member.mobj)-
1322 return;-
1323 const QMetaObject *m = obj->metaObject();-
1324-
1325 while (m != 0 && m != member.mobj)-
1326 m = m->d.superdata;-
1327 if (!m)-
1328 return;-
1329 *signalIndex = *methodIndex = (member.handle - get(member.mobj)->methodData)/5;-
1330-
1331 int signalOffset;-
1332 int methodOffset;-
1333 computeOffsets(m, &signalOffset, &methodOffset);-
1334-
1335 *methodIndex += methodOffset;-
1336 if (member.methodType() == QMetaMethod::Signal) {-
1337 *signalIndex = originalClone(m, *signalIndex);-
1338 *signalIndex += signalOffset;-
1339 } else {-
1340 *signalIndex = -1;-
1341 }-
1342}-
1343-
1344-
1345static inline void check_and_warn_compat(const QMetaObject *sender, const QMetaMethod &signal,-
1346 const QMetaObject *receiver, const QMetaMethod &method)-
1347{-
1348 if (signal.attributes() & QMetaMethod::Compatibility) {-
1349 if (!(method.attributes() & QMetaMethod::Compatibility))-
1350 QMessageLogger(__FILE__, 25482555, __PRETTY_FUNCTION__).warning("QObject::connect: Connecting from COMPAT signal (%s::%s)",-
1351 sender->className(), signal.methodSignature().constData());-
1352 } else if ((method.attributes() & QMetaMethod::Compatibility) &&-
1353 method.methodType() == QMetaMethod::Signal) {-
1354 QMessageLogger(__FILE__, 25522559, __PRETTY_FUNCTION__).warning("QObject::connect: Connecting from %s::%s to COMPAT slot (%s::%s)",-
1355 sender->className(), signal.methodSignature().constData(),-
1356 receiver->className(), method.methodSignature().constData());-
1357 }-
1358}-
1359QMetaObject::Connection QObject::connect(const QObject *sender, const char *signal,-
1360 const QObject *receiver, const char *method,-
1361 Qt::ConnectionType type)-
1362{-
1363 if (sender == 0 || receiver == 0 || signal == 0 || method == 0) {-
1364 QMessageLogger(__FILE__, 26312638, __PRETTY_FUNCTION__).warning("QObject::connect: Cannot connect %s::%s to %s::%s",-
1365 sender ? sender->metaObject()->className() : "(null)",-
1366 (signal && *signal) ? signal+1 : "(null)",-
1367 receiver ? receiver->metaObject()->className() : "(null)",-
1368 (method && *method) ? method+1 : "(null)");-
1369 return QMetaObject::Connection(0);-
1370 }-
1371 QByteArray tmp_signal_name;-
1372-
1373 if (!check_signal_macro(sender, signal, "connect", "bind"))-
1374 return QMetaObject::Connection(0);-
1375 const QMetaObject *smeta = sender->metaObject();-
1376 const char *signal_arg = signal;-
1377 ++signal;-
1378 QArgumentTypeArray signalTypes;-
1379 ((!(QMetaObjectPrivate::get(smeta)->revision >= 7)) ? qt_assert("QMetaObjectPrivate::get(smeta)->revision >= 7",__FILE__,26462653) : qt_noop());-
1380 QByteArray signalName = QMetaObjectPrivate::decodeMethodSignature(signal, signalTypes);-
1381 int signal_index = QMetaObjectPrivate::indexOfSignalRelative(-
1382 &smeta, signalName, signalTypes.size(), signalTypes.constData());-
1383 if (signal_index < 0) {-
1384-
1385 tmp_signal_name = QMetaObject::normalizedSignature(signal - 1);-
1386 signal = tmp_signal_name.constData() + 1;-
1387-
1388 signalTypes.clear();-
1389 signalName = QMetaObjectPrivate::decodeMethodSignature(signal, signalTypes);-
1390 smeta = sender->metaObject();-
1391 signal_index = QMetaObjectPrivate::indexOfSignalRelative(-
1392 &smeta, signalName, signalTypes.size(), signalTypes.constData());-
1393 }-
1394 if (signal_index < 0) {-
1395 err_method_notfound(sender, signal_arg, "connect");-
1396 err_info_about_objects("connect", sender, receiver);-
1397 return QMetaObject::Connection(0);-
1398 }-
1399 signal_index = QMetaObjectPrivate::originalClone(smeta, signal_index);-
1400 signal_index += QMetaObjectPrivate::signalOffset(smeta);-
1401-
1402 QByteArray tmp_method_name;-
1403 int membcode = extract_code(method);-
1404-
1405 if (!check_method_code(membcode, receiver, method, "connect"))-
1406 return QMetaObject::Connection(0);-
1407 const char *method_arg = method;-
1408 ++method;-
1409-
1410 QArgumentTypeArray methodTypes;-
1411 QByteArray methodName = QMetaObjectPrivate::decodeMethodSignature(method, methodTypes);-
1412 const QMetaObject *rmeta = receiver->metaObject();-
1413 int method_index_relative = -1;-
1414 ((!(QMetaObjectPrivate::get(rmeta)->revision >= 7)) ? qt_assert("QMetaObjectPrivate::get(rmeta)->revision >= 7",__FILE__,26812688) : qt_noop());-
1415 switch (membcode) {-
1416 case 1:-
1417 method_index_relative = QMetaObjectPrivate::indexOfSlotRelative(-
1418 &rmeta, methodName, methodTypes.size(), methodTypes.constData());-
1419 break;-
1420 case 2:-
1421 method_index_relative = QMetaObjectPrivate::indexOfSignalRelative(-
1422 &rmeta, methodName, methodTypes.size(), methodTypes.constData());-
1423 break;-
1424 }-
1425 if (method_index_relative < 0) {-
1426-
1427 tmp_method_name = QMetaObject::normalizedSignature(method);-
1428 method = tmp_method_name.constData();-
1429-
1430 methodTypes.clear();-
1431 methodName = QMetaObjectPrivate::decodeMethodSignature(method, methodTypes);-
1432-
1433 rmeta = receiver->metaObject();-
1434 switch (membcode) {-
1435 case 1:-
1436 method_index_relative = QMetaObjectPrivate::indexOfSlotRelative(-
1437 &rmeta, methodName, methodTypes.size(), methodTypes.constData());-
1438 break;-
1439 case 2:-
1440 method_index_relative = QMetaObjectPrivate::indexOfSignalRelative(-
1441 &rmeta, methodName, methodTypes.size(), methodTypes.constData());-
1442 break;-
1443 }-
1444 }-
1445-
1446 if (method_index_relative < 0) {-
1447 err_method_notfound(receiver, method_arg, "connect");-
1448 err_info_about_objects("connect", sender, receiver);-
1449 return QMetaObject::Connection(0);-
1450 }-
1451-
1452 if (!QMetaObjectPrivate::checkConnectArgs(signalTypes.size(), signalTypes.constData(),-
1453 methodTypes.size(), methodTypes.constData())) {-
1454 QMessageLogger(__FILE__, 27212728, __PRETTY_FUNCTION__).warning("QObject::connect: Incompatible sender/receiver arguments"-
1455 "\n %s::%s --> %s::%s",-
1456 sender->metaObject()->className(), signal,-
1457 receiver->metaObject()->className(), method);-
1458 return QMetaObject::Connection(0);-
1459 }-
1460-
1461 int *types = 0;-
1462 if ((type == Qt::QueuedConnection)-
1463 && !(types = queuedConnectionTypes(signalTypes.constData(), signalTypes.size()))) {-
1464 return QMetaObject::Connection(0);-
1465 }-
1466-
1467-
1468 QMetaMethod smethod = QMetaObjectPrivate::signal(smeta, signal_index);-
1469 QMetaMethod rmethod = rmeta->method(method_index_relative + rmeta->methodOffset());-
1470 check_and_warn_compat(smeta, smethod, rmeta, rmethod);-
1471-
1472 QMetaObject::Connection handle = QMetaObject::Connection(QMetaObjectPrivate::connect(-
1473 sender, signal_index, smeta, receiver, method_index_relative, rmeta ,type, types));-
1474 return handle;-
1475}-
1476QMetaObject::Connection QObject::connect(const QObject *sender, const QMetaMethod &signal,-
1477 const QObject *receiver, const QMetaMethod &method,-
1478 Qt::ConnectionType type)-
1479{-
1480 if (sender == 0-
1481 || receiver == 0-
1482 || signal.methodType() != QMetaMethod::Signal-
1483 || method.methodType() == QMetaMethod::Constructor) {-
1484 QMessageLogger(__FILE__, 27722779, __PRETTY_FUNCTION__).warning("QObject::connect: Cannot connect %s::%s to %s::%s",-
1485 sender ? sender->metaObject()->className() : "(null)",-
1486 signal.methodSignature().constData(),-
1487 receiver ? receiver->metaObject()->className() : "(null)",-
1488 method.methodSignature().constData() );-
1489 return QMetaObject::Connection(0);-
1490 }-
1491-
1492 int signal_index;-
1493 int method_index;-
1494 {-
1495 int dummy;-
1496 QMetaObjectPrivate::memberIndexes(sender, signal, &signal_index, &dummy);-
1497 QMetaObjectPrivate::memberIndexes(receiver, method, &dummy, &method_index);-
1498 }-
1499-
1500 const QMetaObject *smeta = sender->metaObject();-
1501 const QMetaObject *rmeta = receiver->metaObject();-
1502 if (signal_index == -1) {-
1503 QMessageLogger(__FILE__, 27912798, __PRETTY_FUNCTION__).warning("QObject::connect: Can't find signal %s on instance of class %s",-
1504 signal.methodSignature().constData(), smeta->className());-
1505 return QMetaObject::Connection(0);-
1506 }-
1507 if (method_index == -1) {-
1508 QMessageLogger(__FILE__, 27962803, __PRETTY_FUNCTION__).warning("QObject::connect: Can't find method %s on instance of class %s",-
1509 method.methodSignature().constData(), rmeta->className());-
1510 return QMetaObject::Connection(0);-
1511 }-
1512-
1513 if (!QMetaObject::checkConnectArgs(signal.methodSignature().constData(), method.methodSignature().constData())) {-
1514 QMessageLogger(__FILE__, 28022809, __PRETTY_FUNCTION__).warning("QObject::connect: Incompatible sender/receiver arguments"-
1515 "\n %s::%s --> %s::%s",-
1516 smeta->className(), signal.methodSignature().constData(),-
1517 rmeta->className(), method.methodSignature().constData());-
1518 return QMetaObject::Connection(0);-
1519 }-
1520-
1521 int *types = 0;-
1522 if ((type == Qt::QueuedConnection)-
1523 && !(types = queuedConnectionTypes(signal.parameterTypes())))-
1524 return QMetaObject::Connection(0);-
1525-
1526-
1527 check_and_warn_compat(smeta, signal, rmeta, method);-
1528-
1529 QMetaObject::Connection handle = QMetaObject::Connection(QMetaObjectPrivate::connect(-
1530 sender, signal_index, signal.enclosingMetaObject(), receiver, method_index, 0, type, types));-
1531 return handle;-
1532}-
1533bool QObject::disconnect(const QObject *sender, const char *signal,-
1534 const QObject *receiver, const char *method)-
1535{-
1536 if (sender == 0 || (receiver == 0 && method != 0)) {-
1537 QMessageLogger(__FILE__, 29022909, __PRETTY_FUNCTION__).warning("QObject::disconnect: Unexpected null parameter");-
1538 return false;-
1539 }-
1540-
1541 const char *signal_arg = signal;-
1542 QByteArray signal_name;-
1543 bool signal_found = false;-
1544 if (signal) {-
1545 try {-
1546 signal_name = QMetaObject::normalizedSignature(signal);-
1547 signal = signal_name.constData();-
1548 } catch (const std::bad_alloc &) {-
1549-
1550 if (sender->metaObject()->indexOfSignal(signal + 1) == -1)-
1551 throw;-
1552 }-
1553-
1554 if (!check_signal_macro(sender, signal, "disconnect", "unbind"))-
1555 return false;-
1556 signal++;-
1557 }-
1558-
1559 QByteArray method_name;-
1560 const char *method_arg = method;-
1561 int membcode = -1;-
1562 bool method_found = false;-
1563 if (method) {-
1564 try {-
1565 method_name = QMetaObject::normalizedSignature(method);-
1566 method = method_name.constData();-
1567 } catch (const std::bad_alloc &) {-
1568-
1569 if (receiver->metaObject()->indexOfMethod(method + 1) == -1)-
1570 throw;-
1571 }-
1572-
1573 membcode = extract_code(method);-
1574 if (!check_method_code(membcode, receiver, method, "disconnect"))-
1575 return false;-
1576 method++;-
1577 }-
1578-
1579-
1580-
1581-
1582-
1583 bool res = false;-
1584 const QMetaObject *smeta = sender->metaObject();-
1585 QByteArray signalName;-
1586 QArgumentTypeArray signalTypes;-
1587 ((!(QMetaObjectPrivate::get(smeta)->revision >= 7)) ? qt_assert("QMetaObjectPrivate::get(smeta)->revision >= 7",__FILE__,29522959) : qt_noop());-
1588 if (signal)-
1589 signalName = QMetaObjectPrivate::decodeMethodSignature(signal, signalTypes);-
1590 QByteArray methodName;-
1591 QArgumentTypeArray methodTypes;-
1592 ((!(!receiver || QMetaObjectPrivate::get(receiver->metaObject())->revision >= 7)) ? qt_assert("!receiver || QMetaObjectPrivate::get(receiver->metaObject())->revision >= 7",__FILE__,29572964) : qt_noop());-
1593 if (method)-
1594 methodName = QMetaObjectPrivate::decodeMethodSignature(method, methodTypes);-
1595 do {-
1596 int signal_index = -1;-
1597 if (signal) {-
1598 signal_index = QMetaObjectPrivate::indexOfSignalRelative(-
1599 &smeta, signalName, signalTypes.size(), signalTypes.constData());-
1600 if (signal_index < 0)-
1601 break;-
1602 signal_index = QMetaObjectPrivate::originalClone(smeta, signal_index);-
1603 signal_index += QMetaObjectPrivate::signalOffset(smeta);-
1604 signal_found = true;-
1605 }-
1606-
1607 if (!method) {-
1608 res |= QMetaObjectPrivate::disconnect(sender, signal_index, smeta, receiver, -1, 0);-
1609 } else {-
1610 const QMetaObject *rmeta = receiver->metaObject();-
1611 do {-
1612 int method_index = QMetaObjectPrivate::indexOfMethod(-
1613 rmeta, methodName, methodTypes.size(), methodTypes.constData());-
1614 if (method_index >= 0)-
1615 while (method_index < rmeta->methodOffset())-
1616 rmeta = rmeta->superClass();-
1617 if (method_index < 0)-
1618 break;-
1619 res |= QMetaObjectPrivate::disconnect(sender, signal_index, smeta, receiver, method_index, 0);-
1620 method_found = true;-
1621 } while ((rmeta = rmeta->superClass()));-
1622 }-
1623 } while (signal && (smeta = smeta->superClass()));-
1624-
1625 if (signal && !signal_found) {-
1626 err_method_notfound(sender, signal_arg, "disconnect");-
1627 err_info_about_objects("disconnect", sender, receiver);-
1628 } else if (method && !method_found) {-
1629 err_method_notfound(receiver, method_arg, "disconnect");-
1630 err_info_about_objects("disconnect", sender, receiver);-
1631 }-
1632 if (res) {-
1633 if (!signal)-
1634 const_cast<QObject*>(sender)->disconnectNotify(QMetaMethod());-
1635 }-
1636 return res;-
1637}-
1638bool QObject::disconnect(const QObject *sender, const QMetaMethod &signal,-
1639 const QObject *receiver, const QMetaMethod &method)-
1640{-
1641 if (sender == 0 || (receiver == 0 && method.mobj != 0)) {-
1642 QMessageLogger(__FILE__, 30373044, __PRETTY_FUNCTION__).warning("QObject::disconnect: Unexpected null parameter");-
1643 return false;-
1644 }-
1645 if (signal.mobj) {-
1646 if(signal.methodType() != QMetaMethod::Signal) {-
1647 QMessageLogger(__FILE__, 30423049, __PRETTY_FUNCTION__).warning("QObject::%s: Attempt to %s non-signal %s::%s",-
1648 "disconnect","unbind",-
1649 sender->metaObject()->className(), signal.methodSignature().constData());-
1650 return false;-
1651 }-
1652 }-
1653 if (method.mobj) {-
1654 if(method.methodType() == QMetaMethod::Constructor) {-
1655 QMessageLogger(__FILE__, 30503057, __PRETTY_FUNCTION__).warning("QObject::disconect: cannot use constructor as argument %s::%s",-
1656 receiver->metaObject()->className(), method.methodSignature().constData());-
1657 return false;-
1658 }-
1659 }-
1660-
1661-
1662 QByteArray signalSignature;-
1663 if (signal.mobj) {-
1664 signalSignature.reserve(signal.methodSignature().size()+1);-
1665 signalSignature.append((char)(2 + '0'));-
1666 signalSignature.append(signal.methodSignature());-
1667 }-
1668-
1669 int signal_index;-
1670 int method_index;-
1671 {-
1672 int dummy;-
1673 QMetaObjectPrivate::memberIndexes(sender, signal, &signal_index, &dummy);-
1674 QMetaObjectPrivate::memberIndexes(receiver, method, &dummy, &method_index);-
1675 }-
1676-
1677-
1678 if (signal.mobj && signal_index == -1) {-
1679 QMessageLogger(__FILE__, 30743081, __PRETTY_FUNCTION__).warning("QObject::disconect: signal %s not found on class %s",-
1680 signal.methodSignature().constData(), sender->metaObject()->className());-
1681 return false;-
1682 }-
1683-
1684 if (receiver && method.mobj && method_index == -1) {-
1685 QMessageLogger(__FILE__, 30803087, __PRETTY_FUNCTION__).warning("QObject::disconect: method %s not found on class %s",-
1686 method.methodSignature().constData(), receiver->metaObject()->className());-
1687 return false;-
1688 }-
1689-
1690 if (!QMetaObjectPrivate::disconnect(sender, signal_index, signal.mobj, receiver, method_index, 0))-
1691 return false;-
1692-
1693 if (!signal.isValid()) {-
1694-
1695-
1696-
1697-
1698 const_cast<QObject*>(sender)->disconnectNotify(signal);-
1699 }-
1700 return true;-
1701}-
1702void QObject::connectNotify(const QMetaMethod &signal)-
1703{-
1704 (void)signal;;-
1705}-
1706void QObject::disconnectNotify(const QMetaMethod &signal)-
1707{-
1708 (void)signal;;-
1709}-
1710-
1711-
1712-
1713-
1714-
1715static int methodIndexToSignalIndex(const QMetaObject **base, int signal_index)-
1716{-
1717 if (signal_index < 0)-
1718 return signal_index;-
1719 const QMetaObject *metaObject = *base;-
1720 while (metaObject && metaObject->methodOffset() > signal_index)-
1721 metaObject = metaObject->superClass();-
1722-
1723 if (metaObject) {-
1724 int signalOffset, methodOffset;-
1725 computeOffsets(metaObject, &signalOffset, &methodOffset);-
1726 if (signal_index < metaObject->methodCount())-
1727 signal_index = QMetaObjectPrivate::originalClone(metaObject, signal_index - methodOffset) + signalOffset;-
1728 else-
1729 signal_index = signal_index - methodOffset + signalOffset;-
1730 *base = metaObject;-
1731 }-
1732 return signal_index;-
1733}-
1734QMetaObject::Connection QMetaObject::connect(const QObject *sender, int signal_index,-
1735 const QObject *receiver, int method_index, int type, int *types)-
1736{-
1737 const QMetaObject *smeta = sender->metaObject();-
1738 signal_index = methodIndexToSignalIndex(&smeta, signal_index);-
1739 return Connection(QMetaObjectPrivate::connect(sender, signal_index, smeta,-
1740 receiver, method_index,-
1741 0,-
1742 type, types));-
1743}-
1744QObjectPrivate::Connection *QMetaObjectPrivate::connect(const QObject *sender,-
1745 int signal_index, const QMetaObject *smeta,-
1746 const QObject *receiver, int method_index,-
1747 const QMetaObject *rmeta, int type, int *types)-
1748{-
1749 QObject *s = const_cast<QObject *>(sender);-
1750 QObject *r = const_cast<QObject *>(receiver);-
1751-
1752 int method_offset = rmeta ? rmeta->methodOffset() : 0;-
1753 ((!(!rmeta || QMetaObjectPrivate::get(rmeta)->revision >= 6)) ? qt_assert("!rmeta || QMetaObjectPrivate::get(rmeta)->revision >= 6",__FILE__,32453252) : qt_noop());-
1754 QObjectPrivate::StaticMetaCallFunction callFunction =-
1755 rmeta ? rmeta->d.static_metacall : 0;-
1756-
1757 QOrderedMutexLocker locker(signalSlotLock(sender),-
1758 signalSlotLock(receiver));-
1759-
1760 if (type & Qt::UniqueConnection) {-
1761 QObjectConnectionListVector *connectionLists = QObjectPrivate::get(s)->connectionLists;-
1762 if (connectionLists && connectionLists->count() > signal_index) {-
1763 const QObjectPrivate::Connection *c2 =-
1764 (*connectionLists)[signal_index].first;-
1765-
1766 int method_index_absolute = method_index + method_offset;-
1767-
1768 while (c2) {-
1769 if (!c2->isSlotObject && c2->receiver == receiver && c2->method() == method_index_absolute)-
1770 return 0;-
1771 c2 = c2->nextConnectionList;-
1772 }-
1773 }-
1774 type &= Qt::UniqueConnection - 1;-
1775 }-
1776-
1777 QScopedPointer<QObjectPrivate::Connection> c(new QObjectPrivate::Connection);-
1778 c->sender = s;-
1779 c->signal_index = signal_index;-
1780 c->receiver = r;-
1781 c->method_relative = method_index;-
1782 c->method_offset = method_offset;-
1783 c->connectionType = type;-
1784 c->isSlotObject = false;-
1785 c->argumentTypes.store(types);-
1786 c->nextConnectionList = 0;-
1787 c->callFunction = callFunction;-
1788-
1789 QObjectPrivate::get(s)->addConnection(signal_index, c.data());-
1790-
1791 locker.unlock();-
1792 QMetaMethod smethod = QMetaObjectPrivate::signal(smeta, signal_index);-
1793 if (smethod.isValid())-
1794 s->connectNotify(smethod);-
1795-
1796 return c.take();-
1797}-
1798-
1799-
1800-
1801-
1802bool QMetaObject::disconnect(const QObject *sender, int signal_index,-
1803 const QObject *receiver, int method_index)-
1804{-
1805 const QMetaObject *smeta = sender->metaObject();-
1806 signal_index = methodIndexToSignalIndex(&smeta, signal_index);-
1807 return QMetaObjectPrivate::disconnect(sender, signal_index, smeta,-
1808 receiver, method_index, 0);-
1809}-
1810bool QMetaObject::disconnectOne(const QObject *sender, int signal_index,-
1811 const QObject *receiver, int method_index)-
1812{-
1813 const QMetaObject *smeta = sender->metaObject();-
1814 signal_index = methodIndexToSignalIndex(&smeta, signal_index);-
1815 return QMetaObjectPrivate::disconnect(sender, signal_index, smeta,-
1816 receiver, method_index, 0,-
1817 QMetaObjectPrivate::DisconnectOne);-
1818}-
1819-
1820-
1821-
1822-
1823-
1824bool QMetaObjectPrivate::disconnectHelper(QObjectPrivate::Connection *c,-
1825 const QObject *receiver, int method_index, void **slot,-
1826 QMutex *senderMutex, DisconnectType disconnectType)-
1827{-
1828 bool success = false;-
1829 while (c) {-
1830 if (c->receiver-
1831 && (receiver == 0 || (c->receiver == receiver-
1832 && (method_index < 0 || (!c->isSlotObject && c->method() == method_index))-
1833 && (slot == 0 || (c->isSlotObject && c->slotObj->compare(slot)))))) {-
1834 bool needToUnlock = false;-
1835 QMutex *receiverMutex = 0;-
1836 if (c->receiver) {-
1837 receiverMutex = signalSlotLock(c->receiver);-
1838-
1839 needToUnlock = QOrderedMutexLocker::relock(senderMutex, receiverMutex);-
1840 }-
1841 if (c->receiver) {-
1842 *c->prev = c->next;-
1843 if (c->next)-
1844 c->next->prev = c->prev;-
1845 }-
1846-
1847 if (needToUnlock)-
1848 receiverMutex->unlock();-
1849-
1850 c->receiver = 0;-
1851-
1852 if (c->isSlotObject) {-
1853 c->isSlotObject = false;-
1854 senderMutex->unlock();-
1855 c->slotObj->destroyIfLastRef();-
1856 senderMutex->lock();-
1857 }-
1858-
1859 success = true;-
1860-
1861 if (disconnectType == DisconnectOne)-
1862 return success;-
1863 }-
1864 c = c->nextConnectionList;-
1865 }-
1866 return success;-
1867}-
1868-
1869-
1870-
1871-
1872-
1873bool QMetaObjectPrivate::disconnect(const QObject *sender,-
1874 int signal_index, const QMetaObject *smeta,-
1875 const QObject *receiver, int method_index, void **slot,-
1876 DisconnectType disconnectType)-
1877{-
1878 if (!sender)-
1879 return false;-
1880-
1881 QObject *s = const_cast<QObject *>(sender);-
1882-
1883 QMutex *senderMutex = signalSlotLock(sender);-
1884 QMutexLocker locker(senderMutex);-
1885-
1886 QObjectConnectionListVector *connectionLists = QObjectPrivate::get(s)->connectionLists;-
1887 if (!connectionLists)-
1888 return false;-
1889-
1890-
1891 ++connectionLists->inUse;-
1892-
1893 bool success = false;-
1894 if (signal_index < 0) {-
1895-
1896 for (int sig_index = -1; sig_index < connectionLists->count(); ++sig_index) {-
1897 QObjectPrivate::Connection *c =-
1898 (*connectionLists)[sig_index].first;-
1899 if (disconnectHelper(c, receiver, method_index, slot, senderMutex, disconnectType)) {-
1900 success = true;-
1901 connectionLists->dirty = true;-
1902 }-
1903 }-
1904 } else if (signal_index < connectionLists->count()) {-
1905 QObjectPrivate::Connection *c =-
1906 (*connectionLists)[signal_index].first;-
1907 if (disconnectHelper(c, receiver, method_index, slot, senderMutex, disconnectType)) {-
1908 success = true;-
1909 connectionLists->dirty = true;-
1910 }-
1911 }-
1912-
1913 --connectionLists->inUse;-
1914 ((!(connectionLists->inUse >= 0)) ? qt_assert("connectionLists->inUse >= 0",__FILE__,34143421) : qt_noop());-
1915 if (connectionLists->orphaned && !connectionLists->inUse)-
1916 delete connectionLists;-
1917-
1918 locker.unlock();-
1919 if (success) {-
1920 QMetaMethod smethod = QMetaObjectPrivate::signal(smeta, signal_index);-
1921 if (smethod.isValid())-
1922 s->disconnectNotify(smethod);-
1923 }-
1924-
1925 return success;-
1926}-
1927void QMetaObject::connectSlotsByName(QObject *o)-
1928{-
1929 if (!o)-
1930 return;-
1931 const QMetaObject *mo = o->metaObject();-
1932 ((!(mo)) ? qt_assert("mo",__FILE__,34523459) : qt_noop());-
1933 const QObjectList list =-
1934 o->findChildren<QObject *>(QString())-
1935 << o;-
1936-
1937-
1938 for (int i = 0; i < mo->methodCount(); ++i) {-
1939 const QByteArray slotSignature = mo->method(i).methodSignature();-
1940 const char *slot = slotSignature.constData();-
1941 ((!(slot)) ? qt_assert("slot",__FILE__,34613468) : qt_noop());-
1942-
1943-
1944 if (slot[0] != 'o' || slot[1] != 'n' || slot[2] != '_')-
1945 continue;-
1946-
1947-
1948 bool foundIt = false;-
1949 for(int j = 0; j < list.count(); ++j) {-
1950 const QObject *co = list.at(j);-
1951 const QByteArray coName = co->objectName().toLatin1();-
1952-
1953-
1954 if (coName.isEmpty() || qstrncmp(slot + 3, coName.constData(), coName.size()) || slot[coName.size()+3] != '_')-
1955 continue;-
1956-
1957 const char *signal = slot + coName.size() + 4;-
1958-
1959-
1960 const QMetaObject *smeta;-
1961 int sigIndex = co->d_func()->signalIndex(signal, &smeta);-
1962 if (sigIndex < 0) {-
1963-
1964-
1965-
1966-
1967 QList<QByteArray> compatibleSignals;-
1968 const QMetaObject *smo = co->metaObject();-
1969 int sigLen = qstrlen(signal) - 1;-
1970 for (int k = QMetaObjectPrivate::absoluteSignalCount(smo)-1; k >= 0; --k) {-
1971 const QMetaMethod method = QMetaObjectPrivate::signal(smo, k);-
1972 if (!qstrncmp(method.methodSignature().constData(), signal, sigLen)) {-
1973 smeta = method.enclosingMetaObject();-
1974 sigIndex = k;-
1975 compatibleSignals.prepend(method.methodSignature());-
1976 }-
1977 }-
1978 if (compatibleSignals.size() > 1)-
1979 QMessageLogger(__FILE__, 34993506, __PRETTY_FUNCTION__).warning() << "QMetaObject::connectSlotsByName: Connecting slot" << slot-
1980 << "with the first of the following compatible signals:" << compatibleSignals;-
1981 }-
1982-
1983 if (sigIndex < 0)-
1984 continue;-
1985-
1986-
1987 if (Connection(QMetaObjectPrivate::connect(co, sigIndex, smeta, o, i))) {-
1988 foundIt = true;-
1989-
1990-
1991-
1992-
1993 break;-
1994 }-
1995 }-
1996 if (foundIt) {-
1997-
1998 while (mo->method(i + 1).attributes() & QMetaMethod::Cloned)-
1999 ++i;-
2000 } else if (!(mo->method(i).attributes() & QMetaMethod::Cloned)) {-
2001-
2002 int iParen = slotSignature.indexOf('(');-
2003 int iLastUnderscore = slotSignature.lastIndexOf('_', iParen-1);-
2004 if (iLastUnderscore > 3)-
2005 QMessageLogger(__FILE__, 35253532, __PRETTY_FUNCTION__).warning("QMetaObject::connectSlotsByName: No matching signal for %s", slot);-
2006 }-
2007 }-
2008}-
2009-
2010-
2011-
2012-
2013-
2014-
2015static void queued_activate(QObject *sender, int signal, QObjectPrivate::Connection *c, void **argv,-
2016 QMutexLocker &locker)-
2017{-
2018 const int *argumentTypes = c->argumentTypes.load();-
2019 if (!argumentTypes) {-
2020 QMetaMethod m = QMetaObjectPrivate::signal(sender->metaObject(), signal);-
2021 argumentTypes = queuedConnectionTypes(m.parameterTypes());-
2022 if (!argumentTypes)-
2023 argumentTypes = &DIRECT_CONNECTION_ONLY;-
2024 if (!c->argumentTypes.testAndSetOrdered(0, argumentTypes)) {-
2025 if (argumentTypes != &DIRECT_CONNECTION_ONLY)-
2026 delete [] argumentTypes;-
2027 argumentTypes = c->argumentTypes.load();-
2028 }-
2029 }-
2030 if (argumentTypes == &DIRECT_CONNECTION_ONLY)-
2031 return;-
2032 int nargs = 1;-
2033 while (argumentTypes[nargs-1])-
2034 ++nargs;-
2035 int *types = (int *) malloc(nargs*sizeof(int));-
2036 do { if (!(types)) qBadAlloc(); } while (0);-
2037 void **args = (void **) malloc(nargs*sizeof(void *));-
2038 do { if (!(args)) qBadAlloc(); } while (0);-
2039 types[0] = 0;-
2040 args[0] = 0;-
2041-
2042 if (nargs > 1) {-
2043 for (int n = 1; n < nargs; ++n)-
2044 types[n] = argumentTypes[n-1];-
2045-
2046 locker.unlock();-
2047 for (int n = 1; n < nargs; ++n)-
2048 args[n] = QMetaType::create(types[n], argv[n]);-
2049 locker.relock();-
2050-
2051 if (!c->receiver) {-
2052 locker.unlock();-
2053-
2054 for (int n = 1; n < nargs; ++n)-
2055 QMetaType::destroy(types[n], args[n]);-
2056 free(types);-
2057 free(args);-
2058 locker.relock();-
2059 return;-
2060 }-
2061 }-
2062-
2063 QMetaCallEvent *ev = c->isSlotObject ?-
2064 new QMetaCallEvent(c->slotObj, sender, signal, nargs, types, args) :-
2065 new QMetaCallEvent(c->method_offset, c->method_relative, c->callFunction, sender, signal, nargs, types, args);-
2066 QCoreApplication::postEvent(c->receiver, ev);-
2067}-
2068-
2069-
2070-
2071-
2072void QMetaObject::activate(QObject *sender, const QMetaObject *m, int local_signal_index,-
2073 void **argv)-
2074{-
2075 activate(sender, QMetaObjectPrivate::signalOffset(m), local_signal_index, argv);-
2076}-
2077-
2078-
2079-
2080-
2081void QMetaObject::activate(QObject *sender, int signalOffset, int local_signal_index, void **argv)-
2082{-
2083 int signal_index = signalOffset + local_signal_index;-
if (!sender->d_func()->isSignalConnected(signal_index)
&& !qt_signal_spy_callback_set.signal_begin_callback
&& !qt_signal_spy_callback_set.signal_end_callback) {
return;
2084-
2085 }if (sender->d_func()->blockSig
sender->d_func()->blockSigDescription
TRUEevaluated 48493 times by 34 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QDateTimeEdit
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemSelectionModel
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSocks5SocketEngine
  • tst_QSortFilterProxyModel
  • tst_QSpinBox
  • ...
FALSEevaluated 22007731 times by 1013 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
)
48493-22007731
2086 return;
executed 48493 times by 34 tests: return;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QDateTimeEdit
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemSelectionModel
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QNetworkReply
  • tst_QObject
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSocks5SocketEngine
  • tst_QSortFilterProxyModel
  • tst_QSpinBox
  • ...
48493
2087-
2088 if (sender->d_func()->declarativeDataisDeclarativeSignalConnected(signal_index)
sender->d_func...(signal_index)Description
TRUEnever evaluated
FALSEevaluated 22007733 times by 1013 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
0-22007733
2089 && QAbstractDeclarativeData::signalEmitted
QAbstractDecla...:signalEmittedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2090 QAbstractDeclarativeData::signalEmitted(sender->d_func()->declarativeData, sender,-
2091 signal_index, argv);-
2092 }
never executed: end of block
0
2093-
2094 if (!sender->d_func()->isSignalConnected(signal_index, false)
!sender->d_fun..._index, false)Description
TRUEevaluated 14272902 times by 1013 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
FALSEevaluated 7734830 times by 507 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • ...
7734830-14272902
2095 && !qt_signal_spy_callback_set.signal_begin_callback
!qt_signal_spy...begin_callbackDescription
TRUEevaluated 14272902 times by 1013 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
FALSEnever evaluated
0-14272902
2096 && !qt_signal_spy_callback_set.signal_end_callback
!qt_signal_spy...l_end_callbackDescription
TRUEevaluated 14272903 times by 1013 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
FALSEnever evaluated
) {
0-14272903
2097-
2098 return;
executed 14272903 times by 1013 tests: return;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
14272903
2099 }-
2100-
2101 void *empty_argv[] = { 0 };-
2102 if (qt_signal_spy_callback_set.signal_begin_callback != 0
qt_signal_spy_..._callback != 0Description
TRUEnever evaluated
FALSEevaluated 7734830 times by 507 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • ...
) {
0-7734830
2103 qt_signal_spy_callback_set.signal_begin_callback(sender, signal_index,-
2104 argv ? argv : empty_argv);-
2105 }
never executed: end of block
0
2106-
2107 Qt::HANDLE currentThreadId = QThread::currentThreadId();{-
2108 QMutexLocker locker(signalSlotLock(sender));-
2109 struct ConnectionListsRef {-
2110 QObjectConnectionListVector *connectionLists;-
2111 ConnectionListsRef(QObjectConnectionListVector *connectionLists) : connectionLists(connectionLists)-
2112 {-
2113 if (connectionLists)-
2114 ++connectionLists->inUse;-
2115 }-
2116 ~ConnectionListsRef()-
2117 {-
2118 if (!connectionLists)-
2119 return;-
2120-
2121 --connectionLists->inUse;-
2122 ((!(connectionLists->inUse >= 0)) ? qt_assert("connectionLists->inUse >= 0",__FILE__,36413649) : qt_noop());-
2123 if (connectionLists->orphaned) {-
2124 if (!connectionLists->inUse)-
2125 delete connectionLists;-
2126 }-
2127 }-
2128-
2129 QObjectConnectionListVector *operator->() const { return connectionLists; }-
2130 };-
2131 ConnectionListsRef connectionLists = sender->d_func()->connectionLists;-
2132 if (!connectionLists.connectionLists
!connectionLis...onnectionListsDescription
TRUEnever evaluated
FALSEevaluated 7734830 times by 507 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • ...
) {
0-7734830
2133 locker.unlock();-
2134 if (qt_signal_spy_callback_set.signal_end_callback != 0
qt_signal_spy_..._callback != 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2135 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
2136 return;
never executed: return;
0
2137 }-
2138-
2139 const QObjectPrivate::ConnectionList *list;-
2140 if (signal_index < connectionLists->count()
signal_index <...Lists->count()Description
TRUEevaluated 7734424 times by 507 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • ...
FALSEevaluated 406 times by 9 tests
Evaluated by:
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusThreading
  • tst_QObject
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
)
406-7734424
2141 list = &connectionLists->at(signal_index);
executed 7734424 times by 507 tests: list = &connectionLists->at(signal_index);
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • ...
7734424
2142 else-
2143 list = &connectionLists->allsignals;
executed 406 times by 9 tests: list = &connectionLists->allsignals;
Executed by:
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusThreading
  • tst_QObject
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
406
2144-
2145 Qt::HANDLE currentThreadId = QThread::currentThreadId();-
2146-
2147 do {-
2148 QObjectPrivate::Connection *c = list->first;-
2149 if (!c
!cDescription
TRUEevaluated 7734275 times by 507 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • ...
FALSEevaluated 7734721 times by 507 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • ...
) continue;
executed 7734275 times by 507 tests: continue;
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • ...
7734275-7734721
2150-
2151-
2152 QObjectPrivate::Connection *last = list->last;-
2153-
2154 do {-
2155 if (!c->receiver
!c->receiverDescription
TRUEevaluated 22510 times by 274 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractSlider
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDirModel
  • tst_QDnsLookup_Appless
  • tst_QDockWidget
  • ...
FALSEevaluated 8500750 times by 493 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • ...
)
22510-8500750
2156 continue;
executed 22510 times by 274 tests: continue;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractSlider
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDirModel
  • tst_QDnsLookup_Appless
  • tst_QDockWidget
  • ...
22510
2157-
2158 QObject * const receiver = c->receiver;-
2159 const bool receiverInSameThread = currentThreadId == receiver->d_func()->threadData->threadId;-
2160-
2161-
2162-
2163 if ((c->connectionType == Qt::AutoConnection
c->connectionT...AutoConnectionDescription
TRUEevaluated 8270219 times by 434 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • ...
FALSEevaluated 230531 times by 475 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • ...
&& !receiverInSameThread
!receiverInSameThreadDescription
TRUEevaluated 13222 times by 384 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • ...
FALSEevaluated 8256997 times by 344 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • ...
)
13222-8270219
2164 || (
(c->connection...uedConnection)Description
TRUEevaluated 146324 times by 427 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • ...
FALSEevaluated 8341204 times by 392 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • ...
c->connectionType == Qt::QueuedConnection)
(c->connection...uedConnection)Description
TRUEevaluated 146324 times by 427 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • ...
FALSEevaluated 8341204 times by 392 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • ...
) {
146324-8341204
2165 queued_activate(sender, signal_index, c, argv ? argv : empty_argv, locker);-
2166 continue;
executed 159546 times by 431 tests: continue;
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • ...
159546
2167-
2168 } else if (c->connectionType == Qt::BlockingQueuedConnection
c->connectionT...euedConnectionDescription
TRUEevaluated 4442 times by 315 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • ...
FALSEevaluated 8336762 times by 381 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • ...
) {
4442-8336762
2169 if (receiverInSameThread
receiverInSameThreadDescription
TRUEnever evaluated
FALSEevaluated 4442 times by 315 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • ...
) {
0-4442
2170 QMessageLogger(__FILE__, 36873697, __PRETTY_FUNCTION__).warning("Qt: Dead lock detected while activating a BlockingQueuedConnection: "-
2171 "Sender is %s(%p), receiver is %s(%p)",-
2172 sender->metaObject()->className(), sender,-
2173 receiver->metaObject()->className(), receiver);-
2174 }
never executed: end of block
0
2175 QSemaphore semaphore;-
2176 QMetaCallEvent *ev = c->isSlotObject
c->isSlotObjectDescription
TRUEevaluated 3801 times by 311 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • ...
FALSEevaluated 641 times by 5 tests
Evaluated by:
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QNetworkReply
  • tst_QObject
  • tst_Spdy
?
641-3801
2177 new QMetaCallEvent(c->slotObj, sender, signal_index, 0, 0, argv ? argv : empty_argv, &semaphore) :-
2178 new QMetaCallEvent(c->method_offset, c->method_relative, c->callFunction, sender, signal_index, 0, 0, argv ? argv : empty_argv, &semaphore);-
2179 QCoreApplication::postEvent(receiver, ev);-
2180 locker.unlock();-
2181 semaphore.acquire();-
2182 locker.relock();-
2183 continue;
executed 4442 times by 315 tests: continue;
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • ...
4442
2184-
2185 }-
2186-
2187 QConnectionSenderSwitcher sw;-
2188-
2189 if (receiverInSameThread
receiverInSameThreadDescription
TRUEevaluated 8336255 times by 381 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • ...
FALSEevaluated 507 times by 27 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QCoreApplication
  • tst_QDBusPendingCall
  • tst_QDBusThreading
  • tst_QEventLoop
  • tst_QFtp
  • tst_QGuiApplication
  • tst_QGuiEventLoop
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QObject
  • tst_QProcess
  • tst_QStateMachine
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QThread
  • tst_QUdpSocket
  • ...
) {
507-8336255
2190 sw.switchSender(receiver, sender, signal_index);-
2191 }
executed 8336255 times by 381 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • ...
8336255
2192 const QObjectPrivate::StaticMetaCallFunction callFunction = c->callFunction;28931-8307831
const int method_relative = c->method_relative;if (c->isSlotObject
c->isSlotObjectDescription
TRUEevaluated 28931 times by 301 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • ...
FALSEevaluated 8307831 times by 250 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • ...
) {
2193 c->slotObj->ref();-
2194 QScopedPointer<QtPrivate::QSlotObjectBase, QSlotObjectBaseDeleter> obj(c->slotObj);-
2195 locker.unlock();-
2196 obj->call(receiver, argv ? argv : empty_argv);-
2197-
2198-
2199-
2200-
2201 obj.reset();-
2202-
2203 locker.relock();-
2204 }
executed 28929 times by 301 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • ...
else if (c->
c->callFunctionDescription
TRUEevaluated 8293985 times by 229 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • ...
FALSEevaluated 13846 times by 134 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAction
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusServiceWatcher
  • tst_QDBusThreading
  • tst_QDataWidgetMapper
  • ...
callFunction
c->callFunctionDescription
TRUEevaluated 8293985 times by 229 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • ...
FALSEevaluated 13846 times by 134 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAction
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusServiceWatcher
  • tst_QDBusThreading
  • tst_QDataWidgetMapper
  • ...
&& c->method_offset <= receiver->metaObject()->methodOffset()
c->method_offs...methodOffset()Description
TRUEevaluated 8290660 times by 229 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • ...
FALSEevaluated 3325 times by 45 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDialogButtonBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QLocalSocket
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • ...
) {
3325-8293985
2205-
2206 locker.unlock();const int methodIndex = c->method();-
2207 const int method_relative = c->method_relative;-
2208 const auto callFunction = c->callFunction;-
2209 locker.unlock();-
2210 if (qt_signal_spy_callback_set.slot_begin_callback != 0
qt_signal_spy_..._callback != 0Description
TRUEnever evaluated
FALSEevaluated 8290660 times by 229 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • ...
)
0-8290660
2211 qt_signal_spy_callback_set.slot_begin_callback(receiver, methodIndex, argv ? argv : empty_argv);
never executed: qt_signal_spy_callback_set.slot_begin_callback(receiver, methodIndex, argv ? argv : empty_argv);
0
2212-
2213 callFunction(receiver, QMetaObject::InvokeMetaMethod, method_relative, argv ? argv : empty_argv);-
2214-
2215 if (qt_signal_spy_callback_set.slot_end_callback != 0
qt_signal_spy_..._callback != 0Description
TRUEnever evaluated
FALSEevaluated 8290657 times by 229 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • ...
)
0-8290657
2216 qt_signal_spy_callback_set.slot_end_callback(receiver, methodIndex);
never executed: qt_signal_spy_callback_set.slot_end_callback(receiver, methodIndex);
0
2217 locker.relock();-
2218 }
executed 8290657 times by 229 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • ...
else {
8290657
2219 const int method = c->method_relative + c->method_offset;-
2220 locker.unlock();-
2221-
2222 if (qt_signal_spy_callback_set.slot_begin_callback != 0
qt_signal_spy_..._callback != 0Description
TRUEnever evaluated
FALSEevaluated 17171 times by 148 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAction
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusServiceWatcher
  • ...
) {
0-17171
2223 qt_signal_spy_callback_set.slot_begin_callback(receiver,-
2224 method,-
2225 argv ? argv : empty_argv);-
2226 }
never executed: end of block
0
2227-
2228 metacall(receiver, QMetaObject::InvokeMetaMethod, method, argv ? argv : empty_argv);-
2229-
2230 if (qt_signal_spy_callback_set.slot_end_callback != 0
qt_signal_spy_..._callback != 0Description
TRUEnever evaluated
FALSEevaluated 17171 times by 148 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAction
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusServiceWatcher
  • ...
)
0-17171
2231 qt_signal_spy_callback_set.slot_end_callback(receiver, method);
never executed: qt_signal_spy_callback_set.slot_end_callback(receiver, method);
0
2232-
2233 locker.relock();-
2234 }
executed 17171 times by 148 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAction
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusServiceWatcher
  • ...
17171
2235-
2236 if (connectionLists->orphaned
connectionLists->orphanedDescription
TRUEevaluated 252 times by 15 tests
Evaluated by:
  • tst_QCommandLinkButton
  • tst_QDBusAbstractAdaptor
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDialogButtonBox
  • tst_QMenu
  • tst_QNetworkReply
  • tst_QObject
  • tst_QProcess
  • tst_QPushButton
  • tst_QSequentialAnimationGroup
  • tst_QStatusBar
  • tst_qdbusabstractinterface - unknown status
FALSEevaluated 8336505 times by 381 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • ...
)
252-8336505
2237 break;
executed 252 times by 15 tests: break;
Executed by:
  • tst_QCommandLinkButton
  • tst_QDBusAbstractAdaptor
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDialogButtonBox
  • tst_QMenu
  • tst_QNetworkReply
  • tst_QObject
  • tst_QProcess
  • tst_QPushButton
  • tst_QSequentialAnimationGroup
  • tst_QStatusBar
  • tst_qdbusabstractinterface - unknown status
252
2238 }
executed 8336505 times by 381 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • ...
while (c != last
c != lastDescription
TRUEevaluated 788539 times by 152 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusPendingCall
  • tst_QDBusServiceWatcher
  • tst_QDBusThreading
  • tst_QDataWidgetMapper
  • ...
FALSEevaluated 7734464 times by 507 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • ...
&& (
(c = c->nextCo...tionList) != 0Description
TRUEevaluated 788539 times by 152 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusPendingCall
  • tst_QDBusServiceWatcher
  • tst_QDBusThreading
  • tst_QDataWidgetMapper
  • ...
FALSEnever evaluated
c = c->nextConnectionList) != 0
(c = c->nextCo...tionList) != 0Description
TRUEevaluated 788539 times by 152 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusPendingCall
  • tst_QDBusServiceWatcher
  • tst_QDBusThreading
  • tst_QDataWidgetMapper
  • ...
FALSEnever evaluated
);
0-8336505
2239-
2240 if (connectionLists->orphaned
connectionLists->orphanedDescription
TRUEevaluated 253 times by 15 tests
Evaluated by:
  • tst_QCommandLinkButton
  • tst_QDBusAbstractAdaptor
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDialogButtonBox
  • tst_QMenu
  • tst_QNetworkReply
  • tst_QObject
  • tst_QProcess
  • tst_QPushButton
  • tst_QSequentialAnimationGroup
  • tst_QStatusBar
  • tst_qdbusabstractinterface - unknown status
FALSEevaluated 7734463 times by 507 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • ...
)
253-7734463
2241 break;
executed 253 times by 15 tests: break;
Executed by:
  • tst_QCommandLinkButton
  • tst_QDBusAbstractAdaptor
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDialogButtonBox
  • tst_QMenu
  • tst_QNetworkReply
  • tst_QObject
  • tst_QProcess
  • tst_QPushButton
  • tst_QSequentialAnimationGroup
  • tst_QStatusBar
  • tst_qdbusabstractinterface - unknown status
253
2242 }
executed 7734463 times by 507 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • ...
while (list != &connectionLists->allsignals
list != &conne...ts->allsignalsDescription
TRUEevaluated 7734166 times by 507 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • ...
FALSEevaluated 7734572 times by 507 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • ...
&&
7734166-7734572
2243-
2244 ((list = &connectionLists->allsignals), true));-
2245-
2246 }-
2247-
2248 if (qt_signal_spy_callback_set.signal_end_callback != 0
qt_signal_spy_..._callback != 0Description
TRUEnever evaluated
FALSEevaluated 7734825 times by 507 tests
Evaluated by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • ...
)
0-7734825
2249 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
2250-
2251}
executed 7734825 times by 507 tests: end of block
Executed by:
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • ...
7734825
2252-
2253-
2254-
2255-
2256-
2257void QMetaObject::activate(QObject *sender, int signal_index, void **argv)-
2258{-
2259 const QMetaObject *mo = sender->metaObject();-
2260 while (mo->methodOffset() > signal_index)-
2261 mo = mo->superClass();-
2262 activate(sender, mo, signal_index - mo->methodOffset(), argv);-
2263}-
2264int QObjectPrivate::signalIndex(const char *signalName,-
2265 const QMetaObject **meta) const-
2266{-
2267 const QObject * const q = q_func();-
2268 const QMetaObject *base = q->metaObject();-
2269 ((!(QMetaObjectPrivate::get(base)->revision >= 7)) ? qt_assert("QMetaObjectPrivate::get(base)->revision >= 7",__FILE__,37963806) : qt_noop());-
2270 QArgumentTypeArray types;-
2271 QByteArray name = QMetaObjectPrivate::decodeMethodSignature(signalName, types);-
2272 int relative_index = QMetaObjectPrivate::indexOfSignalRelative(-
2273 &base, name, types.size(), types.constData());-
2274 if (relative_index < 0)-
2275 return relative_index;-
2276 relative_index = QMetaObjectPrivate::originalClone(base, relative_index);-
2277 if (meta)-
2278 *meta = base;-
2279 return relative_index + QMetaObjectPrivate::signalOffset(base);-
2280}-
2281bool QObject::setProperty(const char *name, const QVariant &value)-
2282{-
2283 QObjectPrivate * const d = d_func();-
2284 const QMetaObject* meta = metaObject();-
2285 if (!name || !meta)-
2286 return false;-
2287-
2288 int id = meta->indexOfProperty(name);-
2289 if (id < 0) {-
2290 if (!d->extraData)-
2291 d->extraData = new QObjectPrivate::ExtraData;-
2292-
2293 const int idx = d->extraData->propertyNames.indexOf(name);-
2294-
2295 if (!value.isValid()) {-
2296 if (idx == -1)-
2297 return false;-
2298 d->extraData->propertyNames.removeAt(idx);-
2299 d->extraData->propertyValues.removeAt(idx);-
2300 } else {-
2301 if (idx == -1) {-
2302 d->extraData->propertyNames.append(name);-
2303 d->extraData->propertyValues.append(value);-
2304 } else {-
2305 if (value == d->extraData->propertyValues.at(idx))-
2306 return false;-
2307 d->extraData->propertyValues[idx] = value;-
2308 }-
2309 }-
2310-
2311 QDynamicPropertyChangeEvent ev(name);-
2312 QCoreApplication::sendEvent(this, &ev);-
2313-
2314 return false;-
2315 }-
2316 QMetaProperty p = meta->property(id);-
2317-
2318 if (!p.isWritable())-
2319 QMessageLogger(__FILE__, 38743884, __PRETTY_FUNCTION__).warning("%s::setProperty: Property \"%s\" invalid,"-
2320 " read-only or does not exist", metaObject()->className(), name);-
2321-
2322 return p.write(this, value);-
2323}-
2324QVariant QObject::property(const char *name) const-
2325{-
2326 const QObjectPrivate * const d = d_func();-
2327 const QMetaObject* meta = metaObject();-
2328 if (!name || !meta)-
2329 return QVariant();-
2330-
2331 int id = meta->indexOfProperty(name);-
2332 if (id < 0) {-
2333 if (!d->extraData)-
2334 return QVariant();-
2335 const int i = d->extraData->propertyNames.indexOf(name);-
2336 return d->extraData->propertyValues.value(i);-
2337 }-
2338 QMetaProperty p = meta->property(id);-
2339-
2340 if (!p.isReadable())-
2341 QMessageLogger(__FILE__, 39073917, __PRETTY_FUNCTION__).warning("%s::property: Property \"%s\" invalid or does not exist",-
2342 metaObject()->className(), name);-
2343-
2344 return p.read(this);-
2345}-
2346-
2347-
2348-
2349-
2350-
2351-
2352-
2353QList<QByteArray> QObject::dynamicPropertyNames() const-
2354{-
2355 const QObjectPrivate * const d = d_func();-
2356 if (d->extraData)-
2357 return d->extraData->propertyNames;-
2358 return QList<QByteArray>();-
2359}-
2360static void dumpRecursive(int level, QObject *object)-
2361{-
2362-
2363 if (object) {-
2364 QByteArray buf;-
2365 buf.fill(' ', level / 2 * 8);-
2366 if (level % 2)-
2367 buf += " ";-
2368 QString name = object->objectName();-
2369 QString flags = QLatin1String("");-
2370 QMessageLogger(__FILE__, 39573967, __PRETTY_FUNCTION__).debug("%s%s::%s %s", (const char*)buf, object->metaObject()->className(), name.toLocal8Bit().data(),-
2371 flags.toLatin1().data());-
2372 QObjectList children = object->children();-
2373 if (!children.isEmpty()) {-
2374 for (int i = 0; i < children.size(); ++i)-
2375 dumpRecursive(level+1, children.at(i));-
2376 }-
2377 }-
2378-
2379-
2380-
2381-
2382}-
2383void QObject::dumpObjectTree()-
2384{-
2385 dumpRecursive(0, this);-
2386}-
2387void QObject::dumpObjectInfo()-
2388{-
2389-
2390 QMessageLogger(__FILE__, 40004010, __PRETTY_FUNCTION__).debug("OBJECT %s::%s", metaObject()->className(),-
2391 objectName().isEmpty() ? "unnamed" : objectName().toLocal8Bit().data());-
2392-
2393 QObjectPrivate * const d = d_func();-
2394 QMutexLocker locker(signalSlotLock(this));-
2395-
2396-
2397 QMessageLogger(__FILE__, 40074017, __PRETTY_FUNCTION__).debug(" SIGNALS OUT");-
2398-
2399 if (d->connectionLists) {-
2400 for (int signal_index = 0; signal_index < d->connectionLists->count(); ++signal_index) {-
2401 const QMetaMethod signal = QMetaObjectPrivate::signal(metaObject(), signal_index);-
2402 QMessageLogger(__FILE__, 40124022, __PRETTY_FUNCTION__).debug(" signal: %s", signal.methodSignature().constData());-
2403-
2404-
2405 const QObjectPrivate::Connection *c =-
2406 d->connectionLists->at(signal_index).first;-
2407 while (c) {-
2408 if (!c->receiver) {-
2409 QMessageLogger(__FILE__, 40194029, __PRETTY_FUNCTION__).debug(" <Disconnected receiver>");-
2410 c = c->nextConnectionList;-
2411 continue;-
2412 }-
2413 if (c->isSlotObject) {-
2414 QMessageLogger(__FILE__, 40244034, __PRETTY_FUNCTION__).debug(" <functor or function pointer>");-
2415 c = c->nextConnectionList;-
2416 continue;-
2417 }-
2418 const QMetaObject *receiverMetaObject = c->receiver->metaObject();-
2419 const QMetaMethod method = receiverMetaObject->method(c->method());-
2420 QMessageLogger(__FILE__, 40304040, __PRETTY_FUNCTION__).debug(" --> %s::%s %s",-
2421 receiverMetaObject->className(),-
2422 c->receiver->objectName().isEmpty() ? "unnamed" : QString(c->receiver->objectName()).toLocal8Bit().constData(),-
2423 method.methodSignature().constData());-
2424 c = c->nextConnectionList;-
2425 }-
2426 }-
2427 } else {-
2428 QMessageLogger(__FILE__, 40384048, __PRETTY_FUNCTION__).debug( " <None>" );-
2429 }-
2430-
2431-
2432 QMessageLogger(__FILE__, 40424052, __PRETTY_FUNCTION__).debug(" SIGNALS IN");-
2433-
2434 if (d->senders) {-
2435 for (QObjectPrivate::Connection *s = d->senders; s; s = s->next) {-
2436 QByteArray slotName = ([]() -> QByteArray { enum { Size = sizeof("<unknown>") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "<unknown>" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }());-
2437 if (!s->isSlotObject) {-
2438 const QMetaMethod slot = metaObject()->method(s->method());-
2439 slotName = slot.methodSignature();-
2440 }-
2441 QMessageLogger(__FILE__, 40514061, __PRETTY_FUNCTION__).debug(" <-- %s::%s %s",-
2442 s->sender->metaObject()->className(),-
2443 s->sender->objectName().isEmpty() ? "unnamed" : QString(s->sender->objectName()).toLocal8Bit().constData(),-
2444 slotName.constData());-
2445 }-
2446 } else {-
2447 QMessageLogger(__FILE__, 40574067, __PRETTY_FUNCTION__).debug(" <None>");-
2448 }-
2449-
2450}-
2451-
2452-
2453-
2454-
2455-
2456uint QObject::registerUserData()-
2457{-
2458 static int user_data_registration = 0;-
2459 return user_data_registration++;-
2460}-
2461-
2462-
2463-
2464-
2465QObjectUserData::~QObjectUserData()-
2466{-
2467}-
2468-
2469-
2470-
2471-
2472void QObject::setUserData(uint id, QObjectUserData* data)-
2473{-
2474 QObjectPrivate * const d = d_func();-
2475 if (!d->extraData)-
2476 d->extraData = new QObjectPrivate::ExtraData;-
2477-
2478 if (d->extraData->userData.size() <= (int) id)-
2479 d->extraData->userData.resize((int) id + 1);-
2480 d->extraData->userData[id] = data;-
2481}-
2482-
2483-
2484-
2485-
2486QObjectUserData* QObject::userData(uint id) const-
2487{-
2488 const QObjectPrivate * const d = d_func();-
2489 if (!d->extraData)-
2490 return 0;-
2491 if ((int)id < d->extraData->userData.size())-
2492 return d->extraData->userData.at(id);-
2493 return 0;-
2494}-
2495-
2496-
2497-
2498-
2499-
2500QDebug operator<<(QDebug dbg, const QObject *o)-
2501{-
2502 QDebugStateSaver saver(dbg);-
2503 if (!o)-
2504 return dbg << "QObject(0x0)";-
2505 dbg.nospace() << o->metaObject()->className() << '(' << (const void *)o;-
2506 if (!o->objectName().isEmpty())-
2507 dbg << ", name = " << o->objectName();-
2508 dbg << ')';-
2509 return dbg;-
2510}-
2511void qDeleteInEventHandler(QObject *o)-
2512{-
2513 delete o;-
2514}-
2515QMetaObject::Connection QObject::connectImpl(const QObject *sender, void **signal,-
2516 const QObject *receiver, void **slot,-
2517 QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type,-
2518 const int *types, const QMetaObject *senderMetaObject)-
2519{-
2520 if (!signal) {-
2521 QMessageLogger(__FILE__, 46394655, __PRETTY_FUNCTION__).warning("QObject::connect: invalid null parameter");-
2522 if (slotObj)-
2523 slotObj->destroyIfLastRef();-
2524 return QMetaObject::Connection();-
2525 }-
2526-
2527 int signal_index = -1;-
2528 void *args[] = { &signal_index, signal };-
2529 for (; senderMetaObject && signal_index < 0; senderMetaObject = senderMetaObject->superClass()) {-
2530 senderMetaObject->static_metacall(QMetaObject::IndexOfMethod, 0, args);-
2531 if (signal_index >= 0 && signal_index < QMetaObjectPrivate::get(senderMetaObject)->signalCount)-
2532 break;-
2533 }-
2534 if (!senderMetaObject) {-
2535 QMessageLogger(__FILE__, 46534669, __PRETTY_FUNCTION__).warning("QObject::connect: signal not found in %s", sender->metaObject()->className());-
2536 slotObj->destroyIfLastRef();-
2537 return QMetaObject::Connection(0);-
2538 }-
2539 signal_index += QMetaObjectPrivate::signalOffset(senderMetaObject);-
2540 return QObjectPrivate::connectImpl(sender, signal_index, receiver, slot, slotObj, type, types, senderMetaObject);-
2541}-
2542QMetaObject::Connection QObjectPrivate::connectImpl(const QObject *sender, int signal_index,-
2543 const QObject *receiver, void **slot,-
2544 QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type,-
2545 const int *types, const QMetaObject *senderMetaObject)-
2546{-
2547 if (!sender || !slotObj || !senderMetaObject) {-
2548 QMessageLogger(__FILE__, 46744690, __PRETTY_FUNCTION__).warning("QObject::connect: invalid null parameter");-
2549 if (slotObj)-
2550 slotObj->destroyIfLastRef();-
2551 return QMetaObject::Connection();-
2552 }-
2553-
2554 QObject *s = const_cast<QObject *>(sender);-
2555 QObject *r = const_cast<QObject *>(receiver);-
2556-
2557 QOrderedMutexLocker locker(signalSlotLock(sender),-
2558 signalSlotLock(receiver));-
2559-
2560 if (type & Qt::UniqueConnection && slot) {-
2561 QObjectConnectionListVector *connectionLists = QObjectPrivate::get(s)->connectionLists;-
2562 if (connectionLists && connectionLists->count() > signal_index) {-
2563 const QObjectPrivate::Connection *c2 =-
2564 (*connectionLists)[signal_index].first;-
2565-
2566 while (c2) {-
2567 if (c2->receiver == receiver && c2->isSlotObject && c2->slotObj->compare(slot)) {-
2568 slotObj->destroyIfLastRef();-
2569 return QMetaObject::Connection();-
2570 }-
2571 c2 = c2->nextConnectionList;-
2572 }-
2573 }-
2574 type = static_cast<Qt::ConnectionType>(type ^ Qt::UniqueConnection);-
2575 }-
2576-
2577 QScopedPointer<QObjectPrivate::Connection> c(new QObjectPrivate::Connection);-
2578 c->sender = s;-
2579 c->signal_index = signal_index;-
2580 c->receiver = r;-
2581 c->slotObj = slotObj;-
2582 c->connectionType = type;-
2583 c->isSlotObject = true;-
2584 if (types) {-
2585 c->argumentTypes.store(types);-
2586 c->ownArgumentTypes = false;-
2587 }-
2588-
2589 QObjectPrivate::get(s)->addConnection(signal_index, c.data());-
2590 QMetaObject::Connection ret(c.take());-
2591 locker.unlock();-
2592-
2593 QMetaMethod method = QMetaObjectPrivate::signal(senderMetaObject, signal_index);-
2594 ((!(method.isValid())) ? qt_assert("method.isValid()",__FILE__,47204736) : qt_noop());-
2595 s->connectNotify(method);-
2596-
2597 return ret;-
2598}-
2599bool QObject::disconnect(const QMetaObject::Connection &connection)-
2600{-
2601 QObjectPrivate::Connection *c = static_cast<QObjectPrivate::Connection *>(connection.d_ptr);-
2602-
2603 if (!c
!cDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QObject
FALSEevaluated 11 times by 1 test
Evaluated by:
  • tst_QObject
|| !c->receiver
!c->receiverDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QObject
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_QObject
)
1-11
2604 return
executed 4 times by 1 test: return false;
Executed by:
  • tst_QObject
false;
executed 4 times by 1 test: return false;
Executed by:
  • tst_QObject
4
2605-
2606 QMutex *senderMutex = signalSlotLock(c->sender);-
2607 QMutex *receiverMutex = signalSlotLock(c->receiver);-
2608-
2609 {-
2610 QOrderedMutexLocker locker(senderMutex, receiverMutex);-
2611-
2612 QObjectConnectionListVector *connectionLists = QObjectPrivate::get(c->sender)->connectionLists;-
2613 ((!(connectionLists)) ? qt_assert("connectionLists",__FILE__,47484764) : qt_noop());-
2614 connectionLists->dirty = true;-
2615-
2616 *c->prev = c->next;-
2617 if (c->next
c->nextDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QObject
FALSEevaluated 9 times by 1 test
Evaluated by:
  • tst_QObject
)
1-9
2618 c->next->prev = c->prev;
executed 1 time by 1 test: c->next->prev = c->prev;
Executed by:
  • tst_QObject
1
2619 c->receiver = 0;-
2620 }-
2621-
2622-
2623 if (c->isSlotObject
c->isSlotObjectDescription
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_QObject
FALSEnever evaluated
) {
0-10
2624 c->slotObj->destroyIfLastRef();-
2625 c->isSlotObject = false;-
2626 }
executed 10 times by 1 test: end of block
Executed by:
  • tst_QObject
10
2627-
2628 c->sender->disconnectNotify(QMetaObjectPrivate::signal(c->sender->metaObject(),-
c->signal_index));const_cast<QMetaObject::Connection &>(connection).d_ptr = 0;
2629 c->deref();-
2630-
2631-
2632-
2633 return
executed 10 times by 1 test: return true;
Executed by:
  • tst_QObject
true;
executed 10 times by 1 test: return true;
Executed by:
  • tst_QObject
10
2634}-
2635bool QObject::disconnectImpl(const QObject *sender, void **signal, const QObject *receiver, void **slot, const QMetaObject *senderMetaObject)-
2636{-
2637 if (sender == 0 || (receiver == 0 && slot != 0)) {-
2638 QMessageLogger(__FILE__, 48354850, __PRETTY_FUNCTION__).warning("QObject::disconnect: Unexpected null parameter");-
2639 return false;-
2640 }-
2641-
2642 int signal_index = -1;-
2643 if (signal) {-
2644 void *args[] = { &signal_index, signal };-
2645 for (; senderMetaObject && signal_index < 0; senderMetaObject = senderMetaObject->superClass()) {-
2646 senderMetaObject->static_metacall(QMetaObject::IndexOfMethod, 0, args);-
2647 if (signal_index >= 0 && signal_index < QMetaObjectPrivate::get(senderMetaObject)->signalCount)-
2648 break;-
2649 }-
2650 if (!senderMetaObject) {-
2651 QMessageLogger(__FILE__, 48484863, __PRETTY_FUNCTION__).warning("QObject::disconnect: signal not found in %s", sender->metaObject()->className());-
2652 return QMetaObject::Connection(0);-
2653 }-
2654 signal_index += QMetaObjectPrivate::signalOffset(senderMetaObject);-
2655 }-
2656-
2657 return QMetaObjectPrivate::disconnect(sender, signal_index, senderMetaObject, receiver, -1, slot);-
2658}-
2659-
2660-
2661-
2662-
2663-
2664-
2665-
2666QMetaObject::Connection QObjectPrivate::connect(const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)-
2667{-
2668 if (!sender) {-
2669 QMessageLogger(__FILE__, 48664881, __PRETTY_FUNCTION__).warning("QObject::connect: invalid null parameter");-
2670 if (slotObj)-
2671 slotObj->destroyIfLastRef();-
2672 return QMetaObject::Connection();-
2673 }-
2674 const QMetaObject *senderMetaObject = sender->metaObject();-
2675 signal_index = methodIndexToSignalIndex(&senderMetaObject, signal_index);-
2676-
2677 return QObjectPrivate::connectImpl(sender, signal_index, sender, 0, slotObj, type, 0, senderMetaObject);-
2678}-
2679-
2680-
2681-
2682-
2683-
2684-
2685-
2686bool QObjectPrivate::disconnect(const QObject *sender, int signal_index, void **slot)-
2687{-
2688 const QMetaObject *senderMetaObject = sender->metaObject();-
2689 signal_index = methodIndexToSignalIndex(&senderMetaObject, signal_index);-
2690-
2691 return QMetaObjectPrivate::disconnect(sender, signal_index, senderMetaObject, sender, -1, slot);-
2692}-
2693QMetaObject::Connection::Connection(const QMetaObject::Connection &other) : d_ptr(other.d_ptr)-
2694{-
2695 if (d_ptr)-
2696 static_cast<QObjectPrivate::Connection *>(d_ptr)->ref();-
2697}-
2698-
2699QMetaObject::Connection& QMetaObject::Connection::operator=(const QMetaObject::Connection& other)-
2700{-
2701 if (other.d_ptr != d_ptr) {-
2702 if (d_ptr)-
2703 static_cast<QObjectPrivate::Connection *>(d_ptr)->deref();-
2704 d_ptr = other.d_ptr;-
2705 if (other.d_ptr)-
2706 static_cast<QObjectPrivate::Connection *>(other.d_ptr)->ref();-
2707 }-
2708 return *this;-
2709}-
2710-
2711-
2712-
2713-
2714-
2715QMetaObject::Connection::Connection() : d_ptr(0) {}-
2716-
2717-
2718-
2719-
2720QMetaObject::Connection::~Connection()-
2721{-
2722 if (d_ptr)-
2723 static_cast<QObjectPrivate::Connection *>(d_ptr)->deref();-
2724}-
2725-
2726-
2727bool QMetaObject::Connection::isConnected_helper() const-
2728{-
2729 ((!(d_ptr)) ? qt_assert("d_ptr",__FILE__,49394954) : qt_noop());-
2730 QObjectPrivate::Connection *c = static_cast<QObjectPrivate::Connection *>(d_ptr);-
2731-
2732 return c->receiver;-
2733}-
2734-
2735-
Switch to Source codePreprocessed file

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