qdbusreply.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4 -
5void qDBusReplyFill(const QDBusMessage &reply, QDBusError &error, QVariant &data) -
6{ -
7 error = QDBusError(reply); -
8 -
9 if (error.isValid()) {
evaluated: error.isValid()
TRUEFALSE
yes
Evaluation Count:17
yes
Evaluation Count:845
17-845
10 data = QVariant(); -
11 return;
executed: return;
Execution Count:17
17
12 } -
13 -
14 if (reply.arguments().count() >= 1 && reply.arguments().at(0).userType() == data.userType()) {
partially evaluated: reply.arguments().count() >= 1
TRUEFALSE
yes
Evaluation Count:845
no
Evaluation Count:0
evaluated: reply.arguments().at(0).userType() == data.userType()
TRUEFALSE
yes
Evaluation Count:819
yes
Evaluation Count:26
0-845
15 data = reply.arguments().at(0); -
16 return;
executed: return;
Execution Count:819
819
17 } -
18 -
19 const char *expectedSignature = QDBusMetaType::typeToSignature(data.userType()); -
20 const char *receivedType = 0; -
21 QByteArray receivedSignature; -
22 -
23 if (reply.arguments().count() >= 1) {
partially evaluated: reply.arguments().count() >= 1
TRUEFALSE
yes
Evaluation Count:26
no
Evaluation Count:0
0-26
24 if (reply.arguments().at(0).userType() == QDBusMetaTypeId::argument()) {
evaluated: reply.arguments().at(0).userType() == QDBusMetaTypeId::argument()
TRUEFALSE
yes
Evaluation Count:20
yes
Evaluation Count:6
6-20
25 -
26 QDBusArgument arg = qvariant_cast<QDBusArgument>(reply.arguments().at(0)); -
27 receivedSignature = arg.currentSignature().toLatin1(); -
28 if (receivedSignature == expectedSignature) {
evaluated: receivedSignature == expectedSignature
TRUEFALSE
yes
Evaluation Count:17
yes
Evaluation Count:3
3-17
29 -
30 QDBusMetaType::demarshall(arg, data.userType(), data.data()); -
31 return;
executed: return;
Execution Count:17
17
32 } -
33 } else {
executed: }
Execution Count:3
3
34 -
35 int type = reply.arguments().at(0).userType(); -
36 receivedType = QMetaType::typeName(type); -
37 receivedSignature = QDBusMetaType::typeToSignature(type); -
38 }
executed: }
Execution Count:6
6
39 } -
40 -
41 -
42 if (receivedSignature.isEmpty())
partially evaluated: receivedSignature.isEmpty()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:9
0-9
43 receivedSignature = "no signature";
never executed: receivedSignature = "no signature";
0
44 QString errorMsg; -
45 if (receivedType) {
evaluated: receivedType
TRUEFALSE
yes
Evaluation Count:6
yes
Evaluation Count:3
3-6
46 errorMsg = QString::fromLatin1("Unexpected reply signature: got \"%1\" (%4), " -
47 "expected \"%2\" (%3)") -
48 .arg(QLatin1String(receivedSignature), -
49 QLatin1String(expectedSignature), -
50 QLatin1String(data.typeName()), -
51 QLatin1String(receivedType)); -
52 } else {
executed: }
Execution Count:6
6
53 errorMsg = QString::fromLatin1("Unexpected reply signature: got \"%1\", " -
54 "expected \"%2\" (%3)") -
55 .arg(QLatin1String(receivedSignature), -
56 QLatin1String(expectedSignature), -
57 QLatin1String(data.typeName())); -
58 }
executed: }
Execution Count:3
3
59 -
60 error = QDBusError(QDBusError::InvalidSignature, errorMsg); -
61 data = QVariant(); -
62}
executed: }
Execution Count:9
9
63 -
64 -
65 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial