qdbusargument.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4 -
5 -
6 -
7 -
8QDBusArgumentPrivate::~QDBusArgumentPrivate() -
9{ -
10 if (message)
evaluated: message
TRUEFALSE
yes
Evaluation Count:2201
yes
Evaluation Count:2177
2177-2201
11 q_dbus_message_unref(message);
executed: q_dbus_message_unref(message);
Execution Count:2201
2201
12}
executed: }
Execution Count:4378
4378
13 -
14QByteArray QDBusArgumentPrivate::createSignature(int id) -
15{ -
16 if (!qdbus_loadLibDBus())
partially evaluated: !qdbus_loadLibDBus()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:61
0-61
17 return "";
never executed: return "";
0
18 -
19 QByteArray signature; -
20 QDBusMarshaller *marshaller = new QDBusMarshaller(0); -
21 marshaller->ba = &signature; -
22 -
23 -
24 void *null = 0; -
25 QVariant v(id, null); -
26 QDBusArgument arg(marshaller); -
27 QDBusMetaType::marshall(arg, v.userType(), v.constData()); -
28 arg.d = 0; -
29 -
30 -
31 bool ok = marshaller->ok; -
32 delete marshaller; -
33 -
34 if (signature.isEmpty() || !ok || !QDBusUtil::isValidSingleSignature(QString::fromLatin1(signature))) {
evaluated: signature.isEmpty()
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:60
partially evaluated: !ok
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:60
evaluated: !QDBusUtil::isValidSingleSignature(QString::fromLatin1(signature))
TRUEFALSE
yes
Evaluation Count:3
yes
Evaluation Count:57
0-60
35 QMessageLogger("qdbusargument.cpp", 90, __PRETTY_FUNCTION__).warning("QDBusMarshaller: type `%s' produces invalid D-BUS signature `%s' " -
36 "(Did you forget to call beginStructure() ?)", -
37 QMetaType::typeName(id), -
38 signature.isEmpty() ? "<empty>" : signature.constData()); -
39 return "";
executed: return "";
Execution Count:4
4
40 } else if ((signature.at(0) != ((int) 'a') && signature.at(0) != ((int) '(')) ||
evaluated: signature.at(0) != ((int) 'a')
TRUEFALSE
yes
Evaluation Count:26
yes
Evaluation Count:31
evaluated: signature.at(0) != ((int) '(')
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:24
2-31
41 (signature.at(0) == ((int) 'a') && (signature.at(1) == ((int) 'y') ||
evaluated: signature.at(0) == ((int) 'a')
TRUEFALSE
yes
Evaluation Count:31
yes
Evaluation Count:24
evaluated: signature.at(1) == ((int) 'y')
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:30
1-31
42 signature.at(1) == ((int) 's')))) {
evaluated: signature.at(1) == ((int) 's')
TRUEFALSE
yes
Evaluation Count:1
yes
Evaluation Count:29
1-29
43 QMessageLogger("qdbusargument.cpp", 98, __PRETTY_FUNCTION__).warning("QDBusMarshaller: type `%s' attempts to redefine basic D-BUS type '%s' (%s) " -
44 "(Did you forget to call beginStructure() ?)", -
45 QMetaType::typeName(id), -
46 signature.constData(), -
47 QMetaType::typeName(QDBusMetaType::signatureToType(signature))); -
48 return "";
executed: return "";
Execution Count:4
4
49 } -
50 return signature;
executed: return signature;
Execution Count:53
53
51} -
52 -
53bool QDBusArgumentPrivate::checkWrite(QDBusArgumentPrivate *&d) -
54{ -
55 if (!d)
partially evaluated: !d
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:661
0-661
56 return false;
never executed: return false;
0
57 if (d->direction == Marshalling) {
partially evaluated: d->direction == Marshalling
TRUEFALSE
yes
Evaluation Count:661
no
Evaluation Count:0
0-661
58 if (!d->marshaller()->ok)
partially evaluated: !d->marshaller()->ok
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:661
0-661
59 return false;
never executed: return false;
0
60 -
61 if (d->message && d->ref.load() != 1) {
partially evaluated: d->message
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:661
never evaluated: d->ref.load() != 1
0-661
62 QDBusMarshaller *dd = new QDBusMarshaller(d->capabilities); -
63 dd->message = q_dbus_message_copy(d->message); -
64 q_dbus_message_iter_init_append(dd->message, &dd->iterator); -
65 -
66 if (!d->ref.deref())
never evaluated: !d->ref.deref()
0
67 delete d;
never executed: delete d;
0
68 d = dd; -
69 }
never executed: }
0
70 return true;
executed: return true;
Execution Count:661
661
71 } -
72 -
73 -
74 -
75 -
76 QMessageLogger("qdbusargument.cpp", 131, __PRETTY_FUNCTION__).warning("QDBusArgument: write from a read-only object"); -
77 -
78 return false;
never executed: return false;
0
79} -
80 -
81bool QDBusArgumentPrivate::checkRead(QDBusArgumentPrivate *d) -
82{ -
83 if (!d)
partially evaluated: !d
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:717
0-717
84 return false;
never executed: return false;
0
85 if (d->direction == Demarshalling)
partially evaluated: d->direction == Demarshalling
TRUEFALSE
yes
Evaluation Count:717
no
Evaluation Count:0
0-717
86 return true;
executed: return true;
Execution Count:717
717
87 -
88 -
89 -
90 -
91 QMessageLogger("qdbusargument.cpp", 146, __PRETTY_FUNCTION__).warning("QDBusArgument: read from a write-only object"); -
92 -
93 -
94 return false;
never executed: return false;
0
95} -
96 -
97bool QDBusArgumentPrivate::checkReadAndDetach(QDBusArgumentPrivate *&d) -
98{ -
99 if (!checkRead(d))
partially evaluated: !checkRead(d)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:538
0-538
100 return false;
never executed: return false;
0
101 -
102 if (d->ref.load() == 1)
evaluated: d->ref.load() == 1
TRUEFALSE
yes
Evaluation Count:467
yes
Evaluation Count:71
71-467
103 return true;
executed: return true;
Execution Count:467
467
104 -
105 QDBusDemarshaller *dd = new QDBusDemarshaller(d->capabilities); -
106 dd->message = q_dbus_message_ref(d->message); -
107 dd->iterator = static_cast<QDBusDemarshaller*>(d)->iterator; -
108 -
109 if (!d->ref.deref())
partially evaluated: !d->ref.deref()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:71
0-71
110 delete d;
never executed: delete d;
0
111 d = dd; -
112 return true;
executed: return true;
Execution Count:71
71
113} -
114QDBusArgument::QDBusArgument() -
115{ -
116 if (!qdbus_loadLibDBus()) {
never evaluated: !qdbus_loadLibDBus()
0
117 d = 0; -
118 return;
never executed: return;
0
119 } -
120 -
121 QDBusMarshaller *dd = new QDBusMarshaller(0); -
122 d = dd; -
123 -
124 -
125 dd->message = q_dbus_message_new(1); -
126 q_dbus_message_iter_init_append(dd->message, &dd->iterator); -
127}
never executed: }
0
128QDBusArgument::QDBusArgument(const QDBusArgument &other) -
129 : d(other.d) -
130{ -
131 if (d)
partially evaluated: d
TRUEFALSE
yes
Evaluation Count:183
no
Evaluation Count:0
0-183
132 d->ref.ref();
executed: d->ref.ref();
Execution Count:183
183
133}
executed: }
Execution Count:183
183
134 -
135 -
136 -
137 -
138QDBusArgument::QDBusArgument(QDBusArgumentPrivate *dd) -
139 : d(dd) -
140{ -
141}
executed: }
Execution Count:192
192
142QDBusArgument &QDBusArgument::operator=(const QDBusArgument &other) -
143{ -
144 qAtomicAssign(d, other.d); -
145 return *this;
never executed: return *this;
0
146} -
147 -
148 -
149 -
150 -
151 -
152QDBusArgument::~QDBusArgument() -
153{ -
154 if (d && !d->ref.deref())
evaluated: d
TRUEFALSE
yes
Evaluation Count:313
yes
Evaluation Count:61
evaluated: !d->ref.deref()
TRUEFALSE
yes
Evaluation Count:147
yes
Evaluation Count:166
61-313
155 delete d;
executed: delete d;
Execution Count:147
147
156}
executed: }
Execution Count:374
374
157 -
158 -
159 -
160 -
161QDBusArgument &QDBusArgument::operator<<(uchar arg) -
162{ -
163 if (QDBusArgumentPrivate::checkWrite(d))
never evaluated: QDBusArgumentPrivate::checkWrite(d)
0
164 d->marshaller()->append(arg);
never executed: d->marshaller()->append(arg);
0
165 return *this;
never executed: return *this;
0
166} -
167 -
168 -
169 -
170 -
171 -
172QDBusArgument &QDBusArgument::operator<<(bool arg) -
173{ -
174 if (QDBusArgumentPrivate::checkWrite(d))
never evaluated: QDBusArgumentPrivate::checkWrite(d)
0
175 d->marshaller()->append(arg);
never executed: d->marshaller()->append(arg);
0
176 return *this;
never executed: return *this;
0
177} -
178 -
179 -
180 -
181 -
182 -
183QDBusArgument &QDBusArgument::operator<<(short arg) -
184{ -
185 if (QDBusArgumentPrivate::checkWrite(d))
never evaluated: QDBusArgumentPrivate::checkWrite(d)
0
186 d->marshaller()->append(arg);
never executed: d->marshaller()->append(arg);
0
187 return *this;
never executed: return *this;
0
188} -
189 -
190 -
191 -
192 -
193 -
194QDBusArgument &QDBusArgument::operator<<(ushort arg) -
195{ -
196 if (QDBusArgumentPrivate::checkWrite(d))
never evaluated: QDBusArgumentPrivate::checkWrite(d)
0
197 d->marshaller()->append(arg);
never executed: d->marshaller()->append(arg);
0
198 return *this;
never executed: return *this;
0
199} -
200 -
201 -
202 -
203 -
204 -
205QDBusArgument &QDBusArgument::operator<<(int arg) -
206{ -
207 if (QDBusArgumentPrivate::checkWrite(d))
partially evaluated: QDBusArgumentPrivate::checkWrite(d)
TRUEFALSE
yes
Evaluation Count:120
no
Evaluation Count:0
0-120
208 d->marshaller()->append(arg);
executed: d->marshaller()->append(arg);
Execution Count:120
120
209 return *this;
executed: return *this;
Execution Count:120
120
210} -
211 -
212 -
213 -
214 -
215 -
216QDBusArgument &QDBusArgument::operator<<(uint arg) -
217{ -
218 if (QDBusArgumentPrivate::checkWrite(d))
never evaluated: QDBusArgumentPrivate::checkWrite(d)
0
219 d->marshaller()->append(arg);
never executed: d->marshaller()->append(arg);
0
220 return *this;
never executed: return *this;
0
221} -
222 -
223 -
224 -
225 -
226 -
227QDBusArgument &QDBusArgument::operator<<(qlonglong arg) -
228{ -
229 if (QDBusArgumentPrivate::checkWrite(d))
partially evaluated: QDBusArgumentPrivate::checkWrite(d)
TRUEFALSE
yes
Evaluation Count:6
no
Evaluation Count:0
0-6
230 d->marshaller()->append(arg);
executed: d->marshaller()->append(arg);
Execution Count:6
6
231 return *this;
executed: return *this;
Execution Count:6
6
232} -
233 -
234 -
235 -
236 -
237 -
238QDBusArgument &QDBusArgument::operator<<(qulonglong arg) -
239{ -
240 if (QDBusArgumentPrivate::checkWrite(d))
never evaluated: QDBusArgumentPrivate::checkWrite(d)
0
241 d->marshaller()->append(arg);
never executed: d->marshaller()->append(arg);
0
242 return *this;
never executed: return *this;
0
243} -
244 -
245 -
246 -
247 -
248 -
249 -
250QDBusArgument &QDBusArgument::operator<<(double arg) -
251{ -
252 if (QDBusArgumentPrivate::checkWrite(d))
partially evaluated: QDBusArgumentPrivate::checkWrite(d)
TRUEFALSE
yes
Evaluation Count:12
no
Evaluation Count:0
0-12
253 d->marshaller()->append(arg);
executed: d->marshaller()->append(arg);
Execution Count:12
12
254 return *this;
executed: return *this;
Execution Count:12
12
255} -
256 -
257 -
258 -
259 -
260 -
261 -
262QDBusArgument &QDBusArgument::operator<<(const QString &arg) -
263{ -
264 if (QDBusArgumentPrivate::checkWrite(d))
partially evaluated: QDBusArgumentPrivate::checkWrite(d)
TRUEFALSE
yes
Evaluation Count:94
no
Evaluation Count:0
0-94
265 d->marshaller()->append(arg);
executed: d->marshaller()->append(arg);
Execution Count:94
94
266 return *this;
executed: return *this;
Execution Count:94
94
267} -
268 -
269 -
270 -
271 -
272 -
273 -
274 -
275QDBusArgument &QDBusArgument::operator<<(const QDBusObjectPath &arg) -
276{ -
277 if (QDBusArgumentPrivate::checkWrite(d))
partially evaluated: QDBusArgumentPrivate::checkWrite(d)
TRUEFALSE
yes
Evaluation Count:4
no
Evaluation Count:0
0-4
278 d->marshaller()->append(arg);
executed: d->marshaller()->append(arg);
Execution Count:4
4
279 return *this;
executed: return *this;
Execution Count:4
4
280} -
281 -
282 -
283 -
284 -
285 -
286 -
287 -
288QDBusArgument &QDBusArgument::operator<<(const QDBusSignature &arg) -
289{ -
290 if (QDBusArgumentPrivate::checkWrite(d))
never evaluated: QDBusArgumentPrivate::checkWrite(d)
0
291 d->marshaller()->append(arg);
never executed: d->marshaller()->append(arg);
0
292 return *this;
never executed: return *this;
0
293} -
294QDBusArgument &QDBusArgument::operator<<(const QDBusUnixFileDescriptor &arg) -
295{ -
296 if (QDBusArgumentPrivate::checkWrite(d))
never evaluated: QDBusArgumentPrivate::checkWrite(d)
0
297 d->marshaller()->append(arg);
never executed: d->marshaller()->append(arg);
0
298 return *this;
never executed: return *this;
0
299} -
300QDBusArgument &QDBusArgument::operator<<(const QDBusVariant &arg) -
301{ -
302 if (QDBusArgumentPrivate::checkWrite(d))
partially evaluated: QDBusArgumentPrivate::checkWrite(d)
TRUEFALSE
yes
Evaluation Count:48
no
Evaluation Count:0
0-48
303 d->marshaller()->append(arg);
executed: d->marshaller()->append(arg);
Execution Count:48
48
304 return *this;
executed: return *this;
Execution Count:48
48
305} -
306QDBusArgument &QDBusArgument::operator<<(const QStringList &arg) -
307{ -
308 if (QDBusArgumentPrivate::checkWrite(d))
partially evaluated: QDBusArgumentPrivate::checkWrite(d)
TRUEFALSE
yes
Evaluation Count:4
no
Evaluation Count:0
0-4
309 d->marshaller()->append(arg);
executed: d->marshaller()->append(arg);
Execution Count:4
4
310 return *this;
executed: return *this;
Execution Count:4
4
311} -
312QDBusArgument &QDBusArgument::operator<<(const QByteArray &arg) -
313{ -
314 if (QDBusArgumentPrivate::checkWrite(d))
partially evaluated: QDBusArgumentPrivate::checkWrite(d)
TRUEFALSE
yes
Evaluation Count:3
no
Evaluation Count:0
0-3
315 d->marshaller()->append(arg);
executed: d->marshaller()->append(arg);
Execution Count:3
3
316 return *this;
executed: return *this;
Execution Count:3
3
317} -
318void QDBusArgument::appendVariant(const QVariant &v) -
319{ -
320 if (QDBusArgumentPrivate::checkWrite(d))
never evaluated: QDBusArgumentPrivate::checkWrite(d)
0
321 d->marshaller()->appendVariantInternal(v);
never executed: d->marshaller()->appendVariantInternal(v);
0
322}
never executed: }
0
323 -
324 -
325 -
326 -
327 -
328 -
329QString QDBusArgument::currentSignature() const -
330{ -
331 if (!d)
partially evaluated: !d
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:35
0-35
332 return QString();
never executed: return QString();
0
333 if (d->direction == QDBusArgumentPrivate::Demarshalling)
partially evaluated: d->direction == QDBusArgumentPrivate::Demarshalling
TRUEFALSE
yes
Evaluation Count:35
no
Evaluation Count:0
0-35
334 return d->demarshaller()->currentSignature();
executed: return d->demarshaller()->currentSignature();
Execution Count:35
35
335 else -
336 return d->marshaller()->currentSignature();
never executed: return d->marshaller()->currentSignature();
0
337} -
338QDBusArgument::ElementType QDBusArgument::currentType() const -
339{ -
340 if (!d)
never evaluated: !d
0
341 return UnknownType;
never executed: return UnknownType;
0
342 if (d->direction == QDBusArgumentPrivate::Demarshalling)
never evaluated: d->direction == QDBusArgumentPrivate::Demarshalling
0
343 return d->demarshaller()->currentType();
never executed: return d->demarshaller()->currentType();
0
344 return UnknownType;
never executed: return UnknownType;
0
345} -
346 -
347 -
348 -
349 -
350 -
351const QDBusArgument &QDBusArgument::operator>>(uchar &arg) const -
352{ -
353 if (QDBusArgumentPrivate::checkReadAndDetach(d))
never evaluated: QDBusArgumentPrivate::checkReadAndDetach(d)
0
354 arg = d->demarshaller()->toByte();
never executed: arg = d->demarshaller()->toByte();
0
355 return *this;
never executed: return *this;
0
356} -
357 -
358 -
359 -
360 -
361 -
362 -
363const QDBusArgument &QDBusArgument::operator>>(bool &arg) const -
364{ -
365 if (QDBusArgumentPrivate::checkReadAndDetach(d))
never evaluated: QDBusArgumentPrivate::checkReadAndDetach(d)
0
366 arg = d->demarshaller()->toBool();
never executed: arg = d->demarshaller()->toBool();
0
367 return *this;
never executed: return *this;
0
368} -
369 -
370 -
371 -
372 -
373 -
374 -
375const QDBusArgument &QDBusArgument::operator>>(ushort &arg) const -
376{ -
377 if (QDBusArgumentPrivate::checkReadAndDetach(d))
never evaluated: QDBusArgumentPrivate::checkReadAndDetach(d)
0
378 arg = d->demarshaller()->toUShort();
never executed: arg = d->demarshaller()->toUShort();
0
379 return *this;
never executed: return *this;
0
380} -
381 -
382 -
383 -
384 -
385 -
386 -
387const QDBusArgument &QDBusArgument::operator>>(short &arg) const -
388{ -
389 if (QDBusArgumentPrivate::checkReadAndDetach(d))
never evaluated: QDBusArgumentPrivate::checkReadAndDetach(d)
0
390 arg = d->demarshaller()->toShort();
never executed: arg = d->demarshaller()->toShort();
0
391 return *this;
never executed: return *this;
0
392} -
393 -
394 -
395 -
396 -
397 -
398 -
399const QDBusArgument &QDBusArgument::operator>>(int &arg) const -
400{ -
401 if (QDBusArgumentPrivate::checkReadAndDetach(d))
partially evaluated: QDBusArgumentPrivate::checkReadAndDetach(d)
TRUEFALSE
yes
Evaluation Count:78
no
Evaluation Count:0
0-78
402 arg = d->demarshaller()->toInt();
executed: arg = d->demarshaller()->toInt();
Execution Count:78
78
403 return *this;
executed: return *this;
Execution Count:78
78
404} -
405 -
406 -
407 -
408 -
409 -
410 -
411const QDBusArgument &QDBusArgument::operator>>(uint &arg) const -
412{ -
413 if (QDBusArgumentPrivate::checkReadAndDetach(d))
never evaluated: QDBusArgumentPrivate::checkReadAndDetach(d)
0
414 arg = d->demarshaller()->toUInt();
never executed: arg = d->demarshaller()->toUInt();
0
415 return *this;
never executed: return *this;
0
416} -
417 -
418 -
419 -
420 -
421 -
422 -
423const QDBusArgument &QDBusArgument::operator>>(qlonglong &arg) const -
424{ -
425 if (QDBusArgumentPrivate::checkReadAndDetach(d))
partially evaluated: QDBusArgumentPrivate::checkReadAndDetach(d)
TRUEFALSE
yes
Evaluation Count:4
no
Evaluation Count:0
0-4
426 arg = d->demarshaller()->toLongLong();
executed: arg = d->demarshaller()->toLongLong();
Execution Count:4
4
427 return *this;
executed: return *this;
Execution Count:4
4
428} -
429 -
430 -
431 -
432 -
433 -
434 -
435const QDBusArgument &QDBusArgument::operator>>(qulonglong &arg) const -
436{ -
437 if (QDBusArgumentPrivate::checkReadAndDetach(d))
never evaluated: QDBusArgumentPrivate::checkReadAndDetach(d)
0
438 arg = d->demarshaller()->toULongLong();
never executed: arg = d->demarshaller()->toULongLong();
0
439 return *this;
never executed: return *this;
0
440} -
441 -
442 -
443 -
444 -
445 -
446 -
447const QDBusArgument &QDBusArgument::operator>>(double &arg) const -
448{ -
449 if (QDBusArgumentPrivate::checkReadAndDetach(d))
never evaluated: QDBusArgumentPrivate::checkReadAndDetach(d)
0
450 arg = d->demarshaller()->toDouble();
never executed: arg = d->demarshaller()->toDouble();
0
451 return *this;
never executed: return *this;
0
452} -
453 -
454 -
455 -
456 -
457 -
458 -
459const QDBusArgument &QDBusArgument::operator>>(QString &arg) const -
460{ -
461 if (QDBusArgumentPrivate::checkReadAndDetach(d))
partially evaluated: QDBusArgumentPrivate::checkReadAndDetach(d)
TRUEFALSE
yes
Evaluation Count:84
no
Evaluation Count:0
0-84
462 arg = d->demarshaller()->toString();
executed: arg = d->demarshaller()->toString();
Execution Count:84
84
463 return *this;
executed: return *this;
Execution Count:84
84
464} -
465 -
466 -
467 -
468 -
469 -
470 -
471 -
472const QDBusArgument &QDBusArgument::operator>>(QDBusObjectPath &arg) const -
473{ -
474 if (QDBusArgumentPrivate::checkReadAndDetach(d))
partially evaluated: QDBusArgumentPrivate::checkReadAndDetach(d)
TRUEFALSE
yes
Evaluation Count:2
no
Evaluation Count:0
0-2
475 arg = d->demarshaller()->toObjectPath();
executed: arg = d->demarshaller()->toObjectPath();
Execution Count:2
2
476 return *this;
executed: return *this;
Execution Count:2
2
477} -
478 -
479 -
480 -
481 -
482 -
483 -
484 -
485const QDBusArgument &QDBusArgument::operator>>(QDBusSignature &arg) const -
486{ -
487 if (QDBusArgumentPrivate::checkReadAndDetach(d))
never evaluated: QDBusArgumentPrivate::checkReadAndDetach(d)
0
488 arg = d->demarshaller()->toSignature();
never executed: arg = d->demarshaller()->toSignature();
0
489 return *this;
never executed: return *this;
0
490} -
491const QDBusArgument &QDBusArgument::operator>>(QDBusUnixFileDescriptor &arg) const -
492{ -
493 if (QDBusArgumentPrivate::checkReadAndDetach(d))
never evaluated: QDBusArgumentPrivate::checkReadAndDetach(d)
0
494 arg = d->demarshaller()->toUnixFileDescriptor();
never executed: arg = d->demarshaller()->toUnixFileDescriptor();
0
495 return *this;
never executed: return *this;
0
496} -
497const QDBusArgument &QDBusArgument::operator>>(QDBusVariant &arg) const -
498{ -
499 if (QDBusArgumentPrivate::checkReadAndDetach(d))
partially evaluated: QDBusArgumentPrivate::checkReadAndDetach(d)
TRUEFALSE
yes
Evaluation Count:76
no
Evaluation Count:0
0-76
500 arg = d->demarshaller()->toVariant();
executed: arg = d->demarshaller()->toVariant();
Execution Count:76
76
501 return *this;
executed: return *this;
Execution Count:76
76
502} -
503const QDBusArgument &QDBusArgument::operator>>(QStringList &arg) const -
504{ -
505 if (QDBusArgumentPrivate::checkReadAndDetach(d))
never evaluated: QDBusArgumentPrivate::checkReadAndDetach(d)
0
506 arg = d->demarshaller()->toStringList();
never executed: arg = d->demarshaller()->toStringList();
0
507 return *this;
never executed: return *this;
0
508} -
509const QDBusArgument &QDBusArgument::operator>>(QByteArray &arg) const -
510{ -
511 if (QDBusArgumentPrivate::checkReadAndDetach(d))
never evaluated: QDBusArgumentPrivate::checkReadAndDetach(d)
0
512 arg = d->demarshaller()->toByteArray();
never executed: arg = d->demarshaller()->toByteArray();
0
513 return *this;
never executed: return *this;
0
514} -
515void QDBusArgument::beginStructure() -
516{ -
517 if (QDBusArgumentPrivate::checkWrite(d))
partially evaluated: QDBusArgumentPrivate::checkWrite(d)
TRUEFALSE
yes
Evaluation Count:65
no
Evaluation Count:0
0-65
518 d = d->marshaller()->beginStructure();
executed: d = d->marshaller()->beginStructure();
Execution Count:65
65
519}
executed: }
Execution Count:65
65
520 -
521 -
522 -
523 -
524 -
525 -
526 -
527void QDBusArgument::endStructure() -
528{ -
529 if (QDBusArgumentPrivate::checkWrite(d))
partially evaluated: QDBusArgumentPrivate::checkWrite(d)
TRUEFALSE
yes
Evaluation Count:65
no
Evaluation Count:0
0-65
530 d = d->marshaller()->endStructure();
executed: d = d->marshaller()->endStructure();
Execution Count:65
65
531}
executed: }
Execution Count:65
65
532void QDBusArgument::beginArray(int id) -
533{ -
534 if (QDBusArgumentPrivate::checkWrite(d))
partially evaluated: QDBusArgumentPrivate::checkWrite(d)
TRUEFALSE
yes
Evaluation Count:32
no
Evaluation Count:0
0-32
535 d = d->marshaller()->beginArray(id);
executed: d = d->marshaller()->beginArray(id);
Execution Count:32
32
536}
executed: }
Execution Count:32
32
537 -
538 -
539 -
540 -
541 -
542 -
543 -
544void QDBusArgument::endArray() -
545{ -
546 if (QDBusArgumentPrivate::checkWrite(d))
partially evaluated: QDBusArgumentPrivate::checkWrite(d)
TRUEFALSE
yes
Evaluation Count:32
no
Evaluation Count:0
0-32
547 d = d->marshaller()->endArray();
executed: d = d->marshaller()->endArray();
Execution Count:32
32
548}
executed: }
Execution Count:32
32
549void QDBusArgument::beginMap(int kid, int vid) -
550{ -
551 if (QDBusArgumentPrivate::checkWrite(d))
partially evaluated: QDBusArgumentPrivate::checkWrite(d)
TRUEFALSE
yes
Evaluation Count:34
no
Evaluation Count:0
0-34
552 d = d->marshaller()->beginMap(kid, vid);
executed: d = d->marshaller()->beginMap(kid, vid);
Execution Count:34
34
553}
executed: }
Execution Count:34
34
554 -
555 -
556 -
557 -
558 -
559 -
560 -
561void QDBusArgument::endMap() -
562{ -
563 if (QDBusArgumentPrivate::checkWrite(d))
partially evaluated: QDBusArgumentPrivate::checkWrite(d)
TRUEFALSE
yes
Evaluation Count:34
no
Evaluation Count:0
0-34
564 d = d->marshaller()->endMap();
executed: d = d->marshaller()->endMap();
Execution Count:34
34
565}
executed: }
Execution Count:34
34
566void QDBusArgument::beginMapEntry() -
567{ -
568 if (QDBusArgumentPrivate::checkWrite(d))
partially evaluated: QDBusArgumentPrivate::checkWrite(d)
TRUEFALSE
yes
Evaluation Count:54
no
Evaluation Count:0
0-54
569 d = d->marshaller()->beginMapEntry();
executed: d = d->marshaller()->beginMapEntry();
Execution Count:54
54
570}
executed: }
Execution Count:54
54
571 -
572 -
573 -
574 -
575 -
576 -
577 -
578void QDBusArgument::endMapEntry() -
579{ -
580 if (QDBusArgumentPrivate::checkWrite(d))
partially evaluated: QDBusArgumentPrivate::checkWrite(d)
TRUEFALSE
yes
Evaluation Count:54
no
Evaluation Count:0
0-54
581 d = d->marshaller()->endMapEntry();
executed: d = d->marshaller()->endMapEntry();
Execution Count:54
54
582}
executed: }
Execution Count:54
54
583void QDBusArgument::beginStructure() const -
584{ -
585 if (QDBusArgumentPrivate::checkReadAndDetach(d))
partially evaluated: QDBusArgumentPrivate::checkReadAndDetach(d)
TRUEFALSE
yes
Evaluation Count:32
no
Evaluation Count:0
0-32
586 d = d->demarshaller()->beginStructure();
executed: d = d->demarshaller()->beginStructure();
Execution Count:32
32
587}
executed: }
Execution Count:32
32
588 -
589 -
590 -
591 -
592 -
593 -
594 -
595void QDBusArgument::endStructure() const -
596{ -
597 if (QDBusArgumentPrivate::checkReadAndDetach(d))
partially evaluated: QDBusArgumentPrivate::checkReadAndDetach(d)
TRUEFALSE
yes
Evaluation Count:32
no
Evaluation Count:0
0-32
598 d = d->demarshaller()->endStructure();
executed: d = d->demarshaller()->endStructure();
Execution Count:32
32
599}
executed: }
Execution Count:32
32
600void QDBusArgument::beginArray() const -
601{ -
602 if (QDBusArgumentPrivate::checkReadAndDetach(d))
partially evaluated: QDBusArgumentPrivate::checkReadAndDetach(d)
TRUEFALSE
yes
Evaluation Count:31
no
Evaluation Count:0
0-31
603 d = d->demarshaller()->beginArray();
executed: d = d->demarshaller()->beginArray();
Execution Count:31
31
604}
executed: }
Execution Count:31
31
605 -
606 -
607 -
608 -
609 -
610 -
611 -
612void QDBusArgument::endArray() const -
613{ -
614 if (QDBusArgumentPrivate::checkReadAndDetach(d))
partially evaluated: QDBusArgumentPrivate::checkReadAndDetach(d)
TRUEFALSE
yes
Evaluation Count:31
no
Evaluation Count:0
0-31
615 d = d->demarshaller()->endArray();
executed: d = d->demarshaller()->endArray();
Execution Count:31
31
616}
executed: }
Execution Count:31
31
617void QDBusArgument::beginMap() const -
618{ -
619 if (QDBusArgumentPrivate::checkReadAndDetach(d))
partially evaluated: QDBusArgumentPrivate::checkReadAndDetach(d)
TRUEFALSE
yes
Evaluation Count:20
no
Evaluation Count:0
0-20
620 d = d->demarshaller()->beginMap();
executed: d = d->demarshaller()->beginMap();
Execution Count:20
20
621}
executed: }
Execution Count:20
20
622 -
623 -
624 -
625 -
626 -
627 -
628 -
629void QDBusArgument::endMap() const -
630{ -
631 if (QDBusArgumentPrivate::checkReadAndDetach(d))
partially evaluated: QDBusArgumentPrivate::checkReadAndDetach(d)
TRUEFALSE
yes
Evaluation Count:20
no
Evaluation Count:0
0-20
632 d = d->demarshaller()->endMap();
executed: d = d->demarshaller()->endMap();
Execution Count:20
20
633}
executed: }
Execution Count:20
20
634void QDBusArgument::beginMapEntry() const -
635{ -
636 if (QDBusArgumentPrivate::checkReadAndDetach(d))
partially evaluated: QDBusArgumentPrivate::checkReadAndDetach(d)
TRUEFALSE
yes
Evaluation Count:64
no
Evaluation Count:0
0-64
637 d = d->demarshaller()->beginMapEntry();
executed: d = d->demarshaller()->beginMapEntry();
Execution Count:64
64
638}
executed: }
Execution Count:64
64
639 -
640 -
641 -
642 -
643 -
644 -
645 -
646void QDBusArgument::endMapEntry() const -
647{ -
648 if (QDBusArgumentPrivate::checkReadAndDetach(d))
partially evaluated: QDBusArgumentPrivate::checkReadAndDetach(d)
TRUEFALSE
yes
Evaluation Count:64
no
Evaluation Count:0
0-64
649 d = d->demarshaller()->endMapEntry();
executed: d = d->demarshaller()->endMapEntry();
Execution Count:64
64
650}
executed: }
Execution Count:64
64
651 -
652 -
653 -
654 -
655 -
656 -
657bool QDBusArgument::atEnd() const -
658{ -
659 if (QDBusArgumentPrivate::checkRead(d))
partially evaluated: QDBusArgumentPrivate::checkRead(d)
TRUEFALSE
yes
Evaluation Count:179
no
Evaluation Count:0
0-179
660 return d->demarshaller()->atEnd();
executed: return d->demarshaller()->atEnd();
Execution Count:179
179
661 -
662 return true;
never executed: return true;
0
663} -
664QVariant QDBusArgument::asVariant() const -
665{ -
666 if (QDBusArgumentPrivate::checkRead(d))
never evaluated: QDBusArgumentPrivate::checkRead(d)
0
667 return d->demarshaller()->toVariantInternal();
never executed: return d->demarshaller()->toVariantInternal();
0
668 -
669 return QVariant();
never executed: return QVariant();
0
670} -
671 -
672 -
673 -
674 -
675 -
676 -
677 -
678 -
679 -
680const QDBusArgument &operator>>(const QDBusArgument &a, QVariant &v) -
681{ -
682 QDBusVariant dbv; -
683 a >> dbv; -
684 v = dbv.variant(); -
685 return a;
executed: return a;
Execution Count:76
76
686} -
687 -
688 -
689 -
690const QDBusArgument &operator>>(const QDBusArgument &a, QDate &date) -
691{ -
692 int y, m, d; -
693 a.beginStructure(); -
694 a >> y >> m >> d; -
695 a.endStructure(); -
696 -
697 if (y != 0 && m != 0 && d != 0)
evaluated: y != 0
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:2
partially evaluated: m != 0
TRUEFALSE
yes
Evaluation Count:2
no
Evaluation Count:0
partially evaluated: d != 0
TRUEFALSE
yes
Evaluation Count:2
no
Evaluation Count:0
0-2
698 date.setDate(y, m, d);
executed: date.setDate(y, m, d);
Execution Count:2
2
699 else -
700 date = QDate();
executed: date = QDate();
Execution Count:2
2
701 return a;
executed: return a;
Execution Count:4
4
702} -
703 -
704QDBusArgument &operator<<(QDBusArgument &a, const QDate &date) -
705{ -
706 a.beginStructure(); -
707 if (date.isValid())
evaluated: date.isValid()
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:5
2-5
708 a << date.year() << date.month() << date.day();
executed: a << date.year() << date.month() << date.day();
Execution Count:2
2
709 else -
710 a << 0 << 0 << 0;
executed: a << 0 << 0 << 0;
Execution Count:5
5
711 a.endStructure(); -
712 return a;
executed: return a;
Execution Count:7
7
713} -
714 -
715const QDBusArgument &operator>>(const QDBusArgument &a, QTime &time) -
716{ -
717 int h, m, s, ms; -
718 a.beginStructure(); -
719 a >> h >> m >> s >> ms; -
720 a.endStructure(); -
721 -
722 if (h < 0)
evaluated: h < 0
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:2
2
723 time = QTime();
executed: time = QTime();
Execution Count:2
2
724 else -
725 time.setHMS(h, m, s, ms);
executed: time.setHMS(h, m, s, ms);
Execution Count:2
2
726 return a;
executed: return a;
Execution Count:4
4
727} -
728 -
729QDBusArgument &operator<<(QDBusArgument &a, const QTime &time) -
730{ -
731 a.beginStructure(); -
732 if (time.isValid())
evaluated: time.isValid()
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:5
2-5
733 a << time.hour() << time.minute() << time.second() << time.msec();
executed: a << time.hour() << time.minute() << time.second() << time.msec();
Execution Count:2
2
734 else -
735 a << -1 << -1 << -1 << -1;
executed: a << -1 << -1 << -1 << -1;
Execution Count:5
5
736 a.endStructure(); -
737 return a;
executed: return a;
Execution Count:7
7
738} -
739 -
740const QDBusArgument &operator>>(const QDBusArgument &a, QDateTime &dt) -
741{ -
742 QDate date; -
743 QTime time; -
744 int timespec; -
745 -
746 a.beginStructure(); -
747 a >> date >> time >> timespec; -
748 a.endStructure(); -
749 -
750 dt = QDateTime(date, time, Qt::TimeSpec(timespec)); -
751 return a;
executed: return a;
Execution Count:4
4
752} -
753 -
754QDBusArgument &operator<<(QDBusArgument &a, const QDateTime &dt) -
755{ -
756 a.beginStructure(); -
757 a << dt.date() << dt.time() << int(dt.timeSpec()); -
758 a.endStructure(); -
759 return a;
executed: return a;
Execution Count:6
6
760} -
761 -
762const QDBusArgument &operator>>(const QDBusArgument &a, QRect &rect) -
763{ -
764 int x, y, width, height; -
765 a.beginStructure(); -
766 a >> x >> y >> width >> height; -
767 a.endStructure(); -
768 -
769 rect.setRect(x, y, width, height); -
770 return a;
never executed: return a;
0
771} -
772 -
773QDBusArgument &operator<<(QDBusArgument &a, const QRect &rect) -
774{ -
775 a.beginStructure(); -
776 a << rect.x() << rect.y() << rect.width() << rect.height(); -
777 a.endStructure(); -
778 -
779 return a;
executed: return a;
Execution Count:1
1
780} -
781 -
782const QDBusArgument &operator>>(const QDBusArgument &a, QRectF &rect) -
783{ -
784 double x, y, width, height; -
785 a.beginStructure(); -
786 a >> x >> y >> width >> height; -
787 a.endStructure(); -
788 -
789 rect.setRect(qreal(x), qreal(y), qreal(width), qreal(height)); -
790 return a;
never executed: return a;
0
791} -
792 -
793QDBusArgument &operator<<(QDBusArgument &a, const QRectF &rect) -
794{ -
795 a.beginStructure(); -
796 a << double(rect.x()) << double(rect.y()) << double(rect.width()) << double(rect.height()); -
797 a.endStructure(); -
798 -
799 return a;
executed: return a;
Execution Count:1
1
800} -
801 -
802const QDBusArgument &operator>>(const QDBusArgument &a, QSize &size) -
803{ -
804 a.beginStructure(); -
805 a >> size.rwidth() >> size.rheight(); -
806 a.endStructure(); -
807 -
808 return a;
never executed: return a;
0
809} -
810 -
811QDBusArgument &operator<<(QDBusArgument &a, const QSize &size) -
812{ -
813 a.beginStructure(); -
814 a << size.width() << size.height(); -
815 a.endStructure(); -
816 -
817 return a;
executed: return a;
Execution Count:1
1
818} -
819 -
820const QDBusArgument &operator>>(const QDBusArgument &a, QSizeF &size) -
821{ -
822 double width, height; -
823 a.beginStructure(); -
824 a >> width >> height; -
825 a.endStructure(); -
826 -
827 size.setWidth(qreal(width)); -
828 size.setHeight(qreal(height)); -
829 return a;
never executed: return a;
0
830} -
831 -
832QDBusArgument &operator<<(QDBusArgument &a, const QSizeF &size) -
833{ -
834 a.beginStructure(); -
835 a << double(size.width()) << double(size.height()); -
836 a.endStructure(); -
837 -
838 return a;
executed: return a;
Execution Count:1
1
839} -
840 -
841const QDBusArgument &operator>>(const QDBusArgument &a, QPoint &pt) -
842{ -
843 a.beginStructure(); -
844 a >> pt.rx() >> pt.ry(); -
845 a.endStructure(); -
846 -
847 return a;
never executed: return a;
0
848} -
849 -
850QDBusArgument &operator<<(QDBusArgument &a, const QPoint &pt) -
851{ -
852 a.beginStructure(); -
853 a << pt.x() << pt.y(); -
854 a.endStructure(); -
855 -
856 return a;
executed: return a;
Execution Count:3
3
857} -
858 -
859const QDBusArgument &operator>>(const QDBusArgument &a, QPointF &pt) -
860{ -
861 double x, y; -
862 a.beginStructure(); -
863 a >> x >> y; -
864 a.endStructure(); -
865 -
866 pt.setX(qreal(x)); -
867 pt.setY(qreal(y)); -
868 return a;
never executed: return a;
0
869} -
870 -
871QDBusArgument &operator<<(QDBusArgument &a, const QPointF &pt) -
872{ -
873 a.beginStructure(); -
874 a << double(pt.x()) << double(pt.y()); -
875 a.endStructure(); -
876 -
877 return a;
executed: return a;
Execution Count:3
3
878} -
879 -
880const QDBusArgument &operator>>(const QDBusArgument &a, QLine &line) -
881{ -
882 QPoint p1, p2; -
883 a.beginStructure(); -
884 a >> p1 >> p2; -
885 a.endStructure(); -
886 -
887 line = QLine(p1, p2); -
888 return a;
never executed: return a;
0
889} -
890 -
891QDBusArgument &operator<<(QDBusArgument &a, const QLine &line) -
892{ -
893 a.beginStructure(); -
894 a << line.p1() << line.p2(); -
895 a.endStructure(); -
896 -
897 return a;
executed: return a;
Execution Count:1
1
898} -
899 -
900const QDBusArgument &operator>>(const QDBusArgument &a, QLineF &line) -
901{ -
902 QPointF p1, p2; -
903 a.beginStructure(); -
904 a >> p1 >> p2; -
905 a.endStructure(); -
906 -
907 line = QLineF(p1, p2); -
908 return a;
never executed: return a;
0
909} -
910 -
911QDBusArgument &operator<<(QDBusArgument &a, const QLineF &line) -
912{ -
913 a.beginStructure(); -
914 a << line.p1() << line.p2(); -
915 a.endStructure(); -
916 -
917 return a;
executed: return a;
Execution Count:1
1
918} -
919 -
920 -
921 -
922 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial