qdbusserver.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/dbus/qdbusserver.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5QDBusServer::QDBusServer(const QString &address, QObject *parent)-
6 : QObject(parent), d(0)-
7{-
8 if (address.isEmpty()
address.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
9 return;
never executed: return;
0
10-
11 if (!qdbus_loadLibDBus()
!qdbus_loadLibDBus()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
12 return;
never executed: return;
0
13-
14 QDBusConnectionManager::instance()->serverRequested(address, this);-
15 QObject::connect(d, qFlagLocation("2""newServerConnection(QDBusConnectionPrivate*)" "\0" __FILE__ ":" "72"),-
16 this, qFlagLocation("1""_q_newConnection(QDBusConnectionPrivate*)" "\0" __FILE__ ":" "73"), Qt::QueuedConnection);-
17}
never executed: end of block
0
18-
19-
20-
21-
22-
23-
24QDBusServer::QDBusServer(QObject *parent)-
25 : QObject(parent)-
26{-
27-
28-
29 const QString address = ([]() -> QString { enum { Size = sizeof(u"" "unix:tmpdir=/tmp")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "unix:tmpdir=/tmp" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 20 times by 6 tests: return qstring_literal_temp;
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
qstring_literal_temp;
executed 20 times by 6 tests: return qstring_literal_temp;
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
}());
20
30-
31-
32-
33-
34 if (!qdbus_loadLibDBus()
!qdbus_loadLibDBus()Description
TRUEnever evaluated
FALSEevaluated 20 times by 6 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
) {
0-20
35 d = 0;-
36 return;
never executed: return;
0
37 }-
38-
39 QDBusConnectionManager::instance()->serverRequested(address, this);-
40 QObject::connect(d, qFlagLocation("2""newServerConnection(QDBusConnectionPrivate*)" "\0" __FILE__ ":" "97"),-
41 this, qFlagLocation("1""_q_newConnection(QDBusConnectionPrivate*)" "\0" __FILE__ ":" "98"), Qt::QueuedConnection);-
42}
executed 20 times by 6 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
20
43-
44-
45-
46-
47QDBusServer::~QDBusServer()-
48{-
49 QWriteLocker locker(&d->lock);-
50 if (QDBusConnectionManager::instance()
QDBusConnectio...er::instance()Description
TRUEevaluated 20 times by 6 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
FALSEnever evaluated
) {
0-20
51 QMutexLocker locker(&QDBusConnectionManager::instance()->mutex);-
52 for (const QString &name : qAsConst(d->serverConnectionNames))-
53 QDBusConnectionManager::instance()->removeConnection(name);
executed 158 times by 6 tests: QDBusConnectionManager::instance()->removeConnection(name);
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
158
54 d->serverConnectionNames.clear();-
55 }
executed 20 times by 6 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
20
56 d->serverObject = nullptr;-
57 d->ref.store(0);-
58 d->deleteLater();-
59}
executed 20 times by 6 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
20
60-
61-
62-
63-
64-
65-
66bool QDBusServer::isConnected() const-
67{-
68 return
executed 37 times by 5 tests: return d && d->server && q_dbus_server_get_is_connected(d->server);
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
d && d->server && q_dbus_server_get_is_connected(d->server);
executed 37 times by 5 tests: return d && d->server && q_dbus_server_get_is_connected(d->server);
Executed by:
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbusinterface - unknown status
37
69}-
70-
71-
72-
73-
74-
75-
76QDBusError QDBusServer::lastError() const-
77{-
78 return
never executed: return d ? d->lastError : QDBusError(QDBusError::Disconnected, QDBusUtil::disconnectedErrorMessage());
d ? d->lastError : QDBusError(QDBusError::Disconnected, QDBusUtil::disconnectedErrorMessage());
never executed: return d ? d->lastError : QDBusError(QDBusError::Disconnected, QDBusUtil::disconnectedErrorMessage());
0
79}-
80-
81-
82-
83-
84QString QDBusServer::address() const-
85{-
86 QString addr;-
87 if (d
dDescription
TRUEevaluated 40 times by 6 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
FALSEnever evaluated
&& d->server
d->serverDescription
TRUEevaluated 40 times by 6 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
FALSEnever evaluated
) {
0-40
88 char *c = q_dbus_server_get_address(d->server);-
89 addr = QString::fromUtf8(c);-
90 q_dbus_free(c);-
91 }
executed 40 times by 6 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
40
92-
93 return
executed 40 times by 6 tests: return addr;
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
addr;
executed 40 times by 6 tests: return addr;
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
40
94}-
95void QDBusServer::setAnonymousAuthenticationAllowed(bool value)-
96{-
97 d->anonymousAuthenticationAllowed = value;-
98}
never executed: end of block
0
99bool QDBusServer::isAnonymousAuthenticationAllowed() const-
100{-
101 return
never executed: return d->anonymousAuthenticationAllowed;
d->anonymousAuthenticationAllowed;
never executed: return d->anonymousAuthenticationAllowed;
0
102}-
103-
104-
Switch to Source codePreprocessed file

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