qtcpserver.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/network/socket/qtcpserver.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6QTcpServerPrivate::QTcpServerPrivate()-
7 : port(0)-
8 , state(QAbstractSocket::UnconnectedState)-
9 , socketEngine(0)-
10 , serverSocketError(QAbstractSocket::UnknownSocketError)-
11 , maxConnections(30)-
12{-
13}
executed 1416 times by 18 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
1416
14-
15-
16-
17QTcpServerPrivate::~QTcpServerPrivate()-
18{-
19}-
20-
21-
22-
23-
24-
25-
26QNetworkProxy QTcpServerPrivate::resolveProxy(const QHostAddress &address, quint16 port)-
27{-
28 if (address.isLoopback()
address.isLoopback()Description
TRUEevaluated 71 times by 11 tests
Evaluated by:
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 686 times by 11 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
)
71-686
29 return
executed 71 times by 11 tests: return QNetworkProxy::NoProxy;
Executed by:
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
QNetworkProxy::NoProxy;
executed 71 times by 11 tests: return QNetworkProxy::NoProxy;
Executed by:
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
71
30-
31 QList<QNetworkProxy> proxies;-
32 if (proxy.type() != QNetworkProxy::DefaultProxy
proxy.type() !...::DefaultProxyDescription
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qtcpsocket - unknown status
FALSEevaluated 676 times by 11 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
) {
10-676
33-
34 proxies << proxy;-
35 }
executed 10 times by 2 tests: end of block
Executed by:
  • tst_QTcpServer
  • tst_qtcpsocket - unknown status
else {
10
36-
37 QNetworkProxyQuery query(port, QString(), QNetworkProxyQuery::TcpServer);-
38 proxies = QNetworkProxyFactory::proxyForQuery(query);-
39 }
executed 676 times by 11 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
676
40-
41-
42 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(proxies)>::type> _container_((proxies)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (const QNetworkProxy &p = *_container_.i; _container_.control; _container_.control = 0) {-
43 if (p.capabilities() & QNetworkProxy::ListeningCapability
p.capabilities...ningCapabilityDescription
TRUEevaluated 680 times by 11 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_QTcpServer
)
10-680
44 return
executed 680 times by 11 tests: return p;
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
p;
executed 680 times by 11 tests: return p;
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
680
45 }
executed 10 times by 1 test: end of block
Executed by:
  • tst_QTcpServer
10
46-
47-
48-
49 return
executed 6 times by 1 test: return QNetworkProxy(QNetworkProxy::DefaultProxy);
Executed by:
  • tst_QTcpServer
QNetworkProxy(QNetworkProxy::DefaultProxy);
executed 6 times by 1 test: return QNetworkProxy(QNetworkProxy::DefaultProxy);
Executed by:
  • tst_QTcpServer
6
50}-
51-
52-
53-
54-
55void QTcpServerPrivate::configureCreatedSocket()-
56{-
57 socketEngine->setOption(QAbstractSocketEngine::AddressReusable, 1);-
58-
59}
executed 751 times by 18 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
751
60-
61-
62-
63void QTcpServerPrivate::readNotification()-
64{-
65 QTcpServer * const q = q_func();-
66 for (;;) {-
67 if (pendingConnections.count() >= maxConnections
pendingConnect...maxConnectionsDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTcpServer
FALSEevaluated 1613 times by 16 tests
Evaluated by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
) {
1-1613
68-
69-
70-
71 if (socketEngine->isReadNotificationEnabled()
socketEngine->...ationEnabled()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTcpServer
FALSEnever evaluated
)
0-1
72 socketEngine->setReadNotificationEnabled(false);
executed 1 time by 1 test: socketEngine->setReadNotificationEnabled(false);
Executed by:
  • tst_QTcpServer
1
73 return;
executed 1 time by 1 test: return;
Executed by:
  • tst_QTcpServer
1
74 }-
75-
76 int descriptor = socketEngine->accept();-
77 if (descriptor == -1
descriptor == -1Description
TRUEevaluated 790 times by 15 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 823 times by 16 tests
Evaluated by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
) {
790-823
78 if (socketEngine->error() != QAbstractSocket::TemporaryError
socketEngine->...TemporaryErrorDescription
TRUEnever evaluated
FALSEevaluated 790 times by 15 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
) {
0-790
79 q->pauseAccepting();-
80 serverSocketError = socketEngine->error();-
81 serverSocketErrorString = socketEngine->errorString();-
82 q->acceptError(serverSocketError);-
83 }
never executed: end of block
0
84 break;
executed 790 times by 15 tests: break;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
790
85 }-
86-
87-
88-
89 q->incomingConnection(descriptor);-
90-
91 QPointer<QTcpServer> that = q;-
92 q->newConnection();-
93 if (!that
!thatDescription
TRUEnever evaluated
FALSEevaluated 823 times by 16 tests
Evaluated by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
|| !q->isListening()
!q->isListening()Description
TRUEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
FALSEevaluated 814 times by 15 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
)
0-823
94 return;
executed 9 times by 2 tests: return;
Executed by:
  • tst_QFtp
  • tst_QTcpServer
9
95 }
executed 814 times by 15 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
814
96}
executed 790 times by 15 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
790
97QTcpServer::QTcpServer(QObject *parent)-
98 : QObject(*new QTcpServerPrivate, parent)-
99{-
100-
101-
102-
103}
executed 1416 times by 18 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
1416
104QTcpServer::~QTcpServer()-
105{-
106-
107-
108-
109 close();-
110}
executed 1413 times by 18 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
1413
111-
112-
113-
114QTcpServer::QTcpServer(QTcpServerPrivate &dd, QObject *parent)-
115 : QObject(dd, parent)-
116{-
117-
118-
119-
120}
never executed: end of block
0
121bool QTcpServer::listen(const QHostAddress &address, quint16 port)-
122{-
123 QTcpServerPrivate * const d = d_func();-
124 if (d->state == QAbstractSocket::ListeningState
d->state == QA...ListeningStateDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QTcpServer
FALSEevaluated 757 times by 18 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
) {
2-757
125 QMessageLogger(__FILE__, 271, __PRETTY_FUNCTION__).warning("QTcpServer::listen() called when already listening");-
126 return
executed 2 times by 1 test: return false;
Executed by:
  • tst_QTcpServer
false;
executed 2 times by 1 test: return false;
Executed by:
  • tst_QTcpServer
2
127 }-
128-
129 QAbstractSocket::NetworkLayerProtocol proto = address.protocol();-
130 QHostAddress addr = address;-
131-
132-
133-
134-
135 QNetworkProxy proxy = d->resolveProxy(addr, port);-
136-
137-
138 delete d->socketEngine;-
139 d->socketEngine = QAbstractSocketEngine::createSocketEngine(QAbstractSocket::TcpSocket, proxy, this);-
140 if (!d->socketEngine
!d->socketEngineDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QTcpServer
FALSEevaluated 751 times by 18 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
) {
6-751
141 d->serverSocketError = QAbstractSocket::UnsupportedSocketOperationError;-
142 d->serverSocketErrorString = tr("Operation on socket is not supported");-
143 return
executed 6 times by 1 test: return false;
Executed by:
  • tst_QTcpServer
false;
executed 6 times by 1 test: return false;
Executed by:
  • tst_QTcpServer
6
144 }-
145-
146-
147 d->socketEngine->setProperty("_q_networksession", property("_q_networksession"));-
148-
149 if (!d->socketEngine->initialize(QAbstractSocket::TcpSocket, proto)
!d->socketEngi...Socket, proto)Description
TRUEnever evaluated
FALSEevaluated 751 times by 18 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
) {
0-751
150 d->serverSocketError = d->socketEngine->error();-
151 d->serverSocketErrorString = d->socketEngine->errorString();-
152 return
never executed: return false;
false;
never executed: return false;
0
153 }-
154 proto = d->socketEngine->protocol();-
155 if (addr.protocol() == QAbstractSocket::AnyIPProtocol
addr.protocol(...:AnyIPProtocolDescription
TRUEevaluated 500 times by 10 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 251 times by 12 tests
Evaluated by:
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
&& proto == QAbstractSocket::IPv4Protocol
proto == QAbst...::IPv4ProtocolDescription
TRUEnever evaluated
FALSEevaluated 500 times by 10 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
)
0-500
156 addr = QHostAddress::AnyIPv4;
never executed: addr = QHostAddress::AnyIPv4;
0
157-
158 d->configureCreatedSocket();-
159-
160 if (!d->socketEngine->bind(addr, port)
!d->socketEngi...nd(addr, port)Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_QTcpServer
FALSEevaluated 739 times by 18 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
) {
12-739
161 d->serverSocketError = d->socketEngine->error();-
162 d->serverSocketErrorString = d->socketEngine->errorString();-
163 return
executed 12 times by 1 test: return false;
Executed by:
  • tst_QTcpServer
false;
executed 12 times by 1 test: return false;
Executed by:
  • tst_QTcpServer
12
164 }-
165-
166 if (!d->socketEngine->listen()
!d->socketEngine->listen()Description
TRUEnever evaluated
FALSEevaluated 739 times by 18 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
) {
0-739
167 d->serverSocketError = d->socketEngine->error();-
168 d->serverSocketErrorString = d->socketEngine->errorString();-
169 return
never executed: return false;
false;
never executed: return false;
0
170 }-
171-
172 d->socketEngine->setReceiver(d);-
173 d->socketEngine->setReadNotificationEnabled(true);-
174-
175 d->state = QAbstractSocket::ListeningState;-
176 d->address = d->socketEngine->localAddress();-
177 d->port = d->socketEngine->localPort();-
178-
179-
180-
181-
182-
183 return
executed 739 times by 18 tests: return true;
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
true;
executed 739 times by 18 tests: return true;
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
739
184}-
185-
186-
187-
188-
189-
190-
191-
192bool QTcpServer::isListening() const-
193{-
194 const QTcpServerPrivate * const d = d_func();-
195 do { if (!d->socketEngine
!d->socketEngineDescription
TRUEevaluated 65 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
FALSEevaluated 819 times by 15 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
) { return
executed 65 times by 3 tests: return false;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
false;
executed 65 times by 3 tests: return false;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
} } while (0);
65-819
196 return
executed 819 times by 15 tests: return d->socketEngine->state() == QAbstractSocket::ListeningState;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
d->socketEngine->state() == QAbstractSocket::ListeningState;
executed 819 times by 15 tests: return d->socketEngine->state() == QAbstractSocket::ListeningState;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
819
197}-
198-
199-
200-
201-
202-
203-
204-
205void QTcpServer::close()-
206{-
207 QTcpServerPrivate * const d = d_func();-
208-
209 qDeleteAll(d->pendingConnections);-
210 d->pendingConnections.clear();-
211-
212 if (d->socketEngine
d->socketEngineDescription
TRUEevaluated 752 times by 18 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 681 times by 5 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qsocketnotifier - unknown status
  • tst_qxmlsimplereader - unknown status
) {
681-752
213 d->socketEngine->close();-
214 if (true) {-
215 d->socketEngine->deleteLater();-
216 }
executed 752 times by 18 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
else {
dead code: { }
-
217-
218-
219 }
dead code: { }
-
220 d->socketEngine = 0;-
221 }
executed 752 times by 18 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
752
222-
223 d->state = QAbstractSocket::UnconnectedState;-
224}
executed 1433 times by 18 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
1433
225qintptr QTcpServer::socketDescriptor() const-
226{-
227 const QTcpServerPrivate * const d = d_func();-
228 do { if (!d->socketEngine
!d->socketEngineDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QTcpServer
FALSEnever evaluated
) { return
executed 2 times by 1 test: return -1;
Executed by:
  • tst_QTcpServer
-1;
executed 2 times by 1 test: return -1;
Executed by:
  • tst_QTcpServer
} } while (0);
0-2
229 return
never executed: return d->socketEngine->socketDescriptor();
d->socketEngine->socketDescriptor();
never executed: return d->socketEngine->socketDescriptor();
0
230}-
231bool QTcpServer::setSocketDescriptor(qintptr socketDescriptor)-
232{-
233 QTcpServerPrivate * const d = d_func();-
234 if (isListening()
isListening()Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QTcpServer
) {
0-4
235 QMessageLogger(__FILE__, 401, __PRETTY_FUNCTION__).warning("QTcpServer::setSocketDescriptor() called when already listening");-
236 return
never executed: return false;
false;
never executed: return false;
0
237 }-
238-
239 if (d->socketEngine
d->socketEngineDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QTcpServer
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QTcpServer
)
2
240 delete d->socketEngine;
executed 2 times by 1 test: delete d->socketEngine;
Executed by:
  • tst_QTcpServer
2
241 d->socketEngine = QAbstractSocketEngine::createSocketEngine(socketDescriptor, this);-
242 if (!d->socketEngine
!d->socketEngineDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QTcpServer
) {
0-4
243 d->serverSocketError = QAbstractSocket::UnsupportedSocketOperationError;-
244 d->serverSocketErrorString = tr("Operation on socket is not supported");-
245 return
never executed: return false;
false;
never executed: return false;
0
246 }-
247-
248-
249 d->socketEngine->setProperty("_q_networksession", property("_q_networksession"));-
250-
251 if (!d->socketEngine->initialize(socketDescriptor, QAbstractSocket::ListeningState)
!d->socketEngi...isteningState)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QTcpServer
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QTcpServer
) {
2
252 d->serverSocketError = d->socketEngine->error();-
253 d->serverSocketErrorString = d->socketEngine->errorString();-
254-
255-
256-
257-
258 return
executed 2 times by 1 test: return false;
Executed by:
  • tst_QTcpServer
false;
executed 2 times by 1 test: return false;
Executed by:
  • tst_QTcpServer
2
259 }-
260-
261 d->socketEngine->setReceiver(d);-
262 d->socketEngine->setReadNotificationEnabled(true);-
263-
264 d->state = d->socketEngine->state();-
265 d->address = d->socketEngine->localAddress();-
266 d->port = d->socketEngine->localPort();-
267-
268-
269-
270-
271 return
executed 2 times by 1 test: return true;
Executed by:
  • tst_QTcpServer
true;
executed 2 times by 1 test: return true;
Executed by:
  • tst_QTcpServer
2
272}-
273-
274-
275-
276-
277-
278-
279-
280quint16 QTcpServer::serverPort() const-
281{-
282 const QTcpServerPrivate * const d = d_func();-
283 do { if (!d->socketEngine
!d->socketEngineDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QTcpServer
FALSEevaluated 756 times by 15 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
) { return
executed 2 times by 1 test: return 0;
Executed by:
  • tst_QTcpServer
0;
executed 2 times by 1 test: return 0;
Executed by:
  • tst_QTcpServer
} } while (0);
2-756
284 return
executed 756 times by 15 tests: return d->socketEngine->localPort();
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
d->socketEngine->localPort();
executed 756 times by 15 tests: return d->socketEngine->localPort();
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
756
285}-
286-
287-
288-
289-
290-
291-
292-
293QHostAddress QTcpServer::serverAddress() const-
294{-
295 const QTcpServerPrivate * const d = d_func();-
296 do { if (!d->socketEngine
!d->socketEngineDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QTcpServer
FALSEevaluated 52 times by 8 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QTcpServer
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qtcpsocket - unknown status
) { return
executed 2 times by 1 test: return QHostAddress(QHostAddress::Null);
Executed by:
  • tst_QTcpServer
QHostAddress(QHostAddress::Null);
executed 2 times by 1 test: return QHostAddress(QHostAddress::Null);
Executed by:
  • tst_QTcpServer
} } while (0);
2-52
297 return
executed 52 times by 8 tests: return d->socketEngine->localAddress();
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QTcpServer
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qtcpsocket - unknown status
d->socketEngine->localAddress();
executed 52 times by 8 tests: return d->socketEngine->localAddress();
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QTcpServer
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qtcpsocket - unknown status
52
298}-
299bool QTcpServer::waitForNewConnection(int msec, bool *timedOut)-
300{-
301 QTcpServerPrivate * const d = d_func();-
302 if (d->state != QAbstractSocket::ListeningState
d->state != QA...ListeningStateDescription
TRUEnever evaluated
FALSEevaluated 395 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
)
0-395
303 return
never executed: return false;
false;
never executed: return false;
0
304-
305 if (!d->socketEngine->waitForRead(msec, timedOut)
!d->socketEngi...sec, timedOut)Description
TRUEevaluated 24 times by 2 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 371 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
) {
24-371
306 d->serverSocketError = d->socketEngine->error();-
307 d->serverSocketErrorString = d->socketEngine->errorString();-
308 return
executed 24 times by 2 tests: return false;
Executed by:
  • tst_QTcpServer
  • tst_qxmlsimplereader - unknown status
false;
executed 24 times by 2 tests: return false;
Executed by:
  • tst_QTcpServer
  • tst_qxmlsimplereader - unknown status
24
309 }-
310-
311 if (timedOut
timedOutDescription
TRUEevaluated 13 times by 2 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qtcpsocket - unknown status
FALSEevaluated 358 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
&& *
*timedOutDescription
TRUEnever evaluated
FALSEevaluated 13 times by 2 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qtcpsocket - unknown status
timedOut
*timedOutDescription
TRUEnever evaluated
FALSEevaluated 13 times by 2 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qtcpsocket - unknown status
)
0-358
312 return
never executed: return false;
false;
never executed: return false;
0
313-
314 d->readNotification();-
315-
316 return
executed 371 times by 7 tests: return true;
Executed by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
true;
executed 371 times by 7 tests: return true;
Executed by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
371
317}-
318-
319-
320-
321-
322-
323-
324-
325bool QTcpServer::hasPendingConnections() const-
326{-
327 return
executed 48 times by 3 tests: return !d_func()->pendingConnections.isEmpty();
Executed by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qtcpsocket - unknown status
!d_func()->pendingConnections.isEmpty();
executed 48 times by 3 tests: return !d_func()->pendingConnections.isEmpty();
Executed by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qtcpsocket - unknown status
48
328}-
329QTcpSocket *QTcpServer::nextPendingConnection()-
330{-
331 QTcpServerPrivate * const d = d_func();-
332 if (d->pendingConnections.isEmpty()
d->pendingConn...ions.isEmpty()Description
TRUEevaluated 34 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 539 times by 15 tests
Evaluated by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
)
34-539
333 return
executed 34 times by 3 tests: return 0;
Executed by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qxmlsimplereader - unknown status
0;
executed 34 times by 3 tests: return 0;
Executed by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qxmlsimplereader - unknown status
34
334-
335 if (!d->socketEngine->isReadNotificationEnabled()
!d->socketEngi...ationEnabled()Description
TRUEevaluated 13 times by 2 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qtcpsocket - unknown status
FALSEevaluated 526 times by 15 tests
Evaluated by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
)
13-526
336 d->socketEngine->setReadNotificationEnabled(true);
executed 13 times by 2 tests: d->socketEngine->setReadNotificationEnabled(true);
Executed by:
  • tst_QTcpServer
  • tst_qtcpsocket - unknown status
13
337-
338 return
executed 539 times by 15 tests: return d->pendingConnections.takeFirst();
Executed by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
d->pendingConnections.takeFirst();
executed 539 times by 15 tests: return d->pendingConnections.takeFirst();
Executed by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
539
339}-
340void QTcpServer::incomingConnection(qintptr socketDescriptor)-
341{-
342-
343-
344-
345-
346 QTcpSocket *socket = new QTcpSocket(this);-
347 socket->setSocketDescriptor(socketDescriptor);-
348 addPendingConnection(socket);-
349}
executed 545 times by 15 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
545
350void QTcpServer::addPendingConnection(QTcpSocket* socket)-
351{-
352 d_func()->pendingConnections.append(socket);-
353}
executed 545 times by 15 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
545
354void QTcpServer::setMaxPendingConnections(int numConnections)-
355{-
356 d_func()->maxConnections = numConnections;-
357}
executed 7 times by 1 test: end of block
Executed by:
  • tst_QTcpServer
7
358-
359-
360-
361-
362-
363-
364-
365int QTcpServer::maxPendingConnections() const-
366{-
367 return
executed 8 times by 1 test: return d_func()->maxConnections;
Executed by:
  • tst_QTcpServer
d_func()->maxConnections;
executed 8 times by 1 test: return d_func()->maxConnections;
Executed by:
  • tst_QTcpServer
8
368}-
369-
370-
371-
372-
373-
374-
375QAbstractSocket::SocketError QTcpServer::serverError() const-
376{-
377 return
executed 17 times by 1 test: return d_func()->serverSocketError;
Executed by:
  • tst_QTcpServer
d_func()->serverSocketError;
executed 17 times by 1 test: return d_func()->serverSocketError;
Executed by:
  • tst_QTcpServer
17
378}-
379-
380-
381-
382-
383-
384-
385-
386QString QTcpServer::errorString() const-
387{-
388 return
executed 21 times by 1 test: return d_func()->serverSocketErrorString;
Executed by:
  • tst_QTcpServer
d_func()->serverSocketErrorString;
executed 21 times by 1 test: return d_func()->serverSocketErrorString;
Executed by:
  • tst_QTcpServer
21
389}-
390void QTcpServer::pauseAccepting()-
391{-
392 d_func()->socketEngine->setReadNotificationEnabled(false);-
393}
never executed: end of block
0
394void QTcpServer::resumeAccepting()-
395{-
396 d_func()->socketEngine->setReadNotificationEnabled(true);-
397}
never executed: end of block
0
398void QTcpServer::setProxy(const QNetworkProxy &networkProxy)-
399{-
400 QTcpServerPrivate * const d = d_func();-
401 d->proxy = networkProxy;-
402}
executed 10 times by 2 tests: end of block
Executed by:
  • tst_QTcpServer
  • tst_qtcpsocket - unknown status
10
403QNetworkProxy QTcpServer::proxy() const-
404{-
405 const QTcpServerPrivate * const d = d_func();-
406 return
executed 668 times by 11 tests: return d->proxy;
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
d->proxy;
executed 668 times by 11 tests: return d->proxy;
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
668
407}-
408-
409-
410-
411-
Switch to Source codePreprocessed file

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