OpenCoverage

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 1422 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
1422
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 75 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 688 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
)
75-688
29 return
executed 75 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 75 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
75
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 678 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-678
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 678 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
678
40-
41-
42 for (const QNetworkProxy &p : qAsConst(proxies)) {-
43 if (p.capabilities() & QNetworkProxy::ListeningCapability
p.capabilities...ningCapabilityDescription
TRUEevaluated 682 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-682
44 return
executed 682 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 682 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
682
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 757 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
757
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 1625 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-1625
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 796 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 829 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
) {
796-829
78 if (socketEngine->error() != QAbstractSocket::TemporaryError
socketEngine->...TemporaryErrorDescription
TRUEnever evaluated
FALSEevaluated 796 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-796
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 796 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
796
85 }-
86-
87-
88-
89 q->incomingConnection(descriptor);-
90-
91 QPointer<QTcpServer> that = q;-
92 q->newConnection();-
93 if (!that
!thatDescription
TRUEnever evaluated
FALSEevaluated 829 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 820 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-829
94 return;
executed 9 times by 2 tests: return;
Executed by:
  • tst_QFtp
  • tst_QTcpServer
9
95 }
executed 820 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
820
96}
executed 796 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
796
97QTcpServer::QTcpServer(QObject *parent)-
98 : QObject(*new QTcpServerPrivate, parent)-
99{-
100-
101-
102-
103}
executed 1422 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
1422
104QTcpServer::~QTcpServer()-
105{-
106-
107-
108-
109 close();-
110}
executed 1419 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
1419
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 763 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-763
125 QMessageLogger(__FILE__, 277, __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 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
) {
6-757
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 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
) {
0-757
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 502 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 255 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 502 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-502
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 745 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-745
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 745 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-745
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 745 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 745 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
745
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 825 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-825
196 return
executed 825 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 825 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
825
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 758 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-758
213 d->socketEngine->close();-
214 if (true) {-
215 d->socketEngine->deleteLater();-
216 }
executed 758 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 758 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
758
222-
223 d->state = QAbstractSocket::UnconnectedState;-
224}
executed 1439 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
1439
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__, 407, __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 762 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-762
284 return
executed 762 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 762 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
762
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 56 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-56
297 return
executed 56 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 56 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
56
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 409 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-409
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 34 times by 2 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 375 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
) {
34-375
306 d->serverSocketError = d->socketEngine->error();-
307 d->serverSocketErrorString = d->socketEngine->errorString();-
308 return
executed 34 times by 2 tests: return false;
Executed by:
  • tst_QTcpServer
  • tst_qxmlsimplereader - unknown status
false;
executed 34 times by 2 tests: return false;
Executed by:
  • tst_QTcpServer
  • tst_qxmlsimplereader - unknown status
34
309 }-
310-
311 if (timedOut
timedOutDescription
TRUEevaluated 13 times by 2 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qtcpsocket - unknown status
FALSEevaluated 362 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-362
312 return
never executed: return false;
false;
never executed: return false;
0
313-
314 d->readNotification();-
315-
316 return
executed 375 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 375 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
375
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 44 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 543 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
)
44-543
333 return
executed 44 times by 3 tests: return 0;
Executed by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qxmlsimplereader - unknown status
0;
executed 44 times by 3 tests: return 0;
Executed by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qxmlsimplereader - unknown status
44
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 530 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-530
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 543 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 543 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
543
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 549 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
549
350void QTcpServer::addPendingConnection(QTcpSocket* socket)-
351{-
352 d_func()->pendingConnections.append(socket);-
353}
executed 549 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
549
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 670 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 670 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
670
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