qnativesocketengine.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/network/socket/qnativesocketengine.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Copyright (C) 2016 Intel Corporation.-
5** Contact: https://www.qt.io/licensing/-
6**-
7** This file is part of the QtNetwork module of the Qt Toolkit.-
8**-
9** $QT_BEGIN_LICENSE:LGPL$-
10** Commercial License Usage-
11** Licensees holding valid commercial Qt licenses may use this file in-
12** accordance with the commercial license agreement provided with the-
13** Software or, alternatively, in accordance with the terms contained in-
14** a written agreement between you and The Qt Company. For licensing terms-
15** and conditions see https://www.qt.io/terms-conditions. For further-
16** information use the contact form at https://www.qt.io/contact-us.-
17**-
18** GNU Lesser General Public License Usage-
19** Alternatively, this file may be used under the terms of the GNU Lesser-
20** General Public License version 3 as published by the Free Software-
21** Foundation and appearing in the file LICENSE.LGPL3 included in the-
22** packaging of this file. Please review the following information to-
23** ensure the GNU Lesser General Public License version 3 requirements-
24** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
25**-
26** GNU General Public License Usage-
27** Alternatively, this file may be used under the terms of the GNU-
28** General Public License version 2.0 or (at your option) the GNU General-
29** Public license version 3 or any later version approved by the KDE Free-
30** Qt Foundation. The licenses are as published by the Free Software-
31** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
32** included in the packaging of this file. Please review the following-
33** information to ensure the GNU General Public License requirements will-
34** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
35** https://www.gnu.org/licenses/gpl-3.0.html.-
36**-
37** $QT_END_LICENSE$-
38**-
39****************************************************************************/-
40-
41//#define QNATIVESOCKETENGINE_DEBUG-
42-
43/*! \class QNativeSocketEngine-
44 \internal-
45-
46 \brief The QNativeSocketEngine class provides low level access to a socket.-
47-
48 \reentrant-
49 \ingroup network-
50 \inmodule QtNetwork-
51-
52 QtSocketLayer provides basic socket functionality provided by the-
53 operating system. It also keeps track of what state the socket is-
54 in, and which errors that occur.-
55-
56 The classes QTcpSocket, QUdpSocket and QTcpServer provide a-
57 higher level API, and are in general more useful for the common-
58 application.-
59-
60 There are two main ways of initializing the a QNativeSocketEngine; either-
61 create a new socket by passing the socket type (TcpSocket or-
62 UdpSocket) and network layer protocol (IPv4Protocol or-
63 IPv6Protocol) to initialize(), or pass an existing socket-
64 descriptor and have QNativeSocketEngine determine the type and protocol-
65 itself. The native socket descriptor can later be fetched by-
66 calling socketDescriptor(). The socket is made non-blocking, but-
67 blocking behavior can still be achieved by calling waitForRead()-
68 and waitForWrite(). isValid() can be called to check if the socket-
69 has been successfully initialized and is ready to use.-
70-
71 To connect to a host, determine its address and pass this and the-
72 port number to connectToHost(). The socket can then be used as a-
73 TCP or UDP client. Otherwise; bind(), listen() and accept() are-
74 used to have the socket function as a TCP or UDP server. Call-
75 close() to close the socket.-
76-
77 bytesAvailable() is called to determine how much data is available-
78 for reading. read() and write() are used by both TCP and UDP-
79 clients to exchange data with the connected peer. UDP clients can-
80 also call hasMoreDatagrams(), nextDatagramSize(),-
81 readDatagram(), and writeDatagram().-
82-
83 Call state() to determine the state of the socket, for-
84 example, ListeningState or ConnectedState. socketType() tells-
85 whether the socket is a TCP socket or a UDP socket, or if the-
86 socket type is unknown. protocol() is used to determine the-
87 socket's network layer protocol.-
88-
89 localAddress(), localPort() are called to find the address and-
90 port that are currently bound to the socket. If the socket is-
91 connected, peerAddress() and peerPort() determine the address and-
92 port of the connected peer.-
93-
94 Finally, if any function should fail, error() and-
95 errorString() can be called to determine the cause of the error.-
96*/-
97-
98/*!-
99 \enum QAbstractSocketEngine::PacketHeaderOption-
100-
101 Specifies which fields in the IP packet header are desired in the call to-
102 readDatagram().-
103-
104 \value WantNone caller isn't interested in the packet metadata-
105 \value WantDatagramSender caller wants the sender address and port number-
106 \value WantDatagramDestination caller wants the packet's destination address and port number-
107 (this option is useful to distinguish multicast packets from unicast)-
108 \value WantDatagramHopLimit caller wants the packet's remaining hop limit or time to live-
109 (this option is useful in IPv4 multicasting, where the TTL is used-
110 to indicate the realm)-
111 \value WantAll this is a catch-all value to indicate the caller is-
112 interested in all the available information-
113-
114 \sa readDatagram()-
115*/-
116-
117#include "qnativesocketengine_p.h"-
118-
119#include <qabstracteventdispatcher.h>-
120#include <qsocketnotifier.h>-
121#include <qnetworkinterface.h>-
122-
123#include <private/qthread_p.h>-
124#include <private/qobject_p.h>-
125-
126#if !defined(QT_NO_NETWORKPROXY)-
127# include "qnetworkproxy.h"-
128# include "qabstractsocket.h"-
129# include "qtcpserver.h"-
130#endif-
131-
132QT_BEGIN_NAMESPACE-
133-
134//#define QNATIVESOCKETENGINE_DEBUG-
135-
136#define Q_VOID-
137-
138// Common constructs-
139#define Q_CHECK_VALID_SOCKETLAYER(function, returnValue) do { \-
140 if (!isValid()) { \-
141 qWarning(""#function" was called on an uninitialized socket device"); \-
142 return returnValue; \-
143 } } while (0)-
144#define Q_CHECK_INVALID_SOCKETLAYER(function, returnValue) do { \-
145 if (isValid()) { \-
146 qWarning(""#function" was called on an already initialized socket device"); \-
147 return returnValue; \-
148 } } while (0)-
149#define Q_CHECK_STATE(function, checkState, returnValue) do { \-
150 if (d->socketState != (checkState)) { \-
151 qWarning(""#function" was not called in "#checkState); \-
152 return (returnValue); \-
153 } } while (0)-
154#define Q_CHECK_NOT_STATE(function, checkState, returnValue) do { \-
155 if (d->socketState == (checkState)) { \-
156 qWarning(""#function" was called in "#checkState); \-
157 return (returnValue); \-
158 } } while (0)-
159#define Q_CHECK_STATES(function, state1, state2, returnValue) do { \-
160 if (d->socketState != (state1) && d->socketState != (state2)) { \-
161 qWarning(""#function" was called" \-
162 " not in "#state1" or "#state2); \-
163 return (returnValue); \-
164 } } while (0)-
165#define Q_CHECK_STATES3(function, state1, state2, state3, returnValue) do { \-
166 if (d->socketState != (state1) && d->socketState != (state2) && d->socketState != (state3)) { \-
167 qWarning(""#function" was called" \-
168 " not in "#state1" or "#state2); \-
169 return (returnValue); \-
170 } } while (0)-
171#define Q_CHECK_TYPE(function, type, returnValue) do { \-
172 if (d->socketType != (type)) { \-
173 qWarning(#function" was called by a" \-
174 " socket other than "#type""); \-
175 return (returnValue); \-
176 } } while (0)-
177#define Q_TR(a) QT_TRANSLATE_NOOP(QNativeSocketEngine, a)-
178-
179/*! \internal-
180 Constructs the private class and initializes all data members.-
181*/-
182QNativeSocketEnginePrivate::QNativeSocketEnginePrivate() :-
183 socketDescriptor(-1),-
184 readNotifier(0),-
185 writeNotifier(0),-
186 exceptNotifier(0)-
187{-
188#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)-
189 QSysInfo::machineHostName(); // this initializes ws2_32.dll-
190#endif-
191}
executed 71300 times by 31 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • ...
71300
192-
193/*! \internal-
194 Destructs the private class.-
195*/-
196QNativeSocketEnginePrivate::~QNativeSocketEnginePrivate()-
197{-
198}-
199-
200/*! \internal-
201-
202 Sets the error and error string if not set already. The only-
203 interesting error is the first one that occurred, and not the last-
204 one.-
205*/-
206void QNativeSocketEnginePrivate::setError(QAbstractSocket::SocketError error, ErrorString errorString) const-
207{-
208 if (hasSetSocketError) {
hasSetSocketErrorDescription
TRUEevaluated 119 times by 9 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_qhttpsocketengine - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 6348 times by 30 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • ...
119-6348
209 // Only set socket errors once for one engine; expect the-
210 // socket to recreate its engine after an error. Note: There's-
211 // one exception: SocketError(11) bypasses this as it's purely-
212 // a temporary internal error condition.-
213 // Another exception is the way the waitFor*() functions set-
214 // an error when a timeout occurs. After the call to setError()-
215 // they reset the hasSetSocketError to false-
216 return;
executed 119 times by 9 tests: return;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_qhttpsocketengine - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
119
217 }-
218 if (error != QAbstractSocket::SocketError(11))
error != QAbst...ocketError(11)Description
TRUEevaluated 2516 times by 23 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 3832 times by 28 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
2516-3832
219 hasSetSocketError = true;
executed 2516 times by 23 tests: hasSetSocketError = true;
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
2516
220-
221 socketError = error;-
222-
223 switch (errorString) {-
224 case NonBlockingInitFailedErrorString:
never executed: case NonBlockingInitFailedErrorString:
0
225 socketErrorString = QNativeSocketEngine::tr("Unable to initialize non-blocking socket");-
226 break;
never executed: break;
0
227 case BroadcastingInitFailedErrorString:
never executed: case BroadcastingInitFailedErrorString:
0
228 socketErrorString = QNativeSocketEngine::tr("Unable to initialize broadcast socket");-
229 break;
never executed: break;
0
230 // should not happen anymore-
231 case NoIpV6ErrorString:
never executed: case NoIpV6ErrorString:
0
232 socketErrorString = QNativeSocketEngine::tr("Attempt to use IPv6 socket on a platform with no IPv6 support");-
233 break;
never executed: break;
0
234 case RemoteHostClosedErrorString:
executed 1335 times by 16 tests: case RemoteHostClosedErrorString:
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_platformsocketengine - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
1335
235 socketErrorString = QNativeSocketEngine::tr("The remote host closed the connection");-
236 break;
executed 1335 times by 16 tests: break;
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_platformsocketengine - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
1335
237 case TimeOutErrorString:
executed 136 times by 10 tests: case TimeOutErrorString:
Executed by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_qlocalsocket - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
136
238 socketErrorString = QNativeSocketEngine::tr("Network operation timed out");-
239 break;
executed 136 times by 10 tests: break;
Executed by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_qlocalsocket - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
136
240 case ResourceErrorString:
executed 1 time by 1 test: case ResourceErrorString:
Executed by:
  • tst_platformsocketengine - unknown status
1
241 socketErrorString = QNativeSocketEngine::tr("Out of resources");-
242 break;
executed 1 time by 1 test: break;
Executed by:
  • tst_platformsocketengine - unknown status
1
243 case OperationUnsupportedErrorString:
executed 1 time by 1 test: case OperationUnsupportedErrorString:
Executed by:
  • tst_QUdpSocket
1
244 socketErrorString = QNativeSocketEngine::tr("Unsupported socket operation");-
245 break;
executed 1 time by 1 test: break;
Executed by:
  • tst_QUdpSocket
1
246 case ProtocolUnsupportedErrorString:
never executed: case ProtocolUnsupportedErrorString:
0
247 socketErrorString = QNativeSocketEngine::tr("Protocol type not supported");-
248 break;
never executed: break;
0
249 case InvalidSocketErrorString:
executed 3840 times by 28 tests: case InvalidSocketErrorString:
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
3840
250 socketErrorString = QNativeSocketEngine::tr("Invalid socket descriptor");-
251 break;
executed 3840 times by 28 tests: break;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
3840
252 case HostUnreachableErrorString:
never executed: case HostUnreachableErrorString:
0
253 socketErrorString = QNativeSocketEngine::tr("Host unreachable");-
254 break;
never executed: break;
0
255 case NetworkUnreachableErrorString:
executed 4 times by 2 tests: case NetworkUnreachableErrorString:
Executed by:
  • tst_QNetworkReply
  • tst_qtcpsocket - unknown status
4
256 socketErrorString = QNativeSocketEngine::tr("Network unreachable");-
257 break;
executed 4 times by 2 tests: break;
Executed by:
  • tst_QNetworkReply
  • tst_qtcpsocket - unknown status
4
258 case AccessErrorString:
never executed: case AccessErrorString:
0
259 socketErrorString = QNativeSocketEngine::tr("Permission denied");-
260 break;
never executed: break;
0
261 case ConnectionTimeOutErrorString:
never executed: case ConnectionTimeOutErrorString:
0
262 socketErrorString = QNativeSocketEngine::tr("Connection timed out");-
263 break;
never executed: break;
0
264 case ConnectionRefusedErrorString:
executed 320 times by 9 tests: case ConnectionRefusedErrorString:
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qtcpsocket - unknown status
320
265 socketErrorString = QNativeSocketEngine::tr("Connection refused");-
266 break;
executed 320 times by 9 tests: break;
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qtcpsocket - unknown status
320
267 case AddressInuseErrorString:
executed 12 times by 3 tests: case AddressInuseErrorString:
Executed by:
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
12
268 socketErrorString = QNativeSocketEngine::tr("The bound address is already in use");-
269 break;
executed 12 times by 3 tests: break;
Executed by:
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
12
270 case AddressNotAvailableErrorString:
executed 5 times by 2 tests: case AddressNotAvailableErrorString:
Executed by:
  • tst_QTcpServer
  • tst_qtcpsocket - unknown status
5
271 socketErrorString = QNativeSocketEngine::tr("The address is not available");-
272 break;
executed 5 times by 2 tests: break;
Executed by:
  • tst_QTcpServer
  • tst_qtcpsocket - unknown status
5
273 case AddressProtectedErrorString:
executed 5 times by 2 tests: case AddressProtectedErrorString:
Executed by:
  • tst_platformsocketengine - unknown status
  • tst_qtcpsocket - unknown status
5
274 socketErrorString = QNativeSocketEngine::tr("The address is protected");-
275 break;
executed 5 times by 2 tests: break;
Executed by:
  • tst_platformsocketengine - unknown status
  • tst_qtcpsocket - unknown status
5
276 case DatagramTooLargeErrorString:
executed 1 time by 1 test: case DatagramTooLargeErrorString:
Executed by:
  • tst_QUdpSocket
1
277 socketErrorString = QNativeSocketEngine::tr("Datagram was too large to send");-
278 break;
executed 1 time by 1 test: break;
Executed by:
  • tst_QUdpSocket
1
279 case SendDatagramErrorString:
never executed: case SendDatagramErrorString:
0
280 socketErrorString = QNativeSocketEngine::tr("Unable to send a message");-
281 break;
never executed: break;
0
282 case ReceiveDatagramErrorString:
never executed: case ReceiveDatagramErrorString:
0
283 socketErrorString = QNativeSocketEngine::tr("Unable to receive a message");-
284 break;
never executed: break;
0
285 case WriteErrorString:
never executed: case WriteErrorString:
0
286 socketErrorString = QNativeSocketEngine::tr("Unable to write");-
287 break;
never executed: break;
0
288 case ReadErrorString:
never executed: case ReadErrorString:
0
289 socketErrorString = QNativeSocketEngine::tr("Network error");-
290 break;
never executed: break;
0
291 case PortInuseErrorString:
never executed: case PortInuseErrorString:
0
292 socketErrorString = QNativeSocketEngine::tr("Another socket is already listening on the same port");-
293 break;
never executed: break;
0
294 case NotSocketErrorString:
never executed: case NotSocketErrorString:
0
295 socketErrorString = QNativeSocketEngine::tr("Operation on non-socket");-
296 break;
never executed: break;
0
297 case InvalidProxyTypeString:
never executed: case InvalidProxyTypeString:
0
298 socketErrorString = QNativeSocketEngine::tr("The proxy type is invalid for this operation");-
299 break;
never executed: break;
0
300 case TemporaryErrorString:
executed 686 times by 15 tests: case TemporaryErrorString:
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
686
301 socketErrorString = QNativeSocketEngine::tr("Temporary error");-
302 break;
executed 686 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
686
303 case NetworkDroppedConnectionErrorString:
never executed: case NetworkDroppedConnectionErrorString:
0
304 socketErrorString = QNativeSocketEngine::tr("Network dropped connection on reset");-
305 break;
never executed: break;
0
306 case ConnectionResetErrorString:
never executed: case ConnectionResetErrorString:
0
307 socketErrorString = QNativeSocketEngine::tr("Connection reset by peer");-
308 break;
never executed: break;
0
309 case UnknownSocketErrorString:
executed 2 times by 1 test: case UnknownSocketErrorString:
Executed by:
  • tst_QUdpSocket
2
310 socketErrorString = QNativeSocketEngine::tr("Unknown error");-
311 break;
executed 2 times by 1 test: break;
Executed by:
  • tst_QUdpSocket
2
312 }-
313}
executed 6348 times by 30 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • ...
6348
314-
315/*!-
316 \internal-
317-
318 Adjusts the incoming \a address family to match the currently bound address-
319 (if any). This function will convert v4-mapped IPv6 addresses to IPv4 and-
320 vice-versa. All other address types and values will be left unchanged.-
321 */-
322QHostAddress QNativeSocketEnginePrivate::adjustAddressProtocol(const QHostAddress &address) const-
323{-
324 QAbstractSocket::NetworkLayerProtocol targetProtocol = socketProtocol;-
325 if (Q_LIKELY(targetProtocol == QAbstractSocket::UnknownNetworkLayerProtocol))
__builtin_expe...otocol), true)Description
TRUEnever evaluated
FALSEevaluated 8429 times by 29 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • ...
0-8429
326 return address;
never executed: return address;
0
327-
328 QAbstractSocket::NetworkLayerProtocol sourceProtocol = address.protocol();-
329-
330 if (targetProtocol == QAbstractSocket::AnyIPProtocol)
targetProtocol...:AnyIPProtocolDescription
TRUEevaluated 592 times by 13 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 7837 times by 29 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • ...
592-7837
331 targetProtocol = QAbstractSocket::IPv6Protocol;
executed 592 times by 13 tests: targetProtocol = QAbstractSocket::IPv6Protocol;
Executed by:
  • tst_NetworkSelfTest
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
592
332 if (targetProtocol == QAbstractSocket::IPv6Protocol && sourceProtocol == QAbstractSocket::IPv4Protocol) {
targetProtocol...::IPv6ProtocolDescription
TRUEevaluated 1429 times by 15 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QHostInfo
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_platformsocketengine - 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 7000 times by 28 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
sourceProtocol...::IPv4ProtocolDescription
TRUEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QUdpSocket
  • tst_qtcpsocket - unknown status
FALSEevaluated 1420 times by 15 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QHostInfo
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_platformsocketengine - 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
9-7000
333 // convert to IPv6 v4-mapped address. This always works-
334 return QHostAddress(address.toIPv6Address());
executed 9 times by 2 tests: return QHostAddress(address.toIPv6Address());
Executed by:
  • tst_QUdpSocket
  • tst_qtcpsocket - unknown status
9
335 }-
336-
337 if (targetProtocol == QAbstractSocket::IPv4Protocol && sourceProtocol == QAbstractSocket::IPv6Protocol) {
targetProtocol...::IPv4ProtocolDescription
TRUEevaluated 7000 times by 28 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
FALSEevaluated 1420 times by 15 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QHostInfo
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_platformsocketengine - 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
sourceProtocol...::IPv6ProtocolDescription
TRUEnever evaluated
FALSEevaluated 7000 times by 28 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
0-7000
338 // convert to IPv4 if the source is a v4-mapped address-
339 quint32 ip4 = address.toIPv4Address();-
340 if (ip4)
ip4Description
TRUEnever evaluated
FALSEnever evaluated
0
341 return QHostAddress(ip4);
never executed: return QHostAddress(ip4);
0
342 }
never executed: end of block
0
343-
344 return address;
executed 8420 times by 29 tests: return address;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • ...
8420
345}-
346-
347bool QNativeSocketEnginePrivate::checkProxy(const QHostAddress &address)-
348{-
349 if (address.isLoopback())
address.isLoopback()Description
TRUEevaluated 2492 times by 20 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_platformsocketengine - unknown status
  • 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 5939 times by 24 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qtextstream - unknown status
  • tst_qxmlsimplereader - unknown status
2492-5939
350 return true;
executed 2492 times by 20 tests: return true;
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_platformsocketengine - unknown status
  • 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
2492
351-
352#if !defined(QT_NO_NETWORKPROXY)-
353 QObject *parent = q_func()->parent();-
354 QNetworkProxy proxy;-
355 if (QAbstractSocket *socket = qobject_cast<QAbstractSocket *>(parent)) {
QAbstractSocke...ket *>(parent)Description
TRUEevaluated 5255 times by 20 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qiodevice - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qtextstream - unknown status
FALSEevaluated 684 times by 12 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_platformsocketengine - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
684-5255
356 proxy = socket->proxy();-
357 } else if (QTcpServer *server = qobject_cast<QTcpServer *>(parent)) {
executed 5255 times by 20 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qiodevice - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qtextstream - unknown status
QTcpServer *se...ver *>(parent)Description
TRUEevaluated 670 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 14 times by 1 test
Evaluated by:
  • tst_platformsocketengine - unknown status
14-5255
358 proxy = server->proxy();-
359 } else {
executed 670 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
670
360 // no parent -> no proxy-
361 return true;
executed 14 times by 1 test: return true;
Executed by:
  • tst_platformsocketengine - unknown status
14
362 }-
363-
364 if (proxy.type() == QNetworkProxy::DefaultProxy)
proxy.type() =...::DefaultProxyDescription
TRUEevaluated 2577 times by 19 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qtextstream - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 3348 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
2577-3348
365 proxy = QNetworkProxy::applicationProxy();
executed 2577 times by 19 tests: proxy = QNetworkProxy::applicationProxy();
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qtextstream - unknown status
  • tst_qxmlsimplereader - unknown status
2577
366-
367 if (proxy.type() != QNetworkProxy::DefaultProxy &&
proxy.type() !...::DefaultProxyDescription
TRUEevaluated 5925 times by 23 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qtextstream - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
0-5925
368 proxy.type() != QNetworkProxy::NoProxy) {
proxy.type() !...Proxy::NoProxyDescription
TRUEnever evaluated
FALSEevaluated 5925 times by 23 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qtextstream - unknown status
  • tst_qxmlsimplereader - unknown status
0-5925
369 // QNativeSocketEngine doesn't do proxies-
370 setError(QAbstractSocket::UnsupportedSocketOperationError,-
371 QNativeSocketEnginePrivate::InvalidProxyTypeString);-
372 return false;
never executed: return false;
0
373 }-
374#endif-
375-
376 return true;
executed 5925 times by 23 tests: return true;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qtextstream - unknown status
  • tst_qxmlsimplereader - unknown status
5925
377}-
378-
379/*!-
380 Constructs a QNativeSocketEngine.-
381-
382 \sa initialize()-
383*/-
384QNativeSocketEngine::QNativeSocketEngine(QObject *parent)-
385 : QAbstractSocketEngine(*new QNativeSocketEnginePrivate(), parent)-
386{-
387}
executed 71300 times by 31 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • ...
71300
388-
389/*!-
390 Destructs a QNativeSocketEngine.-
391*/-
392QNativeSocketEngine::~QNativeSocketEngine()-
393{-
394 close();-
395}
executed 71293 times by 32 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • ...
71293
396-
397/*!-
398 Initializes a QNativeSocketEngine by creating a new socket of type \a-
399 socketType and network layer protocol \a protocol. Returns \c true on-
400 success; otherwise returns \c false.-
401-
402 If the socket was already initialized, this function closes the-
403 socket before reeinitializing it.-
404-
405 The new socket is non-blocking, and for UDP sockets it's also-
406 broadcast enabled.-
407*/-
408bool QNativeSocketEngine::initialize(QAbstractSocket::SocketType socketType, QAbstractSocket::NetworkLayerProtocol protocol)-
409{-
410 Q_D(QNativeSocketEngine);-
411 if (isValid())
isValid()Description
TRUEnever evaluated
FALSEevaluated 70302 times by 29 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • ...
0-70302
412 close();
never executed: close();
0
413-
414 // Create the socket-
415 if (!d->createNewSocket(socketType, protocol)) {
!d->createNewS...ype, protocol)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_platformsocketengine - unknown status
FALSEevaluated 70301 times by 29 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • ...
1-70301
416#if defined (QNATIVESOCKETENGINE_DEBUG)-
417 QString typeStr = QLatin1String("UnknownSocketType");-
418 if (socketType == QAbstractSocket::TcpSocket) typeStr = QLatin1String("TcpSocket");-
419 else if (socketType == QAbstractSocket::UdpSocket) typeStr = QLatin1String("UdpSocket");-
420 QString protocolStr = QLatin1String("UnknownProtocol");-
421 if (protocol == QAbstractSocket::IPv4Protocol) protocolStr = QLatin1String("IPv4Protocol");-
422 else if (protocol == QAbstractSocket::IPv6Protocol) protocolStr = QLatin1String("IPv6Protocol");-
423 qDebug("QNativeSocketEngine::initialize(type == %s, protocol == %s) failed: %s",-
424 typeStr.toLatin1().constData(), protocolStr.toLatin1().constData(), d->socketErrorString.toLatin1().constData());-
425#endif-
426 return false;
executed 1 time by 1 test: return false;
Executed by:
  • tst_platformsocketengine - unknown status
1
427 }-
428-
429 if (socketType == QAbstractSocket::UdpSocket) {
socketType == ...ket::UdpSocketDescription
TRUEevaluated 140 times by 4 tests
Evaluated by:
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 70161 times by 29 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • ...
140-70161
430 // Set the broadcasting flag if it's a UDP socket.-
431 if (!setOption(BroadcastSocketOption, 1)) {
!setOption(Bro...cketOption, 1)Description
TRUEnever evaluated
FALSEevaluated 140 times by 4 tests
Evaluated by:
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
0-140
432 d->setError(QAbstractSocket::UnsupportedSocketOperationError,-
433 QNativeSocketEnginePrivate::BroadcastingInitFailedErrorString);-
434 close();-
435 return false;
never executed: return false;
0
436 }-
437-
438 // Set some extra flags that are interesting to us, but accept failure-
439 setOption(ReceivePacketInformation, 1);-
440 setOption(ReceiveHopLimit, 1);-
441 }
executed 140 times by 4 tests: end of block
Executed by:
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
140
442-
443-
444 // Make sure we receive out-of-band data-
445 if (socketType == QAbstractSocket::TcpSocket
socketType == ...ket::TcpSocketDescription
TRUEevaluated 70161 times by 29 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • ...
FALSEevaluated 140 times by 4 tests
Evaluated by:
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
140-70161
446 && !setOption(ReceiveOutOfBandData, 1)) {
!setOption(Rec...OfBandData, 1)Description
TRUEnever evaluated
FALSEevaluated 70161 times by 29 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • ...
0-70161
447 qWarning("QNativeSocketEngine::initialize unable to inline out-of-band data");-
448 }
never executed: end of block
0
449-
450 // Before Qt 4.6, we always set the send and receive buffer size to 49152 as-
451 // this was found to be an optimal value. However, modern OS-
452 // all have some kind of auto tuning for this and we therefore don't set-
453 // this explictly anymore.-
454 // If it introduces any performance regressions for Qt 4.6.x (x > 0) then-
455 // it will be put back in.-
456 //-
457 // You can use tests/manual/qhttpnetworkconnection to test HTTP download speed-
458 // with this.-
459 //-
460 // pre-4.6:-
461 // setReceiveBufferSize(49152);-
462 // setSendBufferSize(49152);-
463-
464 return true;
executed 70301 times by 29 tests: return true;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • ...
70301
465}-
466-
467/*! \overload-
468-
469 Initializes the socket using \a socketDescriptor instead of-
470 creating a new one. The socket type and network layer protocol are-
471 determined automatically. The socket's state is set to \a-
472 socketState.-
473-
474 If the socket type is either TCP or UDP, it is made non-blocking.-
475 UDP sockets are also broadcast enabled.-
476 */-
477bool QNativeSocketEngine::initialize(qintptr socketDescriptor, QAbstractSocket::SocketState socketState)-
478{-
479 Q_D(QNativeSocketEngine);-
480-
481 if (isValid())
isValid()Description
TRUEnever evaluated
FALSEevaluated 998 times by 19 tests
Evaluated by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - 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-998
482 close();
never executed: close();
0
483-
484 d->socketDescriptor = socketDescriptor;-
485-
486 // determine socket type and protocol-
487 if (!d->fetchConnectionParameters()) {
!d->fetchConne...onParameters()Description
TRUEevaluated 9 times by 3 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qlocalsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 989 times by 19 tests
Evaluated by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - 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
9-989
488#if defined (QNATIVESOCKETENGINE_DEBUG)-
489 qDebug() << "QNativeSocketEngine::initialize(socketDescriptor) failed:"-
490 << socketDescriptor << d->socketErrorString;-
491#endif-
492 d->socketDescriptor = -1;-
493 return false;
executed 9 times by 3 tests: return false;
Executed by:
  • tst_QTcpServer
  • tst_qlocalsocket - unknown status
  • tst_qtcpsocket - unknown status
9
494 }-
495-
496 if (d->socketType != QAbstractSocket::UnknownSocketType) {
d->socketType ...nownSocketTypeDescription
TRUEevaluated 989 times by 19 tests
Evaluated by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - 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
FALSEnever evaluated
0-989
497 // Make the socket nonblocking.-
498 if (!setOption(NonBlockingSocketOption, 1)) {
!setOption(Non...cketOption, 1)Description
TRUEnever evaluated
FALSEevaluated 989 times by 19 tests
Evaluated by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - 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-989
499 d->setError(QAbstractSocket::UnsupportedSocketOperationError,-
500 QNativeSocketEnginePrivate::NonBlockingInitFailedErrorString);-
501 close();-
502 return false;
never executed: return false;
0
503 }-
504-
505 // Set the broadcasting flag if it's a UDP socket.-
506 if (d->socketType == QAbstractSocket::UdpSocket
d->socketType ...ket::UdpSocketDescription
TRUEnever evaluated
FALSEevaluated 989 times by 19 tests
Evaluated by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - 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-989
507 && !setOption(BroadcastSocketOption, 1)) {
!setOption(Bro...cketOption, 1)Description
TRUEnever evaluated
FALSEnever evaluated
0
508 d->setError(QAbstractSocket::UnsupportedSocketOperationError,-
509 QNativeSocketEnginePrivate::BroadcastingInitFailedErrorString);-
510 close();-
511 return false;
never executed: return false;
0
512 }-
513 }
executed 989 times by 19 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - 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
989
514-
515 d->socketState = socketState;-
516 return true;
executed 989 times by 19 tests: return true;
Executed by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - 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
989
517}-
518-
519/*!-
520 Returns \c true if the socket is valid; otherwise returns \c false. A-
521 socket is valid if it has not been successfully initialized, or if-
522 it has been closed.-
523*/-
524bool QNativeSocketEngine::isValid() const-
525{-
526 Q_D(const QNativeSocketEngine);-
527 return d->socketDescriptor != -1;
executed 5250479 times by 32 tests: return d->socketDescriptor != -1;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • ...
5250479
528}-
529-
530/*!-
531 Returns the native socket descriptor. Any use of this descriptor-
532 stands the risk of being non-portable.-
533*/-
534qintptr QNativeSocketEngine::socketDescriptor() const-
535{-
536 Q_D(const QNativeSocketEngine);-
537 return d->socketDescriptor;
executed 4142 times by 28 tests: return d->socketDescriptor;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
4142
538}-
539-
540/*!-
541 Connects to the IP address and port specified by \a address and \a-
542 port. If the connection is established, this function returns \c true-
543 and the socket enters ConnectedState. Otherwise, false is-
544 returned.-
545-
546 If false is returned, state() should be called to see if the-
547 socket is in ConnectingState. If so, a delayed TCP connection is-
548 taking place, and connectToHost() must be called again later to-
549 determine if the connection was established successfully or-
550 not. The second connection attempt must be made when the socket is-
551 ready for writing. This state can be determined either by-
552 connecting a QSocketNotifier to the socket descriptor returned by-
553 socketDescriptor(), or by calling the blocking function-
554 waitForWrite().-
555-
556 Example:-
557 \snippet code/src_network_socket_qnativesocketengine.cpp 0-
558-
559 Otherwise, error() should be called to determine the cause of the-
560 error.-
561*/-
562bool QNativeSocketEngine::connectToHost(const QHostAddress &address, quint16 port)-
563{-
564 Q_D(QNativeSocketEngine);-
565 Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::connectToHost(), false);
never executed: return false;
!isValid()Description
TRUEnever evaluated
FALSEevaluated 7477 times by 28 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
0-7477
566-
567 if (!d->checkProxy(address))
!d->checkProxy(address)Description
TRUEnever evaluated
FALSEevaluated 7477 times by 28 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
0-7477
568 return false;
never executed: return false;
0
569-
570 Q_CHECK_STATES3(QNativeSocketEngine::connectToHost(), QAbstractSocket::BoundState,
executed 2 times by 1 test: return (false);
Executed by:
  • tst_qtcpsocket - unknown status
d->socketState...t::BoundState)Description
TRUEevaluated 7450 times by 28 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
FALSEevaluated 27 times by 3 tests
Evaluated by:
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_qtcpsocket - unknown status
d->socketState...onnectedState)Description
TRUEevaluated 3630 times by 28 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
FALSEevaluated 3820 times by 28 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
d->socketState...nnectingState)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qtcpsocket - unknown status
FALSEevaluated 3628 times by 28 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
2-7450
571 QAbstractSocket::UnconnectedState, QAbstractSocket::ConnectingState, false);-
572-
573 d->peerAddress = address;-
574 d->peerPort = port;-
575 bool connected = d->nativeConnect(d->adjustAddressProtocol(address), port);-
576 if (connected)
connectedDescription
TRUEevaluated 3313 times by 28 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
FALSEevaluated 4162 times by 28 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
3313-4162
577 d->fetchConnectionParameters();
executed 3313 times by 28 tests: d->fetchConnectionParameters();
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
3313
578-
579 return connected;
executed 7475 times by 28 tests: return connected;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
7475
580}-
581-
582/*!-
583 If there's a connection activity on the socket, process it. Then-
584 notify our parent if there really was activity.-
585*/-
586void QNativeSocketEngine::connectionNotification()-
587{-
588 Q_D(QNativeSocketEngine);-
589 Q_ASSERT(state() == QAbstractSocket::ConnectingState);-
590-
591 connectToHost(d->peerAddress, d->peerPort);-
592 if (state() != QAbstractSocket::ConnectingState) {
state() != QAb...onnectingStateDescription
TRUEevaluated 2553 times by 16 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
0-2553
593 // we changed states-
594 QAbstractSocketEngine::connectionNotification();-
595 }
executed 2553 times by 16 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
2553
596}
executed 2553 times by 16 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
2553
597-
598/*!-
599 Connects to the remote host name given by \a name on port \a-
600 port. When this function is called, the upper-level will not-
601 perform a hostname lookup.-
602-
603 The native socket engine does not support this operation,-
604 but some other socket engines (notably proxy-based ones) do.-
605*/-
606bool QNativeSocketEngine::connectToHostByName(const QString &name, quint16 port)-
607{-
608 Q_UNUSED(name);-
609 Q_UNUSED(port);-
610 Q_D(QNativeSocketEngine);-
611 d->setError(QAbstractSocket::UnsupportedSocketOperationError,-
612 QNativeSocketEnginePrivate::OperationUnsupportedErrorString);-
613 return false;
never executed: return false;
0
614}-
615-
616/*!-
617 Binds the socket to the address \a address and port \a-
618 port. Returns \c true on success; otherwise false is returned. The-
619 port may be 0, in which case an arbitrary unused port is assigned-
620 automatically by the operating system.-
621-
622 Servers call this function to set up the server's address and-
623 port. TCP servers must in addition call listen() after bind().-
624*/-
625bool QNativeSocketEngine::bind(const QHostAddress &address, quint16 port)-
626{-
627 Q_D(QNativeSocketEngine);-
628 Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::bind(), false);
never executed: return false;
!isValid()Description
TRUEnever evaluated
FALSEevaluated 954 times by 20 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_platformsocketengine - unknown status
  • 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-954
629-
630 if (!d->checkProxy(address))
!d->checkProxy(address)Description
TRUEnever evaluated
FALSEevaluated 954 times by 20 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_platformsocketengine - unknown status
  • 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-954
631 return false;
never executed: return false;
0
632-
633 Q_CHECK_STATE(QNativeSocketEngine::bind(), QAbstractSocket::UnconnectedState, false);
never executed: return (false);
d->socketState...onnectedState)Description
TRUEnever evaluated
FALSEevaluated 954 times by 20 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_platformsocketengine - unknown status
  • 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-954
634-
635 if (!d->nativeBind(d->adjustAddressProtocol(address), port))
!d->nativeBind...ddress), port)Description
TRUEevaluated 24 times by 4 tests
Evaluated by:
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 930 times by 20 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_platformsocketengine - unknown status
  • 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
24-930
636 return false;
executed 24 times by 4 tests: return false;
Executed by:
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
  • tst_qtcpsocket - unknown status
24
637-
638 d->fetchConnectionParameters();-
639 return true;
executed 930 times by 20 tests: return true;
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_platformsocketengine - unknown status
  • 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
930
640}-
641-
642/*!-
643 Prepares a TCP server for accepting incoming connections. This-
644 function must be called after bind(), and only by TCP sockets.-
645-
646 After this function has been called, pending client connections-
647 are detected by checking if the socket is ready for reading. This-
648 can be done by either creating a QSocketNotifier, passing the-
649 socket descriptor returned by socketDescriptor(), or by calling-
650 the blocking function waitForRead().-
651-
652 Example:-
653 \snippet code/src_network_socket_qnativesocketengine.cpp 1-
654-
655 \sa bind(), accept()-
656*/-
657bool QNativeSocketEngine::listen()-
658{-
659 Q_D(QNativeSocketEngine);-
660 Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::listen(), false);
never executed: return false;
!isValid()Description
TRUEnever evaluated
FALSEevaluated 738 times by 19 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_platformsocketengine - unknown status
  • 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-738
661 Q_CHECK_STATE(QNativeSocketEngine::listen(), QAbstractSocket::BoundState, false);
never executed: return (false);
d->socketState...t::BoundState)Description
TRUEnever evaluated
FALSEevaluated 738 times by 19 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_platformsocketengine - unknown status
  • 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-738
662 Q_CHECK_TYPE(QNativeSocketEngine::listen(), QAbstractSocket::TcpSocket, false);
never executed: return (false);
d->socketType ...et::TcpSocket)Description
TRUEnever evaluated
FALSEevaluated 738 times by 19 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_platformsocketengine - unknown status
  • 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-738
663-
664 // We're using a backlog of 50. Most modern kernels support TCP-
665 // syncookies by default, and if they do, the backlog is ignored.-
666 // When there is no support for TCP syncookies, this value is-
667 // fine.-
668 return d->nativeListen(50);
executed 738 times by 19 tests: return d->nativeListen(50);
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_platformsocketengine - unknown status
  • 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
738
669}-
670-
671/*!-
672 Accepts a pending connection from the socket, which must be in-
673 ListeningState, and returns its socket descriptor. If no pending-
674 connections are available, -1 is returned.-
675-
676 \sa bind(), listen()-
677*/-
678int QNativeSocketEngine::accept()-
679{-
680 Q_D(QNativeSocketEngine);-
681 Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::accept(), -1);
never executed: return -1;
!isValid()Description
TRUEnever evaluated
FALSEevaluated 1623 times by 17 tests
Evaluated by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_platformsocketengine - unknown status
  • 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-1623
682 Q_CHECK_STATE(QNativeSocketEngine::accept(), QAbstractSocket::ListeningState, -1);
never executed: return (-1);
d->socketState...isteningState)Description
TRUEnever evaluated
FALSEevaluated 1623 times by 17 tests
Evaluated by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_platformsocketengine - unknown status
  • 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-1623
683 Q_CHECK_TYPE(QNativeSocketEngine::accept(), QAbstractSocket::TcpSocket, -1);
never executed: return (-1);
d->socketType ...et::TcpSocket)Description
TRUEnever evaluated
FALSEevaluated 1623 times by 17 tests
Evaluated by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_platformsocketengine - unknown status
  • 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-1623
684-
685 return d->nativeAccept();
executed 1623 times by 17 tests: return d->nativeAccept();
Executed by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_platformsocketengine - unknown status
  • 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
1623
686}-
687-
688/*!-
689 Returns the number of bytes that are currently available for-
690 reading. On error, -1 is returned.-
691-
692 For UDP sockets, this function returns the accumulated size of all-
693 pending datagrams, and it is therefore more useful for UDP sockets-
694 to call hasPendingDatagrams() and pendingDatagramSize().-
695*/-
696qint64 QNativeSocketEngine::bytesAvailable() const-
697{-
698 Q_D(const QNativeSocketEngine);-
699 Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::bytesAvailable(), -1);
never executed: return -1;
!isValid()Description
TRUEnever evaluated
FALSEevaluated 74695 times by 29 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • ...
0-74695
700 Q_CHECK_NOT_STATE(QNativeSocketEngine::bytesAvailable(), QAbstractSocket::UnconnectedState, -1);
executed 1 time by 1 test: return (-1);
Executed by:
  • tst_platformsocketengine - unknown status
d->socketState...onnectedState)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_platformsocketengine - unknown status
FALSEevaluated 74694 times by 29 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • ...
1-74694
701-
702 return d->nativeBytesAvailable();
executed 74694 times by 29 tests: return d->nativeBytesAvailable();
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • ...
74694
703}-
704-
705#ifndef QT_NO_UDPSOCKET-
706#ifndef QT_NO_NETWORKINTERFACE-
707-
708/*!-
709 \since 4.8-
710*/-
711bool QNativeSocketEngine::joinMulticastGroup(const QHostAddress &groupAddress,-
712 const QNetworkInterface &iface)-
713{-
714 Q_D(QNativeSocketEngine);-
715 Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::joinMulticastGroup(), false);
never executed: return false;
!isValid()Description
TRUEnever evaluated
FALSEevaluated 9 times by 1 test
Evaluated by:
  • tst_QUdpSocket
0-9
716 Q_CHECK_STATE(QNativeSocketEngine::joinMulticastGroup(), QAbstractSocket::BoundState, false);
never executed: return (false);
d->socketState...t::BoundState)Description
TRUEnever evaluated
FALSEevaluated 9 times by 1 test
Evaluated by:
  • tst_QUdpSocket
0-9
717 Q_CHECK_TYPE(QNativeSocketEngine::joinMulticastGroup(), QAbstractSocket::UdpSocket, false);
never executed: return (false);
d->socketType ...et::UdpSocket)Description
TRUEnever evaluated
FALSEevaluated 9 times by 1 test
Evaluated by:
  • tst_QUdpSocket
0-9
718-
719 // if the user binds a socket to an IPv6 address (or QHostAddress::Any) and-
720 // then attempts to join an IPv4 multicast group, this won't work on-
721 // Windows. In order to make this cross-platform, we warn & fail on all-
722 // platforms.-
723 if (groupAddress.protocol() == QAbstractSocket::IPv4Protocol &&
groupAddress.p...::IPv4ProtocolDescription
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QUdpSocket
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QUdpSocket
4-5
724 (d->socketProtocol == QAbstractSocket::IPv6Protocol ||
d->socketProto...::IPv6ProtocolDescription
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • tst_QUdpSocket
0-5
725 d->socketProtocol == QAbstractSocket::AnyIPProtocol)) {
d->socketProto...:AnyIPProtocolDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QUdpSocket
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QUdpSocket
1-4
726 qWarning("QAbstractSocket: cannot bind to QHostAddress::Any (or an IPv6 address) and join an IPv4 multicast group;"-
727 " bind to QHostAddress::AnyIPv4 instead if you want to do this");-
728 return false;
executed 1 time by 1 test: return false;
Executed by:
  • tst_QUdpSocket
1
729 }-
730-
731 return d->nativeJoinMulticastGroup(groupAddress, iface);
executed 8 times by 1 test: return d->nativeJoinMulticastGroup(groupAddress, iface);
Executed by:
  • tst_QUdpSocket
8
732}-
733-
734/*!-
735 \since 4.8-
736*/-
737bool QNativeSocketEngine::leaveMulticastGroup(const QHostAddress &groupAddress,-
738 const QNetworkInterface &iface)-
739{-
740 Q_D(QNativeSocketEngine);-
741 Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::leaveMulticastGroup(), false);
never executed: return false;
!isValid()Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QUdpSocket
0-4
742 Q_CHECK_STATE(QNativeSocketEngine::leaveMulticastGroup(), QAbstractSocket::BoundState, false);
never executed: return (false);
d->socketState...t::BoundState)Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QUdpSocket
0-4
743 Q_CHECK_TYPE(QNativeSocketEngine::leaveMulticastGroup(), QAbstractSocket::UdpSocket, false);
never executed: return (false);
d->socketType ...et::UdpSocket)Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QUdpSocket
0-4
744 return d->nativeLeaveMulticastGroup(groupAddress, iface);
executed 4 times by 1 test: return d->nativeLeaveMulticastGroup(groupAddress, iface);
Executed by:
  • tst_QUdpSocket
4
745}-
746-
747/*! \since 4.8 */-
748QNetworkInterface QNativeSocketEngine::multicastInterface() const-
749{-
750 Q_D(const QNativeSocketEngine);-
751 Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::multicastInterface(), QNetworkInterface());
never executed: return QNetworkInterface();
!isValid()Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QUdpSocket
0-6
752 Q_CHECK_TYPE(QNativeSocketEngine::multicastInterface(), QAbstractSocket::UdpSocket, QNetworkInterface());
never executed: return (QNetworkInterface());
d->socketType ...et::UdpSocket)Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QUdpSocket
0-6
753 return d->nativeMulticastInterface();
executed 6 times by 1 test: return d->nativeMulticastInterface();
Executed by:
  • tst_QUdpSocket
6
754}-
755-
756/*! \since 4.8 */-
757bool QNativeSocketEngine::setMulticastInterface(const QNetworkInterface &iface)-
758{-
759 Q_D(QNativeSocketEngine);-
760 Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::setMulticastInterface(), false);
never executed: return false;
!isValid()Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QUdpSocket
0-6
761 Q_CHECK_TYPE(QNativeSocketEngine::setMulticastInterface(), QAbstractSocket::UdpSocket, false);
never executed: return (false);
d->socketType ...et::UdpSocket)Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QUdpSocket
0-6
762 return d->nativeSetMulticastInterface(iface);
executed 6 times by 1 test: return d->nativeSetMulticastInterface(iface);
Executed by:
  • tst_QUdpSocket
6
763}-
764-
765#endif // QT_NO_NETWORKINTERFACE-
766-
767/*!-
768 Returns \c true if there is at least one datagram pending. This-
769 function is only called by UDP sockets, where a datagram can have-
770 a size of 0. TCP sockets call bytesAvailable().-
771*/-
772bool QNativeSocketEngine::hasPendingDatagrams() const-
773{-
774 Q_D(const QNativeSocketEngine);-
775 Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::hasPendingDatagrams(), false);
never executed: return false;
!isValid()Description
TRUEnever evaluated
FALSEevaluated 1079079 times by 3 tests
Evaluated by:
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
  • tst_qsocketnotifier - unknown status
0-1079079
776 Q_CHECK_NOT_STATE(QNativeSocketEngine::hasPendingDatagrams(), QAbstractSocket::UnconnectedState, false);
executed 1 time by 1 test: return (false);
Executed by:
  • tst_platformsocketengine - unknown status
d->socketState...onnectedState)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_platformsocketengine - unknown status
FALSEevaluated 1079078 times by 3 tests
Evaluated by:
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
  • tst_qsocketnotifier - unknown status
1-1079078
777 Q_CHECK_TYPE(QNativeSocketEngine::hasPendingDatagrams(), QAbstractSocket::UdpSocket, false);
never executed: return (false);
d->socketType ...et::UdpSocket)Description
TRUEnever evaluated
FALSEevaluated 1079078 times by 3 tests
Evaluated by:
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
  • tst_qsocketnotifier - unknown status
0-1079078
778-
779 return d->nativeHasPendingDatagrams();
executed 1079078 times by 3 tests: return d->nativeHasPendingDatagrams();
Executed by:
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
  • tst_qsocketnotifier - unknown status
1079078
780}-
781-
782/*!-
783 Returns the size of the pending datagram, or -1 if no datagram is-
784 pending. A datagram size of 0 is perfectly valid. This function is-
785 called by UDP sockets before receiveMessage(). For TCP sockets,-
786 call bytesAvailable().-
787*/-
788qint64 QNativeSocketEngine::pendingDatagramSize() const-
789{-
790 Q_D(const QNativeSocketEngine);-
791 Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::pendingDatagramSize(), -1);
never executed: return -1;
!isValid()Description
TRUEnever evaluated
FALSEevaluated 595 times by 3 tests
Evaluated by:
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
  • tst_qsocketnotifier - unknown status
0-595
792 Q_CHECK_TYPE(QNativeSocketEngine::pendingDatagramSize(), QAbstractSocket::UdpSocket, -1);
never executed: return (-1);
d->socketType ...et::UdpSocket)Description
TRUEnever evaluated
FALSEevaluated 595 times by 3 tests
Evaluated by:
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
  • tst_qsocketnotifier - unknown status
0-595
793-
794 return d->nativePendingDatagramSize();
executed 595 times by 3 tests: return d->nativePendingDatagramSize();
Executed by:
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
  • tst_qsocketnotifier - unknown status
595
795}-
796-
797/*!-
798 Reads up to \a maxSize bytes of a datagram from the socket,-
799 stores it in \a data and returns the number of bytes read. The-
800 address, port, and other IP header fields are stored in \a header-
801 according to the request in \a options.-
802-
803 To avoid unnecessarily loss of data, call pendingDatagramSize() to-
804 determine the size of the pending message before reading it. If \a-
805 maxSize is too small, the rest of the datagram will be lost.-
806-
807 Returns -1 if an error occurred.-
808-
809 \sa hasPendingDatagrams()-
810*/-
811qint64 QNativeSocketEngine::readDatagram(char *data, qint64 maxSize, QIpPacketHeader *header,-
812 PacketHeaderOptions options)-
813{-
814 Q_D(QNativeSocketEngine);-
815 Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::readDatagram(), -1);
never executed: return -1;
!isValid()Description
TRUEnever evaluated
FALSEevaluated 854216 times by 4 tests
Evaluated by:
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
0-854216
816 Q_CHECK_TYPE(QNativeSocketEngine::readDatagram(), QAbstractSocket::UdpSocket, -1);
never executed: return (-1);
d->socketType ...et::UdpSocket)Description
TRUEnever evaluated
FALSEevaluated 854216 times by 4 tests
Evaluated by:
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
0-854216
817-
818 return d->nativeReceiveDatagram(data, maxSize, header, options);
executed 854216 times by 4 tests: return d->nativeReceiveDatagram(data, maxSize, header, options);
Executed by:
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
854216
819}-
820-
821/*!-
822 Writes a UDP datagram of size \a size bytes to the socket from-
823 \a data to the destination contained in \a header, and returns the-
824 number of bytes written, or -1 if an error occurred. If \a header-
825 contains other settings like hop limit or source address, this function-
826 will try to pass them to the operating system too, but will not-
827 indicate an error if it could not pass them.-
828-
829 Only one datagram is sent, and if there is too much data to fit-
830 into a single datagram, the operation will fail and error()-
831 will return QAbstractSocket::DatagramTooLargeError. Operating systems impose an-
832 upper limit to the size of a datagram, but this size is different-
833 on almost all platforms. Sending large datagrams is in general-
834 disadvised, as even if they are sent successfully, they are likely-
835 to be fragmented before arriving at their destination.-
836-
837 Experience has shown that it is in general safe to send IPv4 datagrams-
838 no larger than 512 bytes or IPv6 datagrams no larger than 1280 (the-
839 minimum MTU).-
840-
841 \sa readDatagram()-
842*/-
843qint64 QNativeSocketEngine::writeDatagram(const char *data, qint64 size, const QIpPacketHeader &header)-
844{-
845 Q_D(QNativeSocketEngine);-
846 Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::writeDatagram(), -1);
never executed: return -1;
!isValid()Description
TRUEnever evaluated
FALSEevaluated 637 times by 4 tests
Evaluated by:
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
0-637
847 Q_CHECK_TYPE(QNativeSocketEngine::writeDatagram(), QAbstractSocket::UdpSocket, -1);
executed 1 time by 1 test: return (-1);
Executed by:
  • tst_platformsocketengine - unknown status
d->socketType ...et::UdpSocket)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_platformsocketengine - unknown status
FALSEevaluated 636 times by 4 tests
Evaluated by:
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
1-636
848-
849 return d->nativeSendDatagram(data, size, header);
executed 636 times by 4 tests: return d->nativeSendDatagram(data, size, header);
Executed by:
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
636
850}-
851#endif // QT_NO_UDPSOCKET-
852-
853/*!-
854 Writes a block of \a size bytes from \a data to the socket.-
855 Returns the number of bytes written, or -1 if an error occurred.-
856-
857 Passing zero as the \a size parameter on a connected UDP socket-
858 will send an empty datagram. For other socket types results are-
859 unspecified.-
860*/-
861qint64 QNativeSocketEngine::write(const char *data, qint64 size)-
862{-
863 Q_D(QNativeSocketEngine);-
864 Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::write(), -1);
never executed: return -1;
!isValid()Description
TRUEnever evaluated
FALSEevaluated 913144 times by 27 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
0-913144
865 Q_CHECK_STATE(QNativeSocketEngine::write(), QAbstractSocket::ConnectedState, -1);
never executed: return (-1);
d->socketState...onnectedState)Description
TRUEnever evaluated
FALSEevaluated 913144 times by 27 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
0-913144
866 return d->nativeWrite(data, size);
executed 913144 times by 27 tests: return d->nativeWrite(data, size);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
913144
867}-
868-
869-
870qint64 QNativeSocketEngine::bytesToWrite() const-
871{-
872 return 0;
executed 35693 times by 28 tests: return 0;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
35693
873}-
874-
875/*!-
876 Reads up to \a maxSize bytes into \a data from the socket.-
877 Returns the number of bytes read, or -1 if an error occurred.-
878*/-
879qint64 QNativeSocketEngine::read(char *data, qint64 maxSize)-
880{-
881 Q_D(QNativeSocketEngine);-
882 Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::read(), -1);
never executed: return -1;
!isValid()Description
TRUEnever evaluated
FALSEevaluated 193247 times by 29 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • ...
0-193247
883 Q_CHECK_STATES(QNativeSocketEngine::read(), QAbstractSocket::ConnectedState, QAbstractSocket::BoundState, -1);
never executed: return (-1);
d->socketState...onnectedState)Description
TRUEnever evaluated
FALSEevaluated 193247 times by 29 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • ...
d->socketState...t::BoundState)Description
TRUEnever evaluated
FALSEnever evaluated
0-193247
884-
885 qint64 readBytes = d->nativeRead(data, maxSize);-
886-
887 // Handle remote close-
888 if (readBytes == 0 && d->socketType == QAbstractSocket::TcpSocket) {
readBytes == 0Description
TRUEevaluated 1334 times by 16 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_platformsocketengine - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 191913 times by 27 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • ...
d->socketType ...ket::TcpSocketDescription
TRUEevaluated 1334 times by 16 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_platformsocketengine - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
0-191913
889 d->setError(QAbstractSocket::RemoteHostClosedError,-
890 QNativeSocketEnginePrivate::RemoteHostClosedErrorString);-
891 close();-
892 return -1;
executed 1334 times by 16 tests: return -1;
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_platformsocketengine - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
1334
893 } else if (readBytes == -1) {
readBytes == -1Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_platformsocketengine - unknown status
FALSEevaluated 191912 times by 27 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • ...
1-191912
894 if (!d->hasSetSocketError) {
!d->hasSetSocketErrorDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_platformsocketengine - unknown status
FALSEnever evaluated
0-1
895 d->hasSetSocketError = true;-
896 d->socketError = QAbstractSocket::NetworkError;-
897 d->socketErrorString = qt_error_string();-
898 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_platformsocketengine - unknown status
1
899 close();-
900 return -1;
executed 1 time by 1 test: return -1;
Executed by:
  • tst_platformsocketengine - unknown status
1
901 }-
902 return readBytes;
executed 191912 times by 27 tests: return readBytes;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • ...
191912
903}-
904-
905/*!-
906 Closes the socket. In order to use the socket again, initialize()-
907 must be called.-
908*/-
909void QNativeSocketEngine::close()-
910{-
911 Q_D(QNativeSocketEngine);-
912 if (d->readNotifier)
d->readNotifierDescription
TRUEevaluated 5137 times by 31 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • ...
FALSEevaluated 73055 times by 32 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • ...
5137-73055
913 d->readNotifier->setEnabled(false);
executed 5137 times by 31 tests: d->readNotifier->setEnabled(false);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • ...
5137
914 if (d->writeNotifier)
d->writeNotifierDescription
TRUEevaluated 4264 times by 29 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
FALSEevaluated 73928 times by 32 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • ...
4264-73928
915 d->writeNotifier->setEnabled(false);
executed 4264 times by 29 tests: d->writeNotifier->setEnabled(false);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
4264
916 if (d->exceptNotifier)
d->exceptNotifierDescription
TRUEnever evaluated
FALSEevaluated 78192 times by 32 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • ...
0-78192
917 d->exceptNotifier->setEnabled(false);
never executed: d->exceptNotifier->setEnabled(false);
0
918-
919 if(d->socketDescriptor != -1) {
d->socketDescriptor != -1Description
TRUEevaluated 71285 times by 32 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • ...
FALSEevaluated 6907 times by 32 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • ...
6907-71285
920 d->nativeClose();-
921 d->socketDescriptor = -1;-
922 }
executed 71284 times by 32 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • ...
71284
923 d->socketState = QAbstractSocket::UnconnectedState;-
924 d->hasSetSocketError = false;-
925 d->localPort = 0;-
926 d->localAddress.clear();-
927 d->peerPort = 0;-
928 d->peerAddress.clear();-
929 d->inboundStreamCount = d->outboundStreamCount = 0;-
930 if (d->readNotifier) {
d->readNotifierDescription
TRUEevaluated 5136 times by 31 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • ...
FALSEevaluated 73055 times by 32 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • ...
5136-73055
931 qDeleteInEventHandler(d->readNotifier);-
932 d->readNotifier = 0;-
933 }
executed 5136 times by 31 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • ...
5136
934 if (d->writeNotifier) {
d->writeNotifierDescription
TRUEevaluated 4263 times by 29 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
FALSEevaluated 73928 times by 32 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • ...
4263-73928
935 qDeleteInEventHandler(d->writeNotifier);-
936 d->writeNotifier = 0;-
937 }
executed 4263 times by 29 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
4263
938 if (d->exceptNotifier) {
d->exceptNotifierDescription
TRUEnever evaluated
FALSEevaluated 78191 times by 32 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • ...
0-78191
939 qDeleteInEventHandler(d->exceptNotifier);-
940 d->exceptNotifier = 0;-
941 }
never executed: end of block
0
942}
executed 78191 times by 32 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • ...
78191
943-
944/*!-
945 Waits for \a msecs milliseconds or until the socket is ready for-
946 reading. If \a timedOut is not 0 and \a msecs milliseconds have-
947 passed, the value of \a timedOut is set to true.-
948-
949 Returns \c true if data is available for reading; otherwise returns-
950 false.-
951-
952 This is a blocking function call; its use is disadvised in a-
953 single threaded application, as the whole thread will stop-
954 responding until the function returns. waitForRead() is most-
955 useful when there is no event loop available. The general approach-
956 is to create a QSocketNotifier, passing the socket descriptor-
957 returned by socketDescriptor() to its constructor.-
958*/-
959bool QNativeSocketEngine::waitForRead(int msecs, bool *timedOut)-
960{-
961 Q_D(const QNativeSocketEngine);-
962 Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::waitForRead(), false);
never executed: return false;
!isValid()Description
TRUEnever evaluated
FALSEevaluated 261321 times by 8 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_platformsocketengine - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
0-261321
963 Q_CHECK_NOT_STATE(QNativeSocketEngine::waitForRead(),
never executed: return (false);
d->socketState...onnectedState)Description
TRUEnever evaluated
FALSEevaluated 261321 times by 8 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_platformsocketengine - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
0-261321
964 QAbstractSocket::UnconnectedState, false);-
965-
966 if (timedOut)
timedOutDescription
TRUEevaluated 14 times by 2 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qtcpsocket - unknown status
FALSEevaluated 261307 times by 8 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_platformsocketengine - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
14-261307
967 *timedOut = false;
executed 14 times by 2 tests: *timedOut = false;
Executed by:
  • tst_QTcpServer
  • tst_qtcpsocket - unknown status
14
968-
969 int ret = d->nativeSelect(msecs, true);-
970 if (ret == 0) {
ret == 0Description
TRUEevaluated 34 times by 2 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 261287 times by 8 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_platformsocketengine - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
34-261287
971 if (timedOut)
timedOutDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTcpServer
FALSEevaluated 33 times by 2 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qxmlsimplereader - unknown status
1-33
972 *timedOut = true;
executed 1 time by 1 test: *timedOut = true;
Executed by:
  • tst_QTcpServer
1
973 d->setError(QAbstractSocket::SocketTimeoutError,-
974 QNativeSocketEnginePrivate::TimeOutErrorString);-
975 d->hasSetSocketError = false; // A timeout error is temporary in waitFor functions-
976 return false;
executed 34 times by 2 tests: return false;
Executed by:
  • tst_QTcpServer
  • tst_qxmlsimplereader - unknown status
34
977 } else if (state() == QAbstractSocket::ConnectingState) {
state() == QAb...onnectingStateDescription
TRUEnever evaluated
FALSEevaluated 261287 times by 8 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_platformsocketengine - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
0-261287
978 connectToHost(d->peerAddress, d->peerPort);-
979 }
never executed: end of block
0
980-
981 return ret > 0;
executed 261287 times by 8 tests: return ret > 0;
Executed by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_platformsocketengine - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
261287
982}-
983-
984/*!-
985 Waits for \a msecs milliseconds or until the socket is ready for-
986 writing. If \a timedOut is not 0 and \a msecs milliseconds have-
987 passed, the value of \a timedOut is set to true.-
988-
989 Returns \c true if data is available for writing; otherwise returns-
990 false.-
991-
992 This is a blocking function call; its use is disadvised in a-
993 single threaded application, as the whole thread will stop-
994 responding until the function returns. waitForWrite() is most-
995 useful when there is no event loop available. The general approach-
996 is to create a QSocketNotifier, passing the socket descriptor-
997 returned by socketDescriptor() to its constructor.-
998*/-
999bool QNativeSocketEngine::waitForWrite(int msecs, bool *timedOut)-
1000{-
1001 Q_D(QNativeSocketEngine);-
1002 Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::waitForWrite(), false);
never executed: return false;
!isValid()Description
TRUEnever evaluated
FALSEevaluated 1079 times by 20 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QNetworkInterface
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qtextstream - unknown status
  • tst_qxmlsimplereader - unknown status
0-1079
1003 Q_CHECK_NOT_STATE(QNativeSocketEngine::waitForWrite(),
never executed: return (false);
d->socketState...onnectedState)Description
TRUEnever evaluated
FALSEevaluated 1079 times by 20 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QNetworkInterface
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qtextstream - unknown status
  • tst_qxmlsimplereader - unknown status
0-1079
1004 QAbstractSocket::UnconnectedState, false);-
1005-
1006 if (timedOut)
timedOutDescription
TRUEevaluated 1072 times by 18 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QNetworkInterface
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qtextstream - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 7 times by 2 tests
Evaluated by:
  • tst_platformsocketengine - unknown status
  • tst_qsocketnotifier - unknown status
7-1072
1007 *timedOut = false;
executed 1072 times by 18 tests: *timedOut = false;
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QNetworkInterface
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qtextstream - unknown status
  • tst_qxmlsimplereader - unknown status
1072
1008-
1009 int ret = d->nativeSelect(msecs, false);-
1010 // On Windows, the socket is in connected state if a call to-
1011 // select(writable) is successful. In this case we should not-
1012 // issue a second call to WSAConnect()-
1013#if defined (Q_OS_WIN)-
1014 if (ret > 0) {-
1015 setState(QAbstractSocket::ConnectedState);-
1016 d_func()->fetchConnectionParameters();-
1017 return true;-
1018 } else {-
1019 int value = 0;-
1020 int valueSize = sizeof(value);-
1021 if (::getsockopt(d->socketDescriptor, SOL_SOCKET, SO_ERROR, (char *) &value, &valueSize) == 0) {-
1022 if (value == WSAECONNREFUSED) {-
1023 d->setError(QAbstractSocket::ConnectionRefusedError, QNativeSocketEnginePrivate::ConnectionRefusedErrorString);-
1024 d->socketState = QAbstractSocket::UnconnectedState;-
1025 return false;-
1026 } else if (value == WSAETIMEDOUT) {-
1027 d->setError(QAbstractSocket::NetworkError, QNativeSocketEnginePrivate::ConnectionTimeOutErrorString);-
1028 d->socketState = QAbstractSocket::UnconnectedState;-
1029 return false;-
1030 } else if (value == WSAEHOSTUNREACH) {-
1031 d->setError(QAbstractSocket::NetworkError, QNativeSocketEnginePrivate::HostUnreachableErrorString);-
1032 d->socketState = QAbstractSocket::UnconnectedState;-
1033 return false;-
1034 }-
1035 }-
1036 }-
1037#endif-
1038-
1039 if (ret == 0) {
ret == 0Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qtcpsocket - unknown status
FALSEevaluated 1075 times by 20 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QNetworkInterface
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qtextstream - unknown status
  • tst_qxmlsimplereader - unknown status
4-1075
1040 if (timedOut)
timedOutDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
0-4
1041 *timedOut = true;
executed 4 times by 1 test: *timedOut = true;
Executed by:
  • tst_qtcpsocket - unknown status
4
1042 d->setError(QAbstractSocket::SocketTimeoutError,-
1043 QNativeSocketEnginePrivate::TimeOutErrorString);-
1044 d->hasSetSocketError = false; // A timeout error is temporary in waitFor functions-
1045 return false;
executed 4 times by 1 test: return false;
Executed by:
  • tst_qtcpsocket - unknown status
4
1046 } else if (state() == QAbstractSocket::ConnectingState || (state() == QAbstractSocket::BoundState && d->socketDescriptor != -1)) {
state() == QAb...onnectingStateDescription
TRUEevaluated 1075 times by 20 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QNetworkInterface
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qtextstream - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
state() == QAb...et::BoundStateDescription
TRUEnever evaluated
FALSEnever evaluated
d->socketDescriptor != -1Description
TRUEnever evaluated
FALSEnever evaluated
0-1075
1047 connectToHost(d->peerAddress, d->peerPort);-
1048 }
executed 1075 times by 20 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QNetworkInterface
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qtextstream - unknown status
  • tst_qxmlsimplereader - unknown status
1075
1049-
1050 return ret > 0;
executed 1075 times by 20 tests: return ret > 0;
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QNetworkInterface
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qtextstream - unknown status
  • tst_qxmlsimplereader - unknown status
1075
1051}-
1052-
1053bool QNativeSocketEngine::waitForReadOrWrite(bool *readyToRead, bool *readyToWrite,-
1054 bool checkRead, bool checkWrite,-
1055 int msecs, bool *timedOut)-
1056{-
1057 Q_D(QNativeSocketEngine);-
1058 Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::waitForWrite(), false);
never executed: return false;
!isValid()Description
TRUEnever evaluated
FALSEevaluated 14688 times by 21 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QNetworkInterface
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qtextstream - unknown status
  • tst_qxmlsimplereader - unknown status
0-14688
1059 Q_CHECK_NOT_STATE(QNativeSocketEngine::waitForReadOrWrite(),
never executed: return (false);
d->socketState...onnectedState)Description
TRUEnever evaluated
FALSEevaluated 14688 times by 21 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QNetworkInterface
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qtextstream - unknown status
  • tst_qxmlsimplereader - unknown status
0-14688
1060 QAbstractSocket::UnconnectedState, false);-
1061-
1062 int ret = d->nativeSelect(msecs, checkRead, checkWrite, readyToRead, readyToWrite);-
1063 // On Windows, the socket is in connected state if a call to-
1064 // select(writable) is successful. In this case we should not-
1065 // issue a second call to WSAConnect()-
1066#if defined (Q_OS_WIN)-
1067 if (checkWrite && ((readyToWrite && *readyToWrite) || !readyToWrite) && ret > 0) {-
1068 setState(QAbstractSocket::ConnectedState);-
1069 d_func()->fetchConnectionParameters();-
1070 return true;-
1071 } else {-
1072 int value = 0;-
1073 int valueSize = sizeof(value);-
1074 if (::getsockopt(d->socketDescriptor, SOL_SOCKET, SO_ERROR, (char *) &value, &valueSize) == 0) {-
1075 if (value == WSAECONNREFUSED) {-
1076 d->setError(QAbstractSocket::ConnectionRefusedError, QNativeSocketEnginePrivate::ConnectionRefusedErrorString);-
1077 d->socketState = QAbstractSocket::UnconnectedState;-
1078 return false;-
1079 } else if (value == WSAETIMEDOUT) {-
1080 d->setError(QAbstractSocket::NetworkError, QNativeSocketEnginePrivate::ConnectionTimeOutErrorString);-
1081 d->socketState = QAbstractSocket::UnconnectedState;-
1082 return false;-
1083 } else if (value == WSAEHOSTUNREACH) {-
1084 d->setError(QAbstractSocket::NetworkError, QNativeSocketEnginePrivate::HostUnreachableErrorString);-
1085 d->socketState = QAbstractSocket::UnconnectedState;-
1086 return false;-
1087 }-
1088 }-
1089 }-
1090#endif-
1091 if (ret == 0) {
ret == 0Description
TRUEevaluated 100 times by 9 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_qlocalsocket - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 14588 times by 21 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QNetworkInterface
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qtextstream - unknown status
  • tst_qxmlsimplereader - unknown status
100-14588
1092 if (timedOut)
timedOutDescription
TRUEnever evaluated
FALSEevaluated 100 times by 9 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_qlocalsocket - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
0-100
1093 *timedOut = true;
never executed: *timedOut = true;
0
1094 d->setError(QAbstractSocket::SocketTimeoutError,-
1095 QNativeSocketEnginePrivate::TimeOutErrorString);-
1096 d->hasSetSocketError = false; // A timeout error is temporary in waitFor functions-
1097 return false;
executed 100 times by 9 tests: return false;
Executed by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_qlocalsocket - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
100
1098 } else if (state() == QAbstractSocket::ConnectingState) {
state() == QAb...onnectingStateDescription
TRUEnever evaluated
FALSEevaluated 14588 times by 21 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QNetworkInterface
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qtextstream - unknown status
  • tst_qxmlsimplereader - unknown status
0-14588
1099 connectToHost(d->peerAddress, d->peerPort);-
1100 }
never executed: end of block
0
1101-
1102 return ret > 0;
executed 14588 times by 21 tests: return ret > 0;
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QNetworkInterface
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qtextstream - unknown status
  • tst_qxmlsimplereader - unknown status
14588
1103}-
1104-
1105/*!-
1106 Returns the size of the operating system's socket receive-
1107 buffer. Depending on the operating system, this size may be-
1108 different from what has been set earlier with-
1109 setReceiveBufferSize().-
1110*/-
1111qint64 QNativeSocketEngine::receiveBufferSize() const-
1112{-
1113 Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::receiveBufferSize(), -1);
never executed: return -1;
!isValid()Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_platformsocketengine - unknown status
0-2
1114 return option(ReceiveBufferSocketOption);
executed 2 times by 1 test: return option(ReceiveBufferSocketOption);
Executed by:
  • tst_platformsocketengine - unknown status
2
1115}-
1116-
1117/*!-
1118 Sets the size of the operating system receive buffer to \a size.-
1119-
1120 For clients, this should be set before connectToHost() is called;-
1121 otherwise it will have no effect. For servers, it should be called-
1122 before listen().-
1123-
1124 The operating system receive buffer size effectively limits two-
1125 things: how much data can be in transit at any one moment, and how-
1126 much data can be received in one iteration of the main event loop.-
1127 Setting the size of the receive buffer may have an impact on the-
1128 socket's performance.-
1129-
1130 The default value is operating system-dependent.-
1131*/-
1132void QNativeSocketEngine::setReceiveBufferSize(qint64 size)-
1133{-
1134 Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::setReceiveBufferSize(), Q_VOID);
never executed: return ;
!isValid()Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_platformsocketengine - unknown status
0-1
1135 setOption(ReceiveBufferSocketOption, size);-
1136}
executed 1 time by 1 test: end of block
Executed by:
  • tst_platformsocketengine - unknown status
1
1137-
1138/*!-
1139 Returns the size of the operating system send buffer. Depending on-
1140 the operating system, this size may be different from what has-
1141 been set earlier with setSendBufferSize().-
1142*/-
1143qint64 QNativeSocketEngine::sendBufferSize() const-
1144{-
1145 Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::setSendBufferSize(), -1);
never executed: return -1;
!isValid()Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_platformsocketengine - unknown status
0-2
1146 return option(SendBufferSocketOption);
executed 2 times by 1 test: return option(SendBufferSocketOption);
Executed by:
  • tst_platformsocketengine - unknown status
2
1147}-
1148-
1149/*!-
1150 Sets the size of the operating system send buffer to \a size.-
1151-
1152 The operating system send buffer size effectively limits how much-
1153 data can be in transit at any one moment. Setting the size of the-
1154 send buffer may have an impact on the socket's performance.-
1155-
1156 The default value is operating system-dependent.-
1157*/-
1158void QNativeSocketEngine::setSendBufferSize(qint64 size)-
1159{-
1160 Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::setSendBufferSize(), Q_VOID);
never executed: return ;
!isValid()Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_platformsocketengine - unknown status
0-1
1161 setOption(SendBufferSocketOption, size);-
1162}
executed 1 time by 1 test: end of block
Executed by:
  • tst_platformsocketengine - unknown status
1
1163-
1164-
1165/*!-
1166 Sets the option \a option to the value \a value.-
1167*/-
1168bool QNativeSocketEngine::setOption(SocketOption option, int value)-
1169{-
1170 Q_D(QNativeSocketEngine);-
1171 return d->setOption(option, value);
executed 73774 times by 31 tests: return d->setOption(option, value);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_platformsocketengine - unknown status
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • ...
73774
1172}-
1173-
1174/*!-
1175 Returns the value of the option \a socketOption.-
1176*/-
1177int QNativeSocketEngine::option(SocketOption socketOption) const-
1178{-
1179 Q_D(const QNativeSocketEngine);-
1180 return d->option(socketOption);
executed 41 times by 3 tests: return d->option(socketOption);
Executed by:
  • tst_QUdpSocket
  • tst_platformsocketengine - unknown status
  • tst_qtcpsocket - unknown status
41
1181}-
1182-
1183bool QNativeSocketEngine::isReadNotificationEnabled() const-
1184{-
1185 Q_D(const QNativeSocketEngine);-
1186 return d->readNotifier && d->readNotifier->isEnabled();
executed 167173 times by 27 tests: return d->readNotifier && d->readNotifier->isEnabled();
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • ...
167173
1187}-
1188-
1189/*-
1190 \internal-
1191 \class QReadNotifier-
1192 \brief The QReadNotifer class is used to improve performance.-
1193-
1194 QReadNotifier is a private class used for performance reasons vs-
1195 connecting to the QSocketNotifier activated() signal.-
1196 */-
1197class QReadNotifier : public QSocketNotifier-
1198{-
1199public:-
1200 QReadNotifier(qintptr fd, QNativeSocketEngine *parent)-
1201 : QSocketNotifier(fd, QSocketNotifier::Read, parent)-
1202 { engine = parent; }
executed 5141 times by 30 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • ...
5141
1203-
1204protected:-
1205 bool event(QEvent *);-
1206-
1207 QNativeSocketEngine *engine;-
1208};-
1209-
1210bool QReadNotifier::event(QEvent *e)-
1211{-
1212 if (e->type() == QEvent::SockAct) {
e->type() == QEvent::SockActDescription
TRUEevaluated 23099 times by 21 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 28 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qobject - unknown status
  • tst_qtcpsocket - unknown status
28-23099
1213 engine->readNotification();-
1214 return true;
executed 23098 times by 21 tests: return true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
23098
1215 } else if (e->type() == QEvent::SockClose) {
e->type() == QEvent::SockCloseDescription
TRUEnever evaluated
FALSEevaluated 28 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qobject - unknown status
  • tst_qtcpsocket - unknown status
0-28
1216 engine->closeNotification();-
1217 return true;
never executed: return true;
0
1218 }-
1219 return QSocketNotifier::event(e);
executed 28 times by 3 tests: return QSocketNotifier::event(e);
Executed by:
  • tst_QNetworkReply
  • tst_qobject - unknown status
  • tst_qtcpsocket - unknown status
28
1220}-
1221-
1222/*-
1223 \internal-
1224 \class QWriteNotifier-
1225 \brief The QWriteNotifer class is used to improve performance.-
1226-
1227 QWriteNotifier is a private class used for performance reasons vs-
1228 connecting to the QSocketNotifier activated() signal.-
1229 */-
1230class QWriteNotifier : public QSocketNotifier-
1231{-
1232public:-
1233 QWriteNotifier(int fd, QNativeSocketEngine *parent)-
1234 : QSocketNotifier(fd, QSocketNotifier::Write, parent) { engine = parent; }
executed 4268 times by 28 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
4268
1235-
1236protected:-
1237 bool event(QEvent *);-
1238-
1239 QNativeSocketEngine *engine;-
1240};-
1241-
1242bool QWriteNotifier::event(QEvent *e)-
1243{-
1244 if (e->type() == QEvent::SockAct) {
e->type() == QEvent::SockActDescription
TRUEevaluated 13073 times by 21 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 12 times by 2 tests
Evaluated by:
  • tst_qobject - unknown status
  • tst_qtcpsocket - unknown status
12-13073
1245 if (engine->state() == QAbstractSocket::ConnectingState)
engine->state(...onnectingStateDescription
TRUEevaluated 2553 times by 16 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 10520 times by 20 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
2553-10520
1246 engine->connectionNotification();
executed 2553 times by 16 tests: engine->connectionNotification();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
2553
1247 else-
1248 engine->writeNotification();
executed 10520 times by 20 tests: engine->writeNotification();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
10520
1249 return true;
executed 13073 times by 21 tests: return true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
13073
1250 }-
1251 return QSocketNotifier::event(e);
executed 12 times by 2 tests: return QSocketNotifier::event(e);
Executed by:
  • tst_qobject - unknown status
  • tst_qtcpsocket - unknown status
12
1252}-
1253-
1254class QExceptionNotifier : public QSocketNotifier-
1255{-
1256public:-
1257 QExceptionNotifier(int fd, QNativeSocketEngine *parent)-
1258 : QSocketNotifier(fd, QSocketNotifier::Exception, parent) { engine = parent; }
never executed: end of block
0
1259-
1260protected:-
1261 bool event(QEvent *);-
1262-
1263 QNativeSocketEngine *engine;-
1264};-
1265-
1266bool QExceptionNotifier::event(QEvent *e)-
1267{-
1268 if (e->type() == QEvent::SockAct) {
e->type() == QEvent::SockActDescription
TRUEnever evaluated
FALSEnever evaluated
0
1269 if (engine->state() == QAbstractSocket::ConnectingState)
engine->state(...onnectingStateDescription
TRUEnever evaluated
FALSEnever evaluated
0
1270 engine->connectionNotification();
never executed: engine->connectionNotification();
0
1271 else-
1272 engine->exceptionNotification();
never executed: engine->exceptionNotification();
0
1273 return true;
never executed: return true;
0
1274 }-
1275 return QSocketNotifier::event(e);
never executed: return QSocketNotifier::event(e);
0
1276}-
1277-
1278void QNativeSocketEngine::setReadNotificationEnabled(bool enable)-
1279{-
1280 Q_D(QNativeSocketEngine);-
1281 if (d->readNotifier) {
d->readNotifierDescription
TRUEevaluated 662927 times by 29 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
FALSEevaluated 5770 times by 30 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • ...
5770-662927
1282 d->readNotifier->setEnabled(enable);-
1283 } else if (enable && d->threadData->hasEventDispatcher()) {
executed 662927 times by 29 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
enableDescription
TRUEevaluated 5171 times by 30 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • ...
FALSEevaluated 599 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qobject - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
d->threadData-...ntDispatcher()Description
TRUEevaluated 5141 times by 30 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • ...
FALSEevaluated 30 times by 1 test
Evaluated by:
  • tst_qtcpsocket - unknown status
30-662927
1284 d->readNotifier = new QReadNotifier(d->socketDescriptor, this);-
1285 d->readNotifier->setEnabled(true);-
1286 }
executed 5141 times by 30 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • ...
5141
1287}
executed 668697 times by 31 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • ...
668697
1288-
1289bool QNativeSocketEngine::isWriteNotificationEnabled() const-
1290{-
1291 Q_D(const QNativeSocketEngine);-
1292 return d->writeNotifier && d->writeNotifier->isEnabled();
executed 17159 times by 21 tests: return d->writeNotifier && d->writeNotifier->isEnabled();
Executed by:
  • tst_NetworkSelfTest
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
17159
1293}-
1294-
1295void QNativeSocketEngine::setWriteNotificationEnabled(bool enable)-
1296{-
1297 Q_D(QNativeSocketEngine);-
1298 if (d->writeNotifier) {
d->writeNotifierDescription
TRUEevaluated 58468 times by 28 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
FALSEevaluated 4296 times by 28 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
4296-58468
1299 d->writeNotifier->setEnabled(enable);-
1300 } else if (enable && d->threadData->hasEventDispatcher()) {
executed 58468 times by 28 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
enableDescription
TRUEevaluated 4288 times by 28 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qtcpsocket - unknown status
d->threadData-...ntDispatcher()Description
TRUEevaluated 4268 times by 28 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
FALSEevaluated 20 times by 1 test
Evaluated by:
  • tst_qtcpsocket - unknown status
8-58468
1301 d->writeNotifier = new QWriteNotifier(d->socketDescriptor, this);-
1302 d->writeNotifier->setEnabled(true);-
1303 }
executed 4268 times by 28 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
4268
1304}
executed 62764 times by 28 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
62764
1305-
1306bool QNativeSocketEngine::isExceptionNotificationEnabled() const-
1307{-
1308 Q_D(const QNativeSocketEngine);-
1309 return d->exceptNotifier && d->exceptNotifier->isEnabled();
executed 223 times by 4 tests: return d->exceptNotifier && d->exceptNotifier->isEnabled();
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
223
1310}-
1311-
1312void QNativeSocketEngine::setExceptionNotificationEnabled(bool enable)-
1313{-
1314 Q_D(QNativeSocketEngine);-
1315 if (d->exceptNotifier) {
d->exceptNotifierDescription
TRUEnever evaluated
FALSEevaluated 446 times by 4 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
0-446
1316 d->exceptNotifier->setEnabled(enable);-
1317 } else if (enable && d->threadData->hasEventDispatcher()) {
never executed: end of block
enableDescription
TRUEnever evaluated
FALSEevaluated 446 times by 4 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
d->threadData-...ntDispatcher()Description
TRUEnever evaluated
FALSEnever evaluated
0-446
1318 d->exceptNotifier = new QExceptionNotifier(d->socketDescriptor, this);-
1319 d->exceptNotifier->setEnabled(true);-
1320 }
never executed: end of block
0
1321}
executed 446 times by 4 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
446
1322-
1323QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

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