qdbusabstractadaptor.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/dbus/qdbusabstractadaptor.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10-
11static int cachedRelaySlotMethodIndex = -1;-
12-
13int QDBusAdaptorConnector::relaySlotMethodIndex()-
14{-
15 if (cachedRelaySlotMethodIndex == -1
cachedRelaySlo...hodIndex == -1Description
TRUEevaluated 12 times by 10 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 508 times by 7 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusthreading - unknown status
) {
12-508
16 cachedRelaySlotMethodIndex = staticMetaObject.indexOfMethod("relaySlot()");-
17 ((!(cachedRelaySlotMethodIndex != -1)) ? qt_assert("cachedRelaySlotMethodIndex != -1",__FILE__,67) : qt_noop());-
18 }
executed 12 times by 10 tests: end of block
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
12
19 return
executed 520 times by 10 tests: return cachedRelaySlotMethodIndex;
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
cachedRelaySlotMethodIndex;
executed 520 times by 10 tests: return cachedRelaySlotMethodIndex;
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
520
20}-
21-
22QDBusAdaptorConnector *qDBusFindAdaptorConnector(QObject *obj)-
23{-
24 if (!obj
!objDescription
TRUEnever evaluated
FALSEevaluated 884 times by 10 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
)
0-884
25 return
never executed: return 0;
0;
never executed: return 0;
0
26 const QObjectList &children = obj->children();-
27 QObjectList::ConstIterator it = children.constBegin();-
28 QObjectList::ConstIterator end = children.constEnd();-
29 for ( ; it != end
it != endDescription
TRUEevaluated 1455 times by 7 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 122 times by 10 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
; ++it) {
122-1455
30 QDBusAdaptorConnector *connector = qobject_cast<QDBusAdaptorConnector *>(*it);-
31 if (connector
connectorDescription
TRUEevaluated 762 times by 7 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 693 times by 5 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
) {
693-762
32 connector->polish();-
33 return
executed 762 times by 7 tests: return connector;
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
connector;
executed 762 times by 7 tests: return connector;
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
762
34 }-
35 }
executed 693 times by 5 tests: end of block
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
693
36 return
executed 122 times by 10 tests: return 0;
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
0;
executed 122 times by 10 tests: return 0;
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
122
37}-
38-
39QDBusAdaptorConnector *qDBusFindAdaptorConnector(QDBusAbstractAdaptor *adaptor)-
40{-
41 return
never executed: return qDBusFindAdaptorConnector(adaptor->parent());
qDBusFindAdaptorConnector(adaptor->parent());
never executed: return qDBusFindAdaptorConnector(adaptor->parent());
0
42}-
43-
44QDBusAdaptorConnector *qDBusCreateAdaptorConnector(QObject *obj)-
45{-
46 QDBusAdaptorConnector *connector = qDBusFindAdaptorConnector(obj);-
47 if (connector
connectorDescription
TRUEevaluated 324 times by 6 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 122 times by 10 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
)
122-324
48 return
executed 324 times by 6 tests: return connector;
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
connector;
executed 324 times by 6 tests: return connector;
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
324
49 return
executed 122 times by 10 tests: return new QDBusAdaptorConnector(obj);
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
new QDBusAdaptorConnector(obj);
executed 122 times by 10 tests: return new QDBusAdaptorConnector(obj);
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
122
50}-
51-
52QString QDBusAbstractAdaptorPrivate::retrieveIntrospectionXml(QDBusAbstractAdaptor *adaptor)-
53{-
54 return
executed 129 times by 5 tests: return adaptor->d_func()->xml;
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
adaptor->d_func()->xml;
executed 129 times by 5 tests: return adaptor->d_func()->xml;
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
129
55}-
56-
57void QDBusAbstractAdaptorPrivate::saveIntrospectionXml(QDBusAbstractAdaptor *adaptor,-
58 const QString &xml)-
59{-
60 adaptor->d_func()->xml = xml;-
61}
executed 89 times by 5 tests: end of block
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
89
62QDBusAbstractAdaptor::QDBusAbstractAdaptor(QObject* obj)-
63 : QObject(*new QDBusAbstractAdaptorPrivate, obj)-
64{-
65 QDBusAdaptorConnector *connector = qDBusCreateAdaptorConnector(obj);-
66-
67 connector->waitingForPolish = true;-
68 QMetaObject::invokeMethod(connector, "polish", Qt::QueuedConnection);-
69}
executed 200 times by 5 tests: end of block
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
200
70-
71-
72-
73-
74-
75-
76-
77QDBusAbstractAdaptor::~QDBusAbstractAdaptor()-
78{-
79}-
80void QDBusAbstractAdaptor::setAutoRelaySignals(bool enable)-
81{-
82 const QMetaObject *us = metaObject();-
83 const QMetaObject *them = parent()->metaObject();-
84 bool connected = false;-
85 for (int idx = staticMetaObject.methodCount(); idx < us->methodCount()
idx < us->methodCount()Description
TRUEevaluated 632 times by 1 test
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
FALSEevaluated 124 times by 1 test
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
; ++idx) {
124-632
86 QMetaMethod mm = us->method(idx);-
87-
88 if (mm.methodType() != QMetaMethod::Signal
mm.methodType(...Method::SignalDescription
TRUEevaluated 364 times by 1 test
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
FALSEevaluated 268 times by 1 test
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
)
268-364
89 continue;
executed 364 times by 1 test: continue;
Executed by:
  • tst_qdbusabstractadaptor - unknown status
364
90-
91-
92 QByteArray sig = QMetaObject::normalizedSignature(mm.methodSignature().constData());-
93 if (them->indexOfSignal(sig) == -1
them->indexOfSignal(sig) == -1Description
TRUEevaluated 268 times by 1 test
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
FALSEnever evaluated
)
0-268
94 continue;
executed 268 times by 1 test: continue;
Executed by:
  • tst_qdbusabstractadaptor - unknown status
268
95 sig.prepend(2 + '0');-
96 parent()->disconnect(sig, this, sig);-
97 if (enable
enableDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
98 connected = connect(parent(), sig, sig)
connect(parent(), sig, sig)Description
TRUEnever evaluated
FALSEnever evaluated
|| connected
connectedDescription
TRUEnever evaluated
FALSEnever evaluated
;
never executed: connected = connect(parent(), sig, sig) || connected;
0
99 }
never executed: end of block
0
100 d_func()->autoRelaySignals = connected;-
101}
executed 124 times by 1 test: end of block
Executed by:
  • tst_qdbusabstractadaptor - unknown status
124
102-
103-
104-
105-
106-
107-
108-
109bool QDBusAbstractAdaptor::autoRelaySignals() const-
110{-
111 return
never executed: return d_func()->autoRelaySignals;
d_func()->autoRelaySignals;
never executed: return d_func()->autoRelaySignals;
0
112}-
113-
114QDBusAdaptorConnector::QDBusAdaptorConnector(QObject *obj)-
115 : QObject(obj), waitingForPolish(false)-
116{-
117}
executed 122 times by 10 tests: end of block
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
122
118-
119QDBusAdaptorConnector::~QDBusAdaptorConnector()-
120{-
121}-
122-
123void QDBusAdaptorConnector::addAdaptor(QDBusAbstractAdaptor *adaptor)-
124{-
125-
126 const QMetaObject *mo = adaptor->metaObject();-
127 int ciid = mo->indexOfClassInfo("D-Bus Interface");-
128 if (ciid != -1
ciid != -1Description
TRUEevaluated 424 times by 5 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 124 times by 1 test
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
) {
124-424
129 QMetaClassInfo mci = mo->classInfo(ciid);-
130 if (*
*mci.value()Description
TRUEevaluated 424 times by 5 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
FALSEnever evaluated
mci.value()
*mci.value()Description
TRUEevaluated 424 times by 5 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
FALSEnever evaluated
) {
0-424
131-
132 const char *interface = mci.value();-
133 AdaptorMap::Iterator it = std::lower_bound(adaptors.begin(), adaptors.end(),-
134 QByteArray(interface));-
135 if (it != adaptors.end()
it != adaptors.end()Description
TRUEevaluated 348 times by 1 test
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
FALSEevaluated 76 times by 5 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
&& qstrcmp(interface, it->interface) == 0
qstrcmp(interf...nterface) == 0Description
TRUEevaluated 224 times by 1 test
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
FALSEevaluated 124 times by 1 test
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
) {
76-348
136-
137 if (it->adaptor != adaptor
it->adaptor != adaptorDescription
TRUEnever evaluated
FALSEevaluated 224 times by 1 test
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
) {
0-224
138-
139 disconnectAllSignals(it->adaptor);-
140 connectAllSignals(adaptor);-
141 }
never executed: end of block
0
142 it->adaptor = adaptor;-
143 }
executed 224 times by 1 test: end of block
Executed by:
  • tst_qdbusabstractadaptor - unknown status
else {
224
144-
145 AdaptorData entry;-
146 entry.interface = interface;-
147 entry.adaptor = adaptor;-
148 adaptors << entry;-
149-
150-
151 connectAllSignals(adaptor);-
152 }
executed 200 times by 5 tests: end of block
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
200
153 }-
154 }
executed 424 times by 5 tests: end of block
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
424
155}
executed 548 times by 5 tests: end of block
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
548
156-
157void QDBusAdaptorConnector::disconnectAllSignals(QObject *obj)-
158{-
159 QMetaObject::disconnect(obj, -1, this, relaySlotMethodIndex());-
160}
executed 160 times by 7 tests: end of block
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusthreading - unknown status
160
161-
162void QDBusAdaptorConnector::connectAllSignals(QObject *obj)-
163{-
164 QMetaObject::connect(obj, -1, this, relaySlotMethodIndex(), Qt::DirectConnection);-
165}
executed 360 times by 10 tests: end of block
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
360
166-
167void QDBusAdaptorConnector::polish()-
168{-
169 if (!waitingForPolish
!waitingForPolishDescription
TRUEevaluated 690 times by 7 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 200 times by 5 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
)
200-690
170 return;
executed 690 times by 7 tests: return;
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
690
171-
172 waitingForPolish = false;-
173 const QObjectList &objs = parent()->children();-
174 QObjectList::ConstIterator it = objs.constBegin();-
175 QObjectList::ConstIterator end = objs.constEnd();-
176 for ( ; it != end
it != endDescription
TRUEevaluated 748 times by 5 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 200 times by 5 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
; ++it) {
200-748
177 QDBusAbstractAdaptor *adaptor = qobject_cast<QDBusAbstractAdaptor *>(*it);-
178 if (adaptor
adaptorDescription
TRUEevaluated 548 times by 5 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 200 times by 5 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
)
200-548
179 addAdaptor(adaptor);
executed 548 times by 5 tests: addAdaptor(adaptor);
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
548
180 }
executed 748 times by 5 tests: end of block
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
748
181-
182-
183 std::sort(adaptors.begin(), adaptors.end());-
184}
executed 200 times by 5 tests: end of block
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
200
185-
186void QDBusAdaptorConnector::relaySlot(void **argv)-
187{-
188 QObject *sndr = sender();-
189 if (__builtin_expect(!!(sndr), true)
__builtin_expe...!(sndr), true)Description
TRUEevaluated 321 times by 10 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
FALSEnever evaluated
) {
0-321
190 relay(sndr, senderSignalIndex(), argv);-
191 }
executed 321 times by 10 tests: end of block
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
else {
321
192 QMessageLogger(__FILE__, 285, __PRETTY_FUNCTION__).warning("QtDBus: cannot relay signals from parent %s(%p \"%s\") unless they are emitted in the object's thread %s(%p \"%s\"). "-
193 "Current thread is %s(%p \"%s\").",-
194 parent()->metaObject()->className(), parent(), QString(parent()->objectName()).toLocal8Bit().constData(),-
195 parent()->thread()->metaObject()->className(), parent()->thread(), QString(parent()->thread()->objectName()).toLocal8Bit().constData(),-
196 QThread::currentThread()->metaObject()->className(), QThread::currentThread(), QString(QThread::currentThread()->objectName()).toLocal8Bit().constData());-
197 }
never executed: end of block
0
198}-
199-
200void QDBusAdaptorConnector::relay(QObject *senderObj, int lastSignalIdx, void **argv)-
201{-
202 if (lastSignalIdx < QObject::staticMetaObject.methodCount()
lastSignalIdx ....methodCount()Description
TRUEevaluated 113 times by 10 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 208 times by 3 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusthreading - unknown status
)
113-208
203-
204 return;
executed 113 times by 10 tests: return;
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_no_app - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbuspendingcall - unknown status
  • tst_qdbuspendingreply - unknown status
  • tst_qdbusreply - unknown status
  • tst_qdbusthreading - unknown status
113
205-
206 const QMetaObject *senderMetaObject = senderObj->metaObject();-
207 QMetaMethod mm = senderMetaObject->method(lastSignalIdx);-
208-
209 QObject *realObject = senderObj;-
210 if (qobject_cast<QDBusAbstractAdaptor *>(senderObj)
qobject_cast<Q... *>(senderObj)Description
TRUEevaluated 95 times by 2 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusthreading - unknown status
FALSEevaluated 113 times by 3 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusthreading - unknown status
)
95-113
211-
212 realObject = realObject->parent();
executed 95 times by 2 tests: realObject = realObject->parent();
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusthreading - unknown status
95
213-
214-
215 QVector<int> types;-
216 QString errorMsg;-
217 int inputCount = qDBusParametersForMethod(mm, types, errorMsg);-
218 if (inputCount == -1
inputCount == -1Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
FALSEevaluated 207 times by 3 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusthreading - unknown status
) {
1-207
219-
220 QMessageLogger(__FILE__, 313, __PRETTY_FUNCTION__).warning("QDBusAbstractAdaptor: Cannot relay signal %s::%s: %s",-
221 senderMetaObject->className(), mm.methodSignature().constData(),-
222 QString(errorMsg).toLocal8Bit().constData());-
223 return;
executed 1 time by 1 test: return;
Executed by:
  • tst_qdbusabstractadaptor - unknown status
1
224 }-
225 if (inputCount + 1 != types.count()
inputCount + 1... types.count()Description
TRUEnever evaluated
FALSEevaluated 207 times by 3 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusthreading - unknown status
||
0-207
226 types.at(inputCount) == QDBusMetaTypeId::message()
types.at(input...eId::message()Description
TRUEnever evaluated
FALSEevaluated 207 times by 3 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusthreading - unknown status
) {
0-207
227-
228 QMessageLogger(__FILE__, 321, __PRETTY_FUNCTION__).warning("QDBusAbstractAdaptor: Cannot relay signal %s::%s",-
229 senderMetaObject->className(), mm.methodSignature().constData());-
230 return;
never executed: return;
0
231 }-
232-
233 QVariantList args;-
234 const int numTypes = types.count();-
235 args.reserve(numTypes - 1);-
236 for (int i = 1; i < numTypes
i < numTypesDescription
TRUEevaluated 116 times by 2 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
FALSEevaluated 207 times by 3 tests
Evaluated by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusthreading - unknown status
; ++i)
116-207
237 args << QVariant(types.at(i), argv[i]);
executed 116 times by 2 tests: args << QVariant(types.at(i), argv[i]);
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
116
238-
239-
240 relaySignal(realObject, senderMetaObject, lastSignalIdx, args);-
241}
executed 207 times by 3 tests: end of block
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusthreading - unknown status
207
242-
243-
244-
245-
246-
247struct qt_meta_stringdata_QDBusAdaptorConnector_t {-
248 QByteArrayData data[10];-
249 char stringdata[96];-
250};-
251-
252-
253-
254-
255-
256static const qt_meta_stringdata_QDBusAdaptorConnector_t qt_meta_stringdata_QDBusAdaptorConnector = {-
257 {-
258{ { { -1 } }, 21, 0, 0, __builtin_offsetof (qt_meta_stringdata_QDBusAdaptorConnector_t, stringdata) + 0 - 0 * sizeof(QByteArrayData) },-
259{ { { -1 } }, 11, 0, 0, __builtin_offsetof (qt_meta_stringdata_QDBusAdaptorConnector_t, stringdata) + 22 - 1 * sizeof(QByteArrayData) },-
260{ { { -1 } }, 0, 0, 0, __builtin_offsetof (qt_meta_stringdata_QDBusAdaptorConnector_t, stringdata) + 34 - 2 * sizeof(QByteArrayData) },-
261{ { { -1 } }, 3, 0, 0, __builtin_offsetof (qt_meta_stringdata_QDBusAdaptorConnector_t, stringdata) + 35 - 3 * sizeof(QByteArrayData) },-
262{ { { -1 } }, 18, 0, 0, __builtin_offsetof (qt_meta_stringdata_QDBusAdaptorConnector_t, stringdata) + 39 - 4 * sizeof(QByteArrayData) },-
263{ { { -1 } }, 10, 0, 0, __builtin_offsetof (qt_meta_stringdata_QDBusAdaptorConnector_t, stringdata) + 58 - 5 * sizeof(QByteArrayData) },-
264{ { { -1 } }, 3, 0, 0, __builtin_offsetof (qt_meta_stringdata_QDBusAdaptorConnector_t, stringdata) + 69 - 6 * sizeof(QByteArrayData) },-
265{ { { -1 } }, 4, 0, 0, __builtin_offsetof (qt_meta_stringdata_QDBusAdaptorConnector_t, stringdata) + 73 - 7 * sizeof(QByteArrayData) },-
266{ { { -1 } }, 9, 0, 0, __builtin_offsetof (qt_meta_stringdata_QDBusAdaptorConnector_t, stringdata) + 78 - 8 * sizeof(QByteArrayData) },-
267{ { { -1 } }, 6, 0, 0, __builtin_offsetof (qt_meta_stringdata_QDBusAdaptorConnector_t, stringdata) + 88 - 9 * sizeof(QByteArrayData) }-
268 },-
269 "QDBusAdaptorConnector\0relaySignal\0\0"-
270 "obj\0const QMetaObject*\0metaObject\0sid\0"-
271 "args\0relaySlot\0polish\0"-
272};-
273-
274-
275static const uint qt_meta_data_QDBusAdaptorConnector[] = {-
276-
277-
278 7,-
279 0,-
280 0, 0,-
281 3, 14,-
282 0, 0,-
283 0, 0,-
284 0, 0,-
285 0,-
286 1,-
287-
288-
289 1, 4, 29, 2, 0x05,-
290-
291-
292 8, 0, 38, 2, 0x0a,-
293 9, 0, 39, 2, 0x0a,-
294-
295-
296 QMetaType::Void, QMetaType::QObjectStar, 0x80000000 | 4, QMetaType::Int, QMetaType::QVariantList, 3, 5, 6, 7,-
297-
298-
299 QMetaType::Void,-
300 QMetaType::Void,-
301-
302 0-
303};-
304-
305void QDBusAdaptorConnector::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)-
306{-
307 if (_c == QMetaObject::InvokeMetaMethod) {-
308 ((!(staticMetaObject.cast(_o))) ? qt_assert("staticMetaObject.cast(_o)",__FILE__,401) : qt_noop());-
309 QDBusAdaptorConnector *_t = static_cast<QDBusAdaptorConnector *>(_o);-
310 switch (_id) {-
311 case 0: _t->relaySignal((*reinterpret_cast< QObject*(*)>(_a[1])),(*reinterpret_cast< const QMetaObject*(*)>(_a[2])),(*reinterpret_cast< int(*)>(_a[3])),(*reinterpret_cast< const QVariantList(*)>(_a[4]))); break;-
312 case 1: _t->relaySlot(_a); break;-
313 case 2: _t->polish(); break;-
314 default: ;-
315 }-
316 }-
317}-
318-
319const QMetaObject QDBusAdaptorConnector::staticMetaObject = {-
320 { &QObject::staticMetaObject, qt_meta_stringdata_QDBusAdaptorConnector.data,-
321 qt_meta_data_QDBusAdaptorConnector, qt_static_metacall, 0, 0 }-
322};-
323-
324const QMetaObject *QDBusAdaptorConnector::metaObject() const-
325{-
326 return &staticMetaObject;-
327}-
328-
329void *QDBusAdaptorConnector::qt_metacast(const char *_clname)-
330{-
331 if (!_clname) return 0;-
332 if (!strcmp(_clname, qt_meta_stringdata_QDBusAdaptorConnector.stringdata))-
333 return static_cast<void*>(const_cast< QDBusAdaptorConnector*>(this));-
334 return QObject::qt_metacast(_clname);-
335}-
336-
337int QDBusAdaptorConnector::qt_metacall(QMetaObject::Call _c, int _id, void **_a)-
338{-
339 _id = QObject::qt_metacall(_c, _id, _a);-
340 if (_id < 0)-
341 return _id;-
342 if (_c == QMetaObject::InvokeMetaMethod) {-
343 if (_id < 3)-
344 qt_static_metacall(this, _c, _id, _a);-
345 _id -= 3;-
346 }-
347 return _id;-
348}-
349-
350-
351void QDBusAdaptorConnector::relaySignal(QObject * _t1, const QMetaObject * _t2, int _t3, const QVariantList & _t4)-
352{-
353 void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)), const_cast<void*>(reinterpret_cast<const void*>(&_t2)), const_cast<void*>(reinterpret_cast<const void*>(&_t3)), const_cast<void*>(reinterpret_cast<const void*>(&_t4)) };-
354 QMetaObject::activate(this, &staticMetaObject, 0, _a);-
355}
executed 207 times by 3 tests: end of block
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusthreading - unknown status
207
356-
357-
Switch to Source codePreprocessed file

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