qhttpnetworkconnectionchannel.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/network/access/qhttpnetworkconnectionchannel.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10-
11-
12-
13-
14-
15-
16-
17-
18-
19static const int reconnectAttemptsDefault = 3;-
20-
21QHttpNetworkConnectionChannel::QHttpNetworkConnectionChannel()-
22 : socket(0)-
23 , ssl(false)-
24 , isInitialized(false)-
25 , state(IdleState)-
26 , reply(0)-
27 , written(0)-
28 , bytesTotal(0)-
29 , resendCurrent(false)-
30 , lastStatus(0)-
31 , pendingEncrypt(false)-
32 , reconnectAttempts(reconnectAttemptsDefault)-
33 , authMethod(QAuthenticatorPrivate::None)-
34 , proxyAuthMethod(QAuthenticatorPrivate::None)-
35 , authenticationCredentialsSent(false)-
36 , proxyCredentialsSent(false)-
37 , protocolHandler(0)-
38-
39 , ignoreAllSslErrors(false)-
40-
41 , pipeliningSupported(PipeliningSupportUnknown)-
42 , networkLayerPreference(QAbstractSocket::AnyIPProtocol)-
43 , connection(0)-
44{-
45-
46-
47}
executed 3416 times by 8 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
3416
48-
49void QHttpNetworkConnectionChannel::init()-
50{-
51-
52 if (connection->d_func()->encrypt
connection->d_func()->encryptDescription
TRUEevaluated 108 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 646 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
)
108-646
53 socket = new QSslSocket;
executed 108 times by 3 tests: socket = new QSslSocket;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
108
54 else-
55 socket = new QTcpSocket;
executed 646 times by 8 tests: socket = new QTcpSocket;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
646
56-
57-
58-
59-
60-
61 if (networkSession
networkSessionDescription
TRUEevaluated 710 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
FALSEevaluated 44 times by 1 test
Evaluated by:
  • tst_QHttpNetworkConnection
)
44-710
62 socket->setProperty("_q_networksession", QVariant::fromValue(networkSession));
executed 710 times by 8 tests: socket->setProperty("_q_networksession", QVariant::fromValue(networkSession));
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
710
63-
64-
65-
66 socket->setProxy(QNetworkProxy::NoProxy);-
67-
68-
69-
70-
71-
72 QObject::connect(socket, qFlagLocation("2""bytesWritten(qint64)" "\0" __FILE__ ":" "123"),-
73 this, qFlagLocation("1""_q_bytesWritten(qint64)" "\0" __FILE__ ":" "124"),-
74 Qt::DirectConnection);-
75 QObject::connect(socket, qFlagLocation("2""connected()" "\0" __FILE__ ":" "126"),-
76 this, qFlagLocation("1""_q_connected()" "\0" __FILE__ ":" "127"),-
77 Qt::DirectConnection);-
78 QObject::connect(socket, qFlagLocation("2""readyRead()" "\0" __FILE__ ":" "129"),-
79 this, qFlagLocation("1""_q_readyRead()" "\0" __FILE__ ":" "130"),-
80 Qt::DirectConnection);-
81-
82-
83-
84-
85-
86-
87-
88 qRegisterMetaType<QAbstractSocket::SocketError>();-
89 QObject::connect(socket, qFlagLocation("2""disconnected()" "\0" __FILE__ ":" "140"),-
90 this, qFlagLocation("1""_q_disconnected()" "\0" __FILE__ ":" "141"),-
91 Qt::DirectConnection);-
92 QObject::connect(socket, qFlagLocation("2""error(QAbstractSocket::SocketError)" "\0" __FILE__ ":" "143"),-
93 this, qFlagLocation("1""_q_error(QAbstractSocket::SocketError)" "\0" __FILE__ ":" "144"),-
94 Qt::DirectConnection);-
95-
96-
97-
98 QObject::connect(socket, qFlagLocation("2""proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)" "\0" __FILE__ ":" "149"),-
99 this, qFlagLocation("1""_q_proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)" "\0" __FILE__ ":" "150"),-
100 Qt::DirectConnection);-
101-
102-
103-
104 QSslSocket *sslSocket = qobject_cast<QSslSocket*>(socket);-
105 if (sslSocket
sslSocketDescription
TRUEevaluated 108 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 646 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
) {
108-646
106-
107 QObject::connect(sslSocket, qFlagLocation("2""encrypted()" "\0" __FILE__ ":" "158"),-
108 this, qFlagLocation("1""_q_encrypted()" "\0" __FILE__ ":" "159"),-
109 Qt::DirectConnection);-
110 QObject::connect(sslSocket, qFlagLocation("2""sslErrors(QList<QSslError>)" "\0" __FILE__ ":" "161"),-
111 this, qFlagLocation("1""_q_sslErrors(QList<QSslError>)" "\0" __FILE__ ":" "162"),-
112 Qt::DirectConnection);-
113 QObject::connect(sslSocket, qFlagLocation("2""preSharedKeyAuthenticationRequired(QSslPreSharedKeyAuthenticator*)" "\0" __FILE__ ":" "164"),-
114 this, qFlagLocation("1""_q_preSharedKeyAuthenticationRequired(QSslPreSharedKeyAuthenticator*)" "\0" __FILE__ ":" "165"),-
115 Qt::DirectConnection);-
116 QObject::connect(sslSocket, qFlagLocation("2""encryptedBytesWritten(qint64)" "\0" __FILE__ ":" "167"),-
117 this, qFlagLocation("1""_q_encryptedBytesWritten(qint64)" "\0" __FILE__ ":" "168"),-
118 Qt::DirectConnection);-
119-
120 if (ignoreAllSslErrors
ignoreAllSslErrorsDescription
TRUEevaluated 11 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEevaluated 97 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
)
11-97
121 sslSocket->ignoreSslErrors();
executed 11 times by 2 tests: sslSocket->ignoreSslErrors();
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
11
122-
123 if (!ignoreSslErrorsList.isEmpty()
!ignoreSslErrorsList.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 108 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
)
0-108
124 sslSocket->ignoreSslErrors(ignoreSslErrorsList);
never executed: sslSocket->ignoreSslErrors(ignoreSslErrorsList);
0
125-
126 if (!sslConfiguration.isNull()
!sslConfiguration.isNull()Description
TRUEevaluated 59 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 49 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
)
49-59
127 sslSocket->setSslConfiguration(sslConfiguration);
executed 59 times by 2 tests: sslSocket->setSslConfiguration(sslConfiguration);
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
59
128 }
executed 108 times by 3 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
else {
108
129-
130 protocolHandler.reset(new QHttpProtocolHandler(this));-
131-
132 }
executed 646 times by 8 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
646
133-
134-
135-
136 if (proxy.type() != QNetworkProxy::NoProxy
proxy.type() !...Proxy::NoProxyDescription
TRUEevaluated 101 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 653 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
)
101-653
137 socket->setProxy(proxy);
executed 101 times by 3 tests: socket->setProxy(proxy);
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
101
138-
139 isInitialized = true;-
140}
executed 754 times by 8 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
754
141-
142-
143void QHttpNetworkConnectionChannel::close()-
144{-
145 if (!socket
!socketDescription
TRUEevaluated 4 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 406 times by 5 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
)
4-406
146 state = QHttpNetworkConnectionChannel::IdleState;
executed 4 times by 3 tests: state = QHttpNetworkConnectionChannel::IdleState;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
4
147 else if (socket->state() == QAbstractSocket::UnconnectedState
socket->state(...connectedStateDescription
TRUEevaluated 182 times by 4 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 224 times by 4 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
)
182-224
148 state = QHttpNetworkConnectionChannel::IdleState;
executed 182 times by 4 tests: state = QHttpNetworkConnectionChannel::IdleState;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
182
149 else-
150 state = QHttpNetworkConnectionChannel::ClosingState;
executed 224 times by 4 tests: state = QHttpNetworkConnectionChannel::ClosingState;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
224
151-
152-
153 pendingEncrypt = false;-
154-
155 if (socket
socketDescription
TRUEevaluated 406 times by 5 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
FALSEevaluated 4 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
) {
4-406
156-
157-
158 socket->close();-
159 }
executed 405 times by 5 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
405
160}
executed 409 times by 5 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
409
161-
162-
163void QHttpNetworkConnectionChannel::abort()-
164{-
165 if (!socket
!socketDescription
TRUEnever evaluated
FALSEevaluated 13 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
0-13
166 state = QHttpNetworkConnectionChannel::IdleState;
never executed: state = QHttpNetworkConnectionChannel::IdleState;
0
167 else if (socket->state() == QAbstractSocket::UnconnectedState
socket->state(...connectedStateDescription
TRUEnever evaluated
FALSEevaluated 13 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
0-13
168 state = QHttpNetworkConnectionChannel::IdleState;
never executed: state = QHttpNetworkConnectionChannel::IdleState;
0
169 else-
170 state = QHttpNetworkConnectionChannel::ClosingState;
executed 13 times by 1 test: state = QHttpNetworkConnectionChannel::ClosingState;
Executed by:
  • tst_QNetworkReply
13
171-
172-
173 pendingEncrypt = false;-
174-
175 if (socket
socketDescription
TRUEevaluated 13 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
) {
0-13
176-
177-
178 socket->abort();-
179 }
executed 13 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
13
180}
executed 13 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
13
181-
182-
183bool QHttpNetworkConnectionChannel::sendRequest()-
184{-
185 ((!(!protocolHandler.isNull())) ? qt_assert("!protocolHandler.isNull()",__FILE__,236) : qt_noop());-
186 return
executed 4643 times by 8 tests: return protocolHandler->sendRequest();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
protocolHandler->sendRequest();
executed 4643 times by 8 tests: return protocolHandler->sendRequest();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
4643
187}-
188-
189-
190void QHttpNetworkConnectionChannel::_q_receiveReply()-
191{-
192 ((!(!protocolHandler.isNull())) ? qt_assert("!protocolHandler.isNull()",__FILE__,243) : qt_noop());-
193 protocolHandler->_q_receiveReply();-
194}
executed 202 times by 2 tests: end of block
Executed by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
202
195-
196void QHttpNetworkConnectionChannel::_q_readyRead()-
197{-
198 ((!(!protocolHandler.isNull())) ? qt_assert("!protocolHandler.isNull()",__FILE__,249) : qt_noop());-
199 protocolHandler->_q_readyRead();-
200}
executed 11090 times by 7 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
11090
201-
202-
203void QHttpNetworkConnectionChannel::handleUnexpectedEOF()-
204{-
205 ((!(reply)) ? qt_assert("reply",__FILE__,256) : qt_noop());-
206 if (reconnectAttempts <= 0
reconnectAttempts <= 0Description
TRUEevaluated 27 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEevaluated 65 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
) {
27-65
207-
208 requeueCurrentlyPipelinedRequests();-
209 close();-
210 reply->d_func()->errorString = connection->d_func()->errorDetail(QNetworkReply::RemoteHostClosedError, socket);-
211 reply->finishedWithError(QNetworkReply::RemoteHostClosedError, reply->d_func()->errorString);-
212 reply = 0;-
213 if (protocolHandler
protocolHandlerDescription
TRUEevaluated 27 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEnever evaluated
)
0-27
214 protocolHandler->setReply(0);
executed 27 times by 2 tests: protocolHandler->setReply(0);
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
27
215 request = QHttpNetworkRequest();-
216 QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);-
217 }
executed 27 times by 2 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
else {
27
218 reconnectAttempts--;-
219 reply->d_func()->clear();-
220 reply->d_func()->connection = connection;-
221 reply->d_func()->connectionChannel = this;-
222 closeAndResendCurrentRequest();-
223 }
executed 65 times by 2 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
65
224}-
225-
226bool QHttpNetworkConnectionChannel::ensureConnection()-
227{-
228 if (!isInitialized
!isInitializedDescription
TRUEevaluated 754 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
FALSEevaluated 1600 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
)
754-1600
229 init();
executed 754 times by 8 tests: init();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
754
230-
231 QAbstractSocket::SocketState socketState = socket->state();-
232-
233-
234-
235-
236-
237-
238 if (socketState == QAbstractSocket::ClosingState
socketState ==...::ClosingStateDescription
TRUEnever evaluated
FALSEevaluated 2354 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
||
0-2354
239 (socketState != QAbstractSocket::UnconnectedState
socketState !=...connectedStateDescription
TRUEevaluated 1432 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
FALSEevaluated 922 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
&& !socket->isOpen()
!socket->isOpen()Description
TRUEnever evaluated
FALSEevaluated 1432 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
)) {
0-1432
240 if (reply
replyDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
241 resendCurrent = true;
never executed: resendCurrent = true;
0
242 return
never executed: return false;
false;
never executed: return false;
0
243 }-
244-
245-
246 if (socketState == QAbstractSocket::HostLookupState
socketState ==...ostLookupStateDescription
TRUEnever evaluated
FALSEevaluated 2354 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
||
0-2354
247 socketState == QAbstractSocket::ConnectingState
socketState ==...onnectingStateDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_Spdy
FALSEevaluated 2351 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
) {
3-2351
248 return
executed 3 times by 1 test: return false;
Executed by:
  • tst_Spdy
false;
executed 3 times by 1 test: return false;
Executed by:
  • tst_Spdy
3
249 }-
250-
251-
252-
253 if (socketState != QAbstractSocket::ConnectedState
socketState !=...ConnectedStateDescription
TRUEevaluated 922 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
FALSEevaluated 1429 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
) {
922-1429
254-
255 state = QHttpNetworkConnectionChannel::ConnectingState;-
256 pendingEncrypt = ssl;-
257-
258-
259 pipeliningSupported = PipeliningSupportUnknown;-
260 authenticationCredentialsSent = false;-
261 proxyCredentialsSent = false;-
262 authenticator.detach();-
263 QAuthenticatorPrivate *priv = QAuthenticatorPrivate::getPrivate(authenticator);-
264 priv->hasFailed = false;-
265 proxyAuthenticator.detach();-
266 priv = QAuthenticatorPrivate::getPrivate(proxyAuthenticator);-
267 priv->hasFailed = false;-
268-
269-
270-
271-
272-
273-
274-
275 priv = QAuthenticatorPrivate::getPrivate(authenticator);-
276 if (priv
privDescription
TRUEevaluated 922 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
FALSEnever evaluated
&& priv->phase == QAuthenticatorPrivate::Done
priv->phase ==...rPrivate::DoneDescription
TRUEnever evaluated
FALSEevaluated 922 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
)
0-922
277 priv->phase = QAuthenticatorPrivate::Start;
never executed: priv->phase = QAuthenticatorPrivate::Start;
0
278 priv = QAuthenticatorPrivate::getPrivate(proxyAuthenticator);-
279 if (priv
privDescription
TRUEevaluated 922 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
FALSEnever evaluated
&& priv->phase == QAuthenticatorPrivate::Done
priv->phase ==...rPrivate::DoneDescription
TRUEnever evaluated
FALSEevaluated 922 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
)
0-922
280 priv->phase = QAuthenticatorPrivate::Start;
never executed: priv->phase = QAuthenticatorPrivate::Start;
0
281-
282 QString connectHost = connection->d_func()->hostName;-
283 quint16 connectPort = connection->d_func()->port;-
284-
285-
286-
287 if (connection->d_func()->networkProxy.type() != QNetworkProxy::NoProxy
connection->d_...Proxy::NoProxyDescription
TRUEevaluated 95 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 827 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
&& !ssl
!sslDescription
TRUEevaluated 95 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
) {
0-827
288 connectHost = connection->d_func()->networkProxy.hostName();-
289 connectPort = connection->d_func()->networkProxy.port();-
290 }
executed 95 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
95
291 if (socket->proxy().type() == QNetworkProxy::HttpProxy
socket->proxy(...oxy::HttpProxyDescription
TRUEevaluated 23 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 899 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
) {
23-899
292-
293 QByteArray value;-
294-
295 if (request.url().isEmpty()
request.url().isEmpty()Description
TRUEevaluated 21 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
2-21
296 value = connection->d_func()->predictNextRequest().headerField("user-agent");
executed 21 times by 2 tests: value = connection->d_func()->predictNextRequest().headerField("user-agent");
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
21
297 else-
298 value = request.headerField("user-agent");
executed 2 times by 1 test: value = request.headerField("user-agent");
Executed by:
  • tst_QNetworkReply
2
299 if (!value.isEmpty()
!value.isEmpty()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 17 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
) {
6-17
300 QNetworkProxy proxy(socket->proxy());-
301 proxy.setRawHeader("User-Agent", value);-
302 socket->setProxy(proxy);-
303 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
6
304 }
executed 23 times by 2 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
23
305-
306 if (ssl
sslDescription
TRUEevaluated 127 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 795 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
) {
127-795
307-
308 QSslSocket *sslSocket = qobject_cast<QSslSocket*>(socket);-
309-
310-
311-
312-
313 if (!connection->sslContext().isNull()
!connection->s...ext().isNull()Description
TRUEevaluated 26 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 101 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
)
26-101
314 QSslSocketPrivate::checkSettingSslContext(sslSocket, connection->sslContext());
executed 26 times by 1 test: QSslSocketPrivate::checkSettingSslContext(sslSocket, connection->sslContext());
Executed by:
  • tst_QNetworkReply
26
315-
316 sslSocket->connectToHostEncrypted(connectHost, connectPort, QIODevice::ReadWrite, networkLayerPreference);-
317 if (ignoreAllSslErrors
ignoreAllSslErrorsDescription
TRUEevaluated 21 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEevaluated 106 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
)
21-106
318 sslSocket->ignoreSslErrors();
executed 21 times by 2 tests: sslSocket->ignoreSslErrors();
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
21
319 sslSocket->ignoreSslErrors(ignoreSslErrorsList);-
320-
321-
322-
323-
324 socket->setReadBufferSize(64*1024);-
325-
326-
327-
328-
329-
330-
331 }
executed 127 times by 3 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
else {
127
332-
333-
334 if (connection->d_func()->networkProxy.type() == QNetworkProxy::NoProxy
connection->d_...Proxy::NoProxyDescription
TRUEevaluated 700 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
FALSEevaluated 95 times by 1 test
Evaluated by:
  • tst_QNetworkReply
95-700
335 && connection->cacheProxy().type() == QNetworkProxy::NoProxy
connection->ca...Proxy::NoProxyDescription
TRUEevaluated 700 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
FALSEnever evaluated
0-700
336 && connection->transparentProxy().type() == QNetworkProxy::NoProxy
connection->tr...Proxy::NoProxyDescription
TRUEevaluated 614 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
FALSEevaluated 86 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
) {
86-614
337-
338 socket->connectToHost(connectHost, connectPort, QIODevice::ReadWrite | QIODevice::Unbuffered, networkLayerPreference);-
339-
340 socket->setReadBufferSize(1*1024);-
341-
342 }
executed 614 times by 8 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
else {
614
343 socket->connectToHost(connectHost, connectPort, QIODevice::ReadWrite, networkLayerPreference);-
344-
345-
346-
347-
348 socket->setReadBufferSize(64*1024);-
349 }
executed 181 times by 2 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
181
350-
351 }-
352 return
executed 922 times by 8 tests: return false;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
false;
executed 922 times by 8 tests: return false;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
922
353 }-
354-
355-
356 if (pendingEncrypt
pendingEncryptDescription
TRUEnever evaluated
FALSEevaluated 1429 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
) {
0-1429
357-
358-
359 return
never executed: return false;
false;
never executed: return false;
0
360 }-
361-
362 return
executed 1429 times by 8 tests: return true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
true;
executed 1429 times by 8 tests: return true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
1429
363}-
364-
365void QHttpNetworkConnectionChannel::allDone()-
366{-
367 ((!(reply)) ? qt_assert("reply",__FILE__,418) : qt_noop());-
368-
369 if (!reply
!replyDescription
TRUEnever evaluated
FALSEevaluated 1762 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
) {
0-1762
370 QMessageLogger(__FILE__, 421, __PRETTY_FUNCTION__).warning("QHttpNetworkConnectionChannel::allDone() called without reply. Please report at http://bugreports.qt.io/");-
371 return;
never executed: return;
0
372 }-
373-
374-
375 bool emitFinished = reply->d_func()->shouldEmitSignals();-
376 bool connectionCloseEnabled = reply->d_func()->isConnectionCloseEnabled();-
377 detectPipeliningSupport();-
378-
379 handleStatus();-
380-
381-
382-
383-
384-
385 if (reply
replyDescription
TRUEevaluated 1760 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QNetworkReply
&& emitFinished
emitFinishedDescription
TRUEevaluated 1405 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 355 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
)
2-1760
386 QMetaObject::invokeMethod(reply, "finished", Qt::QueuedConnection);
executed 1405 times by 7 tests: QMetaObject::invokeMethod(reply, "finished", Qt::QueuedConnection);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
1405
387-
388-
389-
390-
391 reconnectAttempts = reconnectAttemptsDefault;-
392-
393-
394 if (state != QHttpNetworkConnectionChannel::ClosingState
state != QHttp...::ClosingStateDescription
TRUEevaluated 1762 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
)
0-1762
395 state = QHttpNetworkConnectionChannel::IdleState;
executed 1762 times by 7 tests: state = QHttpNetworkConnectionChannel::IdleState;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
1762
396-
397-
398-
399-
400-
401-
402 if (!resendCurrent
!resendCurrentDescription
TRUEevaluated 1437 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 325 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
) {
325-1437
403 request = QHttpNetworkRequest();-
404 reply = 0;-
405 protocolHandler->setReply(0);-
406 }
executed 1437 times by 7 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
1437
407-
408-
409 if (!alreadyPipelinedRequests.isEmpty()
!alreadyPipeli...ests.isEmpty()Description
TRUEevaluated 402 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEevaluated 1360 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
) {
402-1360
410 if (resendCurrent
resendCurrentDescription
TRUEnever evaluated
FALSEevaluated 402 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
|| connectionCloseEnabled
connectionCloseEnabledDescription
TRUEnever evaluated
FALSEevaluated 402 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
|| socket->state() != QAbstractSocket::ConnectedState
socket->state(...ConnectedStateDescription
TRUEnever evaluated
FALSEevaluated 402 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
) {
0-402
411-
412 requeueCurrentlyPipelinedRequests();-
413 close();-
414 }
never executed: end of block
else {
0
415-
416 HttpMessagePair messagePair = alreadyPipelinedRequests.takeFirst();-
417-
418 request = messagePair.first;-
419 reply = messagePair.second;-
420 protocolHandler->setReply(messagePair.second);-
421 state = QHttpNetworkConnectionChannel::ReadingState;-
422 resendCurrent = false;-
423-
424 written = 0;-
425 bytesTotal = 0;-
426-
427-
428 connection->d_func()->fillPipeline(socket);-
429-
430-
431-
432-
433 }
executed 402 times by 2 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
402
434 } else if (alreadyPipelinedRequests.isEmpty()
alreadyPipelin...ests.isEmpty()Description
TRUEevaluated 1360 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
&& socket->bytesAvailable() > 0
socket->bytesAvailable() > 0Description
TRUEnever evaluated
FALSEevaluated 1360 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
) {
0-1360
435-
436 close();-
437-
438 QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);-
439 }
never executed: end of block
else if (alreadyPipelinedRequests.isEmpty()
alreadyPipelin...ests.isEmpty()Description
TRUEevaluated 1360 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
) {
0-1360
440 if (connectionCloseEnabled
connectionCloseEnabledDescription
TRUEevaluated 185 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEevaluated 1175 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
)
185-1175
441 if (socket->state() != QAbstractSocket::UnconnectedState
socket->state(...connectedStateDescription
TRUEevaluated 125 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEevaluated 60 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
60-125
442 close();
executed 125 times by 2 tests: close();
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
125
443 if (qobject_cast<QHttpNetworkConnection*>(connection)
qobject_cast<Q...*>(connection)Description
TRUEevaluated 1360 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
)
0-1360
444 QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);
executed 1360 times by 7 tests: QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
1360
445 }
executed 1360 times by 7 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
1360
446}
executed 1762 times by 7 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
1762
447-
448void QHttpNetworkConnectionChannel::detectPipeliningSupport()-
449{-
450 ((!(reply)) ? qt_assert("reply",__FILE__,501) : qt_noop());-
451-
452 QByteArray serverHeaderField;-
453 if (-
454-
455 (reply->d_func()->majorVersion == 1
reply->d_func(...orVersion == 1Description
TRUEevaluated 1762 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
&& reply->d_func()->minorVersion == 1
reply->d_func(...orVersion == 1Description
TRUEevaluated 1521 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 241 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
0-1762
456-
457 && (
(!reply->d_fun...loseEnabled())Description
TRUEevaluated 1517 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
!reply->d_func()->isConnectionCloseEnabled())
(!reply->d_fun...loseEnabled())Description
TRUEevaluated 1517 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
4-1517
458-
459 && (
(socket->state...onnectedState)Description
TRUEevaluated 1507 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_QNetworkReply
socket->state() == QAbstractSocket::ConnectedState)
(socket->state...onnectedState)Description
TRUEevaluated 1507 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_QNetworkReply
10-1507
460-
461-
462 && (
(serverHeaderF...soft-IIS/4."))Description
TRUEevaluated 1507 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
serverHeaderField = reply->headerField("Server"), !serverHeaderField.contains("Microsoft-IIS/4."))
(serverHeaderF...soft-IIS/4."))Description
TRUEevaluated 1507 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
0-1507
463 && (
(!serverHeader...soft-IIS/5."))Description
TRUEevaluated 1507 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
!serverHeaderField.contains("Microsoft-IIS/5."))
(!serverHeader...soft-IIS/5."))Description
TRUEevaluated 1507 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
0-1507
464 && (
(!serverHeader...terprise/3."))Description
TRUEevaluated 1507 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
!serverHeaderField.contains("Netscape-Enterprise/3."))
(!serverHeader...terprise/3."))Description
TRUEevaluated 1507 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
0-1507
465-
466 && (
(!serverHeader...s("WebLogic"))Description
TRUEevaluated 1507 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
!serverHeaderField.contains("WebLogic"))
(!serverHeader...s("WebLogic"))Description
TRUEevaluated 1507 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
0-1507
467 && (
(!serverHeader...ith("Rocket"))Description
TRUEevaluated 1507 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
!serverHeaderField.startsWith("Rocket"))
(!serverHeader...ith("Rocket"))Description
TRUEevaluated 1507 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
0-1507
468 ) {-
469 pipeliningSupported = QHttpNetworkConnectionChannel::PipeliningProbablySupported;-
470 }
executed 1507 times by 7 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
else {
1507
471 pipeliningSupported = QHttpNetworkConnectionChannel::PipeliningSupportUnknown;-
472 }
executed 255 times by 2 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
255
473}-
474-
475-
476void QHttpNetworkConnectionChannel::requeueCurrentlyPipelinedRequests()-
477{-
478 for (int i = 0; i < alreadyPipelinedRequests.length()
i < alreadyPip...uests.length()Description
TRUEnever evaluated
FALSEevaluated 136 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
; i++)
0-136
479 connection->d_func()->requeueRequest(alreadyPipelinedRequests.at(i));
never executed: connection->d_func()->requeueRequest(alreadyPipelinedRequests.at(i));
0
480 alreadyPipelinedRequests.clear();-
481-
482-
483-
484-
485 if (qobject_cast<QHttpNetworkConnection*>(connection)
qobject_cast<Q...*>(connection)Description
TRUEevaluated 136 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
FALSEnever evaluated
)
0-136
486 QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);
executed 136 times by 3 tests: QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
136
487}
executed 136 times by 3 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
136
488-
489void QHttpNetworkConnectionChannel::handleStatus()-
490{-
491 ((!(socket)) ? qt_assert("socket",__FILE__,542) : qt_noop());-
492 ((!(reply)) ? qt_assert("reply",__FILE__,543) : qt_noop());-
493-
494 int statusCode = reply->statusCode();-
495 bool resend = false;-
496-
497 switch (statusCode) {-
498 case
executed 3 times by 1 test: case 301:
Executed by:
  • tst_QNetworkProxyFactory
301:
executed 3 times by 1 test: case 301:
Executed by:
  • tst_QNetworkProxyFactory
3
499 case
never executed: case 302:
302:
never executed: case 302:
0
500 case
never executed: case 303:
303:
never executed: case 303:
0
501 case
never executed: case 305:
305:
never executed: case 305:
0
502 case
executed 6 times by 1 test: case 307:
Executed by:
  • tst_QNetworkReply
307:
executed 6 times by 1 test: case 307:
Executed by:
  • tst_QNetworkReply
{
6
503-
504 QUrl redirectUrl = connection->d_func()->parseRedirectResponse(socket, reply);-
505 if (redirectUrl.isValid()
redirectUrl.isValid()Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
)
4-5
506 reply->setRedirectUrl(redirectUrl);
executed 5 times by 1 test: reply->setRedirectUrl(redirectUrl);
Executed by:
  • tst_QNetworkReply
5
507-
508 if (qobject_cast<QHttpNetworkConnection *>(connection)
qobject_cast<Q...*>(connection)Description
TRUEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
FALSEnever evaluated
)
0-9
509 QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);
executed 9 times by 2 tests: QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);
Executed by:
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
9
510 break;
executed 9 times by 2 tests: break;
Executed by:
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
9
511 }-
512 case
executed 302 times by 2 tests: case 401:
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
401:
executed 302 times by 2 tests: case 401:
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
302
513 case
executed 54 times by 1 test: case 407:
Executed by:
  • tst_QNetworkReply
407:
executed 54 times by 1 test: case 407:
Executed by:
  • tst_QNetworkReply
54
514 if (connection->d_func()->handleAuthenticateChallenge(socket, reply, (statusCode == 407), resend)
connection->d_... 407), resend)Description
TRUEevaluated 353 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
3-353
515 if (resend
resendDescription
TRUEevaluated 315 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEevaluated 38 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
) {
38-315
516 if (!resetUploadData()
!resetUploadData()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 314 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
)
1-314
517 break;
executed 1 time by 1 test: break;
Executed by:
  • tst_QNetworkReply
1
518-
519 reply->d_func()->eraseData();-
520-
521 if (alreadyPipelinedRequests.isEmpty()
alreadyPipelin...ests.isEmpty()Description
TRUEevaluated 314 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEnever evaluated
) {
0-314
522-
523 resendCurrent = true;-
524 QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);-
525 }
executed 314 times by 2 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
else {
314
526-
527 closeAndResendCurrentRequest();-
528 QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);-
529 }
never executed: end of block
0
530 } else {-
531-
532 close();-
533 }
executed 38 times by 2 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
38
534 } else {-
535 reply->headerChanged();-
536 reply->readyRead();-
537 QNetworkReply::NetworkError errorCode = (
(statusCode == 407)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QNetworkReply
statusCode == 407)
(statusCode == 407)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QNetworkReply
1-2
538 ? QNetworkReply::ProxyAuthenticationRequiredError-
539 : QNetworkReply::AuthenticationRequiredError;-
540 reply->d_func()->errorString = connection->d_func()->errorDetail(errorCode, socket);-
541 reply->finishedWithError(errorCode, reply->d_func()->errorString);-
542 }
executed 3 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
3
543 break;
executed 355 times by 2 tests: break;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
355
544 default
executed 1397 times by 6 tests: default:
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
:
executed 1397 times by 6 tests: default:
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
1397
545 if (qobject_cast<QHttpNetworkConnection*>(connection)
qobject_cast<Q...*>(connection)Description
TRUEevaluated 1397 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
)
0-1397
546 QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);
executed 1397 times by 6 tests: QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
1397
547 }
executed 1397 times by 6 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
1397
548}-
549-
550bool QHttpNetworkConnectionChannel::resetUploadData()-
551{-
552 if (!reply
!replyDescription
TRUEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEevaluated 547 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
) {
9-547
553-
554 return
executed 9 times by 2 tests: return false;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
false;
executed 9 times by 2 tests: return false;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
9
555 }-
556 QNonContiguousByteDevice* uploadByteDevice = request.uploadByteDevice();-
557 if (!uploadByteDevice
!uploadByteDeviceDescription
TRUEevaluated 420 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEevaluated 127 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
127-420
558 return
executed 420 times by 2 tests: return true;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
true;
executed 420 times by 2 tests: return true;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
420
559-
560 if (uploadByteDevice->reset()
uploadByteDevice->reset()Description
TRUEevaluated 126 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
1-126
561 written = 0;-
562 return
executed 126 times by 1 test: return true;
Executed by:
  • tst_QNetworkReply
true;
executed 126 times by 1 test: return true;
Executed by:
  • tst_QNetworkReply
126
563 } else {-
564 connection->d_func()->emitReplyError(socket, reply, QNetworkReply::ContentReSendError);-
565 return
executed 1 time by 1 test: return false;
Executed by:
  • tst_QNetworkReply
false;
executed 1 time by 1 test: return false;
Executed by:
  • tst_QNetworkReply
1
566 }-
567}-
568-
569-
570-
571void QHttpNetworkConnectionChannel::setProxy(const QNetworkProxy &networkProxy)-
572{-
573 if (socket
socketDescription
TRUEnever evaluated
FALSEevaluated 3251 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
)
0-3251
574 socket->setProxy(networkProxy);
never executed: socket->setProxy(networkProxy);
0
575-
576 proxy = networkProxy;-
577}
executed 3251 times by 8 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
3251
578-
579-
580-
581-
582-
583void QHttpNetworkConnectionChannel::ignoreSslErrors()-
584{-
585 if (socket
socketDescription
TRUEevaluated 33 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 141 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
)
33-141
586 static_cast<
executed 33 times by 3 tests: static_cast<QSslSocket *>(socket)->ignoreSslErrors();
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
QSslSocket *>(socket)->ignoreSslErrors();
executed 33 times by 3 tests: static_cast<QSslSocket *>(socket)->ignoreSslErrors();
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
33
587-
588 ignoreAllSslErrors = true;-
589}
executed 174 times by 3 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
174
590-
591-
592void QHttpNetworkConnectionChannel::ignoreSslErrors(const QList<QSslError> &errors)-
593{-
594 if (socket
socketDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 30 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
6-30
595 static_cast<
executed 6 times by 1 test: static_cast<QSslSocket *>(socket)->ignoreSslErrors(errors);
Executed by:
  • tst_QNetworkReply
QSslSocket *>(socket)->ignoreSslErrors(errors);
executed 6 times by 1 test: static_cast<QSslSocket *>(socket)->ignoreSslErrors(errors);
Executed by:
  • tst_QNetworkReply
6
596-
597 ignoreSslErrorsList = errors;-
598}
executed 36 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
36
599-
600void QHttpNetworkConnectionChannel::setSslConfiguration(const QSslConfiguration &config)-
601{-
602 if (socket
socketDescription
TRUEnever evaluated
FALSEevaluated 287 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
)
0-287
603 static_cast<
never executed: static_cast<QSslSocket *>(socket)->setSslConfiguration(config);
QSslSocket *>(socket)->setSslConfiguration(config);
never executed: static_cast<QSslSocket *>(socket)->setSslConfiguration(config);
0
604-
605 sslConfiguration = config;-
606}
executed 287 times by 2 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
287
607-
608-
609-
610void QHttpNetworkConnectionChannel::pipelineInto(HttpMessagePair &pair)-
611{-
612-
613-
614 QHttpNetworkRequest &request = pair.first;-
615 QHttpNetworkReply *reply = pair.second;-
616 reply->d_func()->clear();-
617 reply->d_func()->connection = connection;-
618 reply->d_func()->connectionChannel = this;-
619 reply->d_func()->autoDecompress = request.d->autoDecompress;-
620 reply->d_func()->pipeliningUsed = true;-
621-
622-
623 pipeline.append(QHttpNetworkRequestPrivate::header(request,-
624 (connection->d_func()->networkProxy.type() != QNetworkProxy::NoProxy)));-
625-
626-
627-
628-
629 alreadyPipelinedRequests.append(pair);-
630-
631-
632}
executed 402 times by 2 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
402
633-
634void QHttpNetworkConnectionChannel::pipelineFlush()-
635{-
636 if (pipeline.isEmpty()
pipeline.isEmpty()Description
TRUEevaluated 11 times by 1 test
Evaluated by:
  • tst_QHttpNetworkConnection
FALSEevaluated 195 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
)
11-195
637 return;
executed 11 times by 1 test: return;
Executed by:
  • tst_QHttpNetworkConnection
11
638-
639-
640-
641-
642-
643-
644 socket->write(pipeline);-
645 pipeline.clear();-
646}
executed 195 times by 2 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
195
647-
648-
649void QHttpNetworkConnectionChannel::closeAndResendCurrentRequest()-
650{-
651 requeueCurrentlyPipelinedRequests();-
652 close();-
653 if (reply
replyDescription
TRUEevaluated 65 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEnever evaluated
)
0-65
654 resendCurrent = true;
executed 65 times by 2 tests: resendCurrent = true;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
65
655 if (qobject_cast<QHttpNetworkConnection*>(connection)
qobject_cast<Q...*>(connection)Description
TRUEevaluated 65 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEnever evaluated
)
0-65
656 QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);
executed 65 times by 2 tests: QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
65
657}
executed 65 times by 2 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
65
658-
659void QHttpNetworkConnectionChannel::resendCurrentRequest()-
660{-
661 requeueCurrentlyPipelinedRequests();-
662 if (reply
replyDescription
TRUEevaluated 27 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
6-27
663 resendCurrent = true;
executed 27 times by 2 tests: resendCurrent = true;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
27
664 if (qobject_cast<QHttpNetworkConnection*>(connection)
qobject_cast<Q...*>(connection)Description
TRUEevaluated 33 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEnever evaluated
)
0-33
665 QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);
executed 33 times by 2 tests: QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
33
666}
executed 33 times by 2 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
33
667-
668bool QHttpNetworkConnectionChannel::isSocketBusy() const-
669{-
670 return
executed 5417 times by 6 tests: return (state & QHttpNetworkConnectionChannel::BusyState);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
(state & QHttpNetworkConnectionChannel::BusyState);
executed 5417 times by 6 tests: return (state & QHttpNetworkConnectionChannel::BusyState);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
5417
671}-
672-
673bool QHttpNetworkConnectionChannel::isSocketWriting() const-
674{-
675 return
executed 3024 times by 3 tests: return (state & QHttpNetworkConnectionChannel::WritingState);
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
(state & QHttpNetworkConnectionChannel::WritingState);
executed 3024 times by 3 tests: return (state & QHttpNetworkConnectionChannel::WritingState);
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
3024
676}-
677-
678bool QHttpNetworkConnectionChannel::isSocketWaiting() const-
679{-
680 return
executed 9678 times by 6 tests: return (state & QHttpNetworkConnectionChannel::WaitingState);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
(state & QHttpNetworkConnectionChannel::WaitingState);
executed 9678 times by 6 tests: return (state & QHttpNetworkConnectionChannel::WaitingState);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
9678
681}-
682-
683bool QHttpNetworkConnectionChannel::isSocketReading() const-
684{-
685 return
executed 8520 times by 5 tests: return (state & QHttpNetworkConnectionChannel::ReadingState);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
  • tst_Spdy
(state & QHttpNetworkConnectionChannel::ReadingState);
executed 8520 times by 5 tests: return (state & QHttpNetworkConnectionChannel::ReadingState);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
  • tst_Spdy
8520
686}-
687-
688void QHttpNetworkConnectionChannel::_q_bytesWritten(qint64 bytes)-
689{-
690 (void)bytes;;-
691 if (ssl
sslDescription
TRUEevaluated 1901 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 946 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
) {
946-1901
692-
693-
694 return;
executed 1901 times by 3 tests: return;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
1901
695 }-
696-
697-
698 if (isSocketWriting()
isSocketWriting()Description
TRUEevaluated 233 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 713 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
)
233-713
699 sendRequest();
executed 233 times by 1 test: sendRequest();
Executed by:
  • tst_QNetworkReply
233
700-
701}
executed 946 times by 2 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
946
702-
703void QHttpNetworkConnectionChannel::_q_disconnected()-
704{-
705 if (state == QHttpNetworkConnectionChannel::ClosingState
state == QHttp...::ClosingStateDescription
TRUEevaluated 243 times by 4 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
6-243
706 state = QHttpNetworkConnectionChannel::IdleState;-
707 QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);-
708 return;
executed 243 times by 4 tests: return;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
243
709 }-
710-
711-
712 if ((isSocketWaiting()
isSocketWaiting()Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QNetworkReply
|| isSocketReading()
isSocketReading()Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) && socket->bytesAvailable()
socket->bytesAvailable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0-6
713 if (reply
replyDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
714 state = QHttpNetworkConnectionChannel::ReadingState;-
715 _q_receiveReply();-
716 }
never executed: end of block
0
717 }
never executed: end of block
else if (state == QHttpNetworkConnectionChannel::IdleState
state == QHttp...nel::IdleStateDescription
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QNetworkReply
&& resendCurrent
resendCurrentDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0-6
718-
719 QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);-
720 }
never executed: end of block
0
721 state = QHttpNetworkConnectionChannel::IdleState;-
722-
723 requeueCurrentlyPipelinedRequests();-
724-
725 pendingEncrypt = false;-
726}
executed 6 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
6
727-
728-
729void QHttpNetworkConnectionChannel::_q_connected()-
730{-
731-
732 if (connection->d_func()->networkLayerState == QHttpNetworkConnectionPrivate::HostLookupPending
connection->d_...tLookupPendingDescription
TRUEnever evaluated
FALSEevaluated 781 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
|| connection->d_func()->networkLayerState == QHttpNetworkConnectionPrivate::IPv4or6
connection->d_...ivate::IPv4or6Description
TRUEevaluated 124 times by 2 tests
Evaluated by:
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
FALSEevaluated 657 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
) {
0-781
733 if (connection->d_func()->delayedConnectionTimer.isActive()
connection->d_...mer.isActive()Description
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
FALSEevaluated 120 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
4-120
734 connection->d_func()->delayedConnectionTimer.stop();
executed 4 times by 2 tests: connection->d_func()->delayedConnectionTimer.stop();
Executed by:
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
4
735 if (networkLayerPreference == QAbstractSocket::IPv4Protocol
networkLayerPr...::IPv4ProtocolDescription
TRUEevaluated 124 times by 2 tests
Evaluated by:
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
FALSEnever evaluated
)
0-124
736 connection->d_func()->networkLayerState = QHttpNetworkConnectionPrivate::IPv4;
executed 124 times by 2 tests: connection->d_func()->networkLayerState = QHttpNetworkConnectionPrivate::IPv4;
Executed by:
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
124
737 else if (networkLayerPreference == QAbstractSocket::IPv6Protocol
networkLayerPr...::IPv6ProtocolDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
738 connection->d_func()->networkLayerState = QHttpNetworkConnectionPrivate::IPv6;
never executed: connection->d_func()->networkLayerState = QHttpNetworkConnectionPrivate::IPv6;
0
739 else {-
740 if (socket->peerAddress().protocol() == QAbstractSocket::IPv4Protocol
socket->peerAd...::IPv4ProtocolDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
741 connection->d_func()->networkLayerState = QHttpNetworkConnectionPrivate::IPv4;
never executed: connection->d_func()->networkLayerState = QHttpNetworkConnectionPrivate::IPv4;
0
742 else-
743 connection->d_func()->networkLayerState = QHttpNetworkConnectionPrivate::IPv6;
never executed: connection->d_func()->networkLayerState = QHttpNetworkConnectionPrivate::IPv6;
0
744 }-
745 connection->d_func()->networkLayerDetected(networkLayerPreference);-
746 }
executed 124 times by 2 tests: end of block
Executed by:
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
else {
124
747 if (((
(connection->d...Private::IPv4)Description
TRUEevaluated 656 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
connection->d_func()->networkLayerState == QHttpNetworkConnectionPrivate::IPv4)
(connection->d...Private::IPv4)Description
TRUEevaluated 656 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
&& (
(networkLayerP...:IPv4Protocol)Description
TRUEnever evaluated
FALSEevaluated 656 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
networkLayerPreference != QAbstractSocket::IPv4Protocol)
(networkLayerP...:IPv4Protocol)Description
TRUEnever evaluated
FALSEevaluated 656 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
)
0-656
748 || ((
(connection->d...Private::IPv6)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 656 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
connection->d_func()->networkLayerState == QHttpNetworkConnectionPrivate::IPv6)
(connection->d...Private::IPv6)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 656 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
&& (
(networkLayerP...:IPv6Protocol)Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
networkLayerPreference != QAbstractSocket::IPv6Protocol)
(networkLayerP...:IPv6Protocol)Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
)) {
0-656
749 close();-
750-
751 QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);-
752 return;
never executed: return;
0
753 }-
754-
755 }
executed 657 times by 7 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
657
756 socket->setSocketOption(QAbstractSocket::KeepAliveOption, 1);-
757-
758 pipeliningSupported = QHttpNetworkConnectionChannel::PipeliningSupportUnknown;-
759-
760-
761-
762 if (ssl
sslDescription
TRUEevaluated 121 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 660 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
|| pendingEncrypt
pendingEncryptDescription
TRUEnever evaluated
FALSEevaluated 660 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
) {
0-660
763-
764 if (connection->sslContext().isNull()
connection->ss...ext().isNull()Description
TRUEevaluated 95 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 26 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
26-95
765-
766-
767 QSharedPointer<QSslContext> socketSslContext = QSslSocketPrivate::sslContext(static_cast<QSslSocket*>(socket));-
768 if (!socketSslContext.isNull()
!socketSslContext.isNull()Description
TRUEevaluated 95 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
)
0-95
769 connection->setSslContext(socketSslContext);
executed 95 times by 3 tests: connection->setSslContext(socketSslContext);
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
95
770 }
executed 95 times by 3 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
95
771-
772 }
executed 121 times by 3 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
else {
121
773 state = QHttpNetworkConnectionChannel::IdleState;-
774 if (!reply
!replyDescription
TRUEevaluated 524 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
FALSEevaluated 136 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
)
136-524
775 connection->d_func()->dequeueRequest(socket);
executed 524 times by 8 tests: connection->d_func()->dequeueRequest(socket);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
524
776 if (reply
replyDescription
TRUEevaluated 658 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QHttpNetworkConnection
)
2-658
777 sendRequest();
executed 658 times by 8 tests: sendRequest();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
658
778 }
executed 660 times by 8 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
660
779}-
780-
781-
782void QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socketError)-
783{-
784 if (!socket
!socketDescription
TRUEnever evaluated
FALSEevaluated 199 times by 4 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
)
0-199
785 return;
never executed: return;
0
786 QNetworkReply::NetworkError errorCode = QNetworkReply::UnknownNetworkError;-
787-
788 switch (socketError) {-
789 case
executed 2 times by 1 test: case QAbstractSocket::HostNotFoundError:
Executed by:
  • tst_QNetworkReply
QAbstractSocket::HostNotFoundError:
executed 2 times by 1 test: case QAbstractSocket::HostNotFoundError:
Executed by:
  • tst_QNetworkReply
2
790 errorCode = QNetworkReply::HostNotFoundError;-
791 break;
executed 2 times by 1 test: break;
Executed by:
  • tst_QNetworkReply
2
792 case
executed 124 times by 2 tests: case QAbstractSocket::ConnectionRefusedError:
Executed by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
QAbstractSocket::ConnectionRefusedError:
executed 124 times by 2 tests: case QAbstractSocket::ConnectionRefusedError:
Executed by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
124
793 errorCode = QNetworkReply::ConnectionRefusedError;-
794 break;
executed 124 times by 2 tests: break;
Executed by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
124
795 case
executed 53 times by 3 tests: case QAbstractSocket::RemoteHostClosedError:
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
QAbstractSocket::RemoteHostClosedError:
executed 53 times by 3 tests: case QAbstractSocket::RemoteHostClosedError:
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
53
796-
797-
798-
799 if (!reply
!replyDescription
TRUEevaluated 17 times by 2 tests
Evaluated by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
FALSEevaluated 36 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
&& state == QHttpNetworkConnectionChannel::IdleState
state == QHttp...nel::IdleStateDescription
TRUEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
8-36
800-
801-
802-
803 return;
executed 9 times by 2 tests: return;
Executed by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
9
804 } else if (state != QHttpNetworkConnectionChannel::IdleState
state != QHttp...nel::IdleStateDescription
TRUEevaluated 44 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEnever evaluated
&& state != QHttpNetworkConnectionChannel::ReadingState
state != QHttp...::ReadingStateDescription
TRUEevaluated 39 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEevaluated 5 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
0-44
805-
806-
807 if (reconnectAttempts-- > 0
reconnectAttempts-- > 0Description
TRUEevaluated 33 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
) {
6-33
808 resendCurrentRequest();-
809 return;
executed 33 times by 2 tests: return;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
33
810 } else {-
811 errorCode = QNetworkReply::RemoteHostClosedError;-
812 }
executed 6 times by 2 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
6
813 } else if (state == QHttpNetworkConnectionChannel::ReadingState
state == QHttp...::ReadingStateDescription
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
) {
0-5
814 if (!reply
!replyDescription
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
0-5
815 break;
never executed: break;
0
816-
817 if (!reply->d_func()->expectContent()
!reply->d_func...xpectContent()Description
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
0-5
818-
819-
820 QMetaObject::invokeMethod(this, "_q_receiveReply", Qt::QueuedConnection);-
821 return;
never executed: return;
0
822 }-
823 if (reply->contentLength() == -1
reply->contentLength() == -1Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
&& !reply->d_func()->isChunked()
!reply->d_func()->isChunked()Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
) {
0-5
824-
825-
826-
827 QMetaObject::invokeMethod(this, "_q_receiveReply", Qt::QueuedConnection);-
828 return;
executed 5 times by 1 test: return;
Executed by:
  • tst_QNetworkReply
5
829 }-
830-
831-
832 if (socket->bytesAvailable()
socket->bytesAvailable()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
833-
834-
835-
836 reply->setReadBufferSize(0);-
837 reply->setDownstreamLimited(false);-
838 _q_receiveReply();-
839 if (!reply
!replyDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
840-
841 requeueCurrentlyPipelinedRequests();-
842 state = QHttpNetworkConnectionChannel::IdleState;-
843 QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);-
844 return;
never executed: return;
0
845 }-
846 }
never executed: end of block
0
847-
848 errorCode = QNetworkReply::RemoteHostClosedError;-
849 }
never executed: end of block
else {
0
850 errorCode = QNetworkReply::RemoteHostClosedError;-
851 }
never executed: end of block
0
852 break;
executed 6 times by 2 tests: break;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
6
853 case
never executed: case QAbstractSocket::SocketTimeoutError:
QAbstractSocket::SocketTimeoutError:
never executed: case QAbstractSocket::SocketTimeoutError:
0
854-
855 if (state == QHttpNetworkConnectionChannel::WritingState
state == QHttp...::WritingStateDescription
TRUEnever evaluated
FALSEnever evaluated
&& (
(reconnectAttempts-- > 0)Description
TRUEnever evaluated
FALSEnever evaluated
reconnectAttempts-- > 0)
(reconnectAttempts-- > 0)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
856 resendCurrentRequest();-
857 return;
never executed: return;
0
858 }-
859 errorCode = QNetworkReply::TimeoutError;-
860 break;
never executed: break;
0
861 case
executed 5 times by 2 tests: case QAbstractSocket::ProxyAuthenticationRequiredError:
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
QAbstractSocket::ProxyAuthenticationRequiredError:
executed 5 times by 2 tests: case QAbstractSocket::ProxyAuthenticationRequiredError:
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
5
862 errorCode = QNetworkReply::ProxyAuthenticationRequiredError;-
863 break;
executed 5 times by 2 tests: break;
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
5
864 case
executed 12 times by 3 tests: case QAbstractSocket::SslHandshakeFailedError:
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
QAbstractSocket::SslHandshakeFailedError:
executed 12 times by 3 tests: case QAbstractSocket::SslHandshakeFailedError:
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
12
865 errorCode = QNetworkReply::SslHandshakeFailedError;-
866 break;
executed 12 times by 3 tests: break;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
12
867 case
never executed: case QAbstractSocket::ProxyConnectionClosedError:
QAbstractSocket::ProxyConnectionClosedError:
never executed: case QAbstractSocket::ProxyConnectionClosedError:
0
868-
869 if (reconnectAttempts-- > 0
reconnectAttempts-- > 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
870 resendCurrentRequest();-
871 return;
never executed: return;
0
872 }-
873 errorCode = QNetworkReply::ProxyConnectionClosedError;-
874 break;
never executed: break;
0
875 case
never executed: case QAbstractSocket::ProxyConnectionTimeoutError:
QAbstractSocket::ProxyConnectionTimeoutError:
never executed: case QAbstractSocket::ProxyConnectionTimeoutError:
0
876-
877 if (reconnectAttempts-- > 0
reconnectAttempts-- > 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
878 resendCurrentRequest();-
879 return;
never executed: return;
0
880 }-
881 errorCode = QNetworkReply::ProxyTimeoutError;-
882 break;
never executed: break;
0
883 default
executed 3 times by 2 tests: default:
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
:
executed 3 times by 2 tests: default:
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
3
884-
885 errorCode = QNetworkReply::UnknownNetworkError;-
886 break;
executed 3 times by 2 tests: break;
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
3
887 }-
888 QPointer<QHttpNetworkConnection> that = connection;-
889 QString errorString = connection->d_func()->errorDetail(errorCode, socket, socket->errorString());-
890-
891-
892-
893 if (!connection->d_func()->shouldEmitChannelError(socket)
!connection->d...lError(socket)Description
TRUEevaluated 122 times by 2 tests
Evaluated by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
FALSEevaluated 30 times by 4 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
)
30-122
894 return;
executed 122 times by 2 tests: return;
Executed by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
122
895-
896-
897 do {-
898-
899 if (!reply
!replyDescription
TRUEevaluated 12 times by 3 tests
Evaluated by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 20 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
)
12-20
900 connection->d_func()->dequeueRequest(socket);
executed 12 times by 3 tests: connection->d_func()->dequeueRequest(socket);
Executed by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
12
901-
902 if (reply
replyDescription
TRUEevaluated 29 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_Spdy
) {
3-29
903 reply->d_func()->errorString = errorString;-
904 reply->finishedWithError(errorCode, errorString);-
905 reply = 0;-
906 if (protocolHandler
protocolHandlerDescription
TRUEevaluated 12 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
FALSEevaluated 17 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
)
12-17
907 protocolHandler->setReply(0);
executed 12 times by 3 tests: protocolHandler->setReply(0);
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
12
908 }
executed 29 times by 3 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
29
909 }
executed 32 times by 4 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
while (!connection->d_func()->highPriorityQueue.isEmpty()
!connection->d...ueue.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 32 times by 4 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
0-32
910 || !connection->d_func()->lowPriorityQueue.isEmpty()
!connection->d...ueue.isEmpty()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 30 times by 4 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
);
2-30
911-
912 if (connection->connectionType() == QHttpNetworkConnection::ConnectionTypeSPDY
connection->co...ectionTypeSPDYDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_Spdy
FALSEevaluated 27 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
) {
3-27
913 QList<HttpMessagePair> spdyPairs = spdyRequestsToSend.values();-
914 for (int a = 0; a < spdyPairs.count()
a < spdyPairs.count()Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_Spdy
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_Spdy
; ++a) {
3
915-
916 QHttpNetworkReply *currentReply = spdyPairs.at(a).second;-
917 ((!(currentReply)) ? qt_assert("currentReply",__FILE__,979) : qt_noop());-
918 currentReply->finishedWithError(errorCode, errorString);-
919 }
executed 3 times by 1 test: end of block
Executed by:
  • tst_Spdy
3
920 }
executed 3 times by 1 test: end of block
Executed by:
  • tst_Spdy
3
921-
922-
923-
924 QMetaObject::invokeMethod(that, "_q_startNextRequest", Qt::QueuedConnection);-
925-
926 if (that
thatDescription
TRUEevaluated 30 times by 4 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
) {
0-30
927-
928 if (!socket
!socketDescription
TRUEnever evaluated
FALSEevaluated 30 times by 4 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
)
0-30
929 state = QHttpNetworkConnectionChannel::IdleState;
never executed: state = QHttpNetworkConnectionChannel::IdleState;
0
930 else if (socket->state() == QAbstractSocket::UnconnectedState
socket->state(...connectedStateDescription
TRUEevaluated 17 times by 4 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 13 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
)
13-17
931 state = QHttpNetworkConnectionChannel::IdleState;
executed 17 times by 4 tests: state = QHttpNetworkConnectionChannel::IdleState;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
17
932 else-
933 state = QHttpNetworkConnectionChannel::ClosingState;
executed 13 times by 2 tests: state = QHttpNetworkConnectionChannel::ClosingState;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
13
934-
935-
936 pendingEncrypt = false;-
937 }
executed 30 times by 4 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
30
938}
executed 30 times by 4 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
30
939-
940-
941void QHttpNetworkConnectionChannel::_q_proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator* auth)-
942{-
943-
944 if (connection->connectionType() == QHttpNetworkConnection::ConnectionTypeSPDY
connection->co...ectionTypeSPDYDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_Spdy
FALSEevaluated 39 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
3-39
945 connection->d_func()->emitProxyAuthenticationRequired(this, proxy, auth);-
946 }
executed 3 times by 1 test: end of block
Executed by:
  • tst_Spdy
else {
3
947-
948-
949 if (!reply
!replyDescription
TRUEevaluated 37 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
2-37
950 connection->d_func()->dequeueRequest(socket);
executed 37 times by 1 test: connection->d_func()->dequeueRequest(socket);
Executed by:
  • tst_QNetworkReply
37
951 if (reply
replyDescription
TRUEevaluated 39 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
)
0-39
952 connection->d_func()->emitProxyAuthenticationRequired(this, proxy, auth);
executed 39 times by 1 test: connection->d_func()->emitProxyAuthenticationRequired(this, proxy, auth);
Executed by:
  • tst_QNetworkReply
39
953-
954 }
executed 39 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
39
955-
956}-
957-
958-
959void QHttpNetworkConnectionChannel::_q_uploadDataReadyRead()-
960{-
961 if (reply
replyDescription
TRUEevaluated 1964 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QXmlInputSource
FALSEnever evaluated
)
0-1964
962 sendRequest();
executed 1964 times by 2 tests: sendRequest();
Executed by:
  • tst_QNetworkReply
  • tst_QXmlInputSource
1964
963}
executed 1964 times by 2 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_QXmlInputSource
1964
964-
965-
966void QHttpNetworkConnectionChannel::_q_encrypted()-
967{-
968 QSslSocket *sslSocket = qobject_cast<QSslSocket *>(socket);-
969 ((!(sslSocket)) ? qt_assert("sslSocket",__FILE__,1031) : qt_noop());-
970-
971 if (!protocolHandler
!protocolHandlerDescription
TRUEevaluated 91 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
10-91
972 switch (sslSocket->sslConfiguration().nextProtocolNegotiationStatus()) {-
973 case
executed 6 times by 1 test: case QSslConfiguration::NextProtocolNegotiationNegotiated:
Executed by:
  • tst_Spdy
QSslConfiguration::NextProtocolNegotiationNegotiated:
executed 6 times by 1 test: case QSslConfiguration::NextProtocolNegotiationNegotiated:
Executed by:
  • tst_Spdy
6
974 case
never executed: case QSslConfiguration::NextProtocolNegotiationUnsupported:
QSslConfiguration::NextProtocolNegotiationUnsupported:
never executed: case QSslConfiguration::NextProtocolNegotiationUnsupported:
{
0
975 QByteArray nextProtocol = sslSocket->sslConfiguration().nextNegotiatedProtocol();-
976 if (nextProtocol == QSslConfiguration::NextProtocolHttp1_1
nextProtocol =...rotocolHttp1_1Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_Spdy
) {
0-6
977-
978 }
never executed: end of block
else if (nextProtocol == QSslConfiguration::NextProtocolSpdy3_0
nextProtocol =...rotocolSpdy3_0Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_Spdy
FALSEnever evaluated
) {
0-6
979 protocolHandler.reset(new QSpdyProtocolHandler(this));-
980 connection->setConnectionType(QHttpNetworkConnection::ConnectionTypeSPDY);-
981-
982-
983 break;
executed 6 times by 1 test: break;
Executed by:
  • tst_Spdy
6
984 } else {-
985 emitFinishedWithError(QNetworkReply::SslHandshakeFailedError,-
986 "detected unknown Next Protocol Negotiation protocol");-
987 break;
never executed: break;
0
988 }-
989 }-
990 case
executed 85 times by 3 tests: case QSslConfiguration::NextProtocolNegotiationNone:
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
code before this statement never executed: case QSslConfiguration::NextProtocolNegotiationNone:
executed 85 times by 3 tests: case QSslConfiguration::NextProtocolNegotiationNone:
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
QSslConfiguration::NextProtocolNegotiationNone:
code before this statement never executed: case QSslConfiguration::NextProtocolNegotiationNone:
executed 85 times by 3 tests: case QSslConfiguration::NextProtocolNegotiationNone:
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
0-85
991 protocolHandler.reset(new QHttpProtocolHandler(this));-
992 connection->setConnectionType(QHttpNetworkConnection::ConnectionTypeHTTP);-
993-
994 requeueSpdyRequests();-
995 break;
executed 85 times by 3 tests: break;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
85
996 default
never executed: default:
:
never executed: default:
0
997 emitFinishedWithError(QNetworkReply::SslHandshakeFailedError,-
998 "detected unknown Next Protocol Negotiation protocol");-
999 }
never executed: end of block
0
1000 }-
1001-
1002 if (!socket
!socketDescription
TRUEnever evaluated
FALSEevaluated 101 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
)
0-101
1003 return;
never executed: return;
0
1004 state = QHttpNetworkConnectionChannel::IdleState;-
1005 pendingEncrypt = false;-
1006-
1007 if (connection->connectionType() == QHttpNetworkConnection::ConnectionTypeSPDY
connection->co...ectionTypeSPDYDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_Spdy
FALSEevaluated 95 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
) {
6-95
1008-
1009 if (spdyRequestsToSend.count() > 0
spdyRequestsToSend.count() > 0Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_Spdy
FALSEnever evaluated
)
0-6
1010-
1011 QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);
executed 6 times by 1 test: QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);
Executed by:
  • tst_Spdy
6
1012 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_Spdy
else {
6
1013 if (!reply
!replyDescription
TRUEevaluated 56 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 39 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
)
39-56
1014 connection->d_func()->dequeueRequest(socket);
executed 56 times by 1 test: connection->d_func()->dequeueRequest(socket);
Executed by:
  • tst_QNetworkReply
56
1015 if (reply
replyDescription
TRUEevaluated 92 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
3-92
1016 reply->setSpdyWasUsed(false);-
1017 ((!(reply->d_func()->connectionChannel == this)) ? qt_assert("reply->d_func()->connectionChannel == this",__FILE__,1079) : qt_noop());-
1018 reply->encrypted();-
1019 }
executed 92 times by 3 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
92
1020 if (reply
replyDescription
TRUEevaluated 92 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
3-92
1021 sendRequest();
executed 92 times by 3 tests: sendRequest();
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
92
1022 }
executed 95 times by 3 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
95
1023}-
1024-
1025void QHttpNetworkConnectionChannel::requeueSpdyRequests()-
1026{-
1027 QList<HttpMessagePair> spdyPairs = spdyRequestsToSend.values();-
1028 for (int a = 0; a < spdyPairs.count()
a < spdyPairs.count()Description
TRUEnever evaluated
FALSEevaluated 85 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
; ++a) {
0-85
1029 connection->d_func()->requeueRequest(spdyPairs.at(a));-
1030 }
never executed: end of block
0
1031 spdyRequestsToSend.clear();-
1032}
executed 85 times by 3 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
85
1033-
1034void QHttpNetworkConnectionChannel::emitFinishedWithError(QNetworkReply::NetworkError error,-
1035 const char *message)-
1036{-
1037 if (reply
replyDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1038 reply->finishedWithError(error, QHttpNetworkConnectionChannel::tr(message));
never executed: reply->finishedWithError(error, QHttpNetworkConnectionChannel::tr(message));
0
1039 QList<HttpMessagePair> spdyPairs = spdyRequestsToSend.values();-
1040 for (int a = 0; a < spdyPairs.count()
a < spdyPairs.count()Description
TRUEnever evaluated
FALSEnever evaluated
; ++a) {
0
1041 QHttpNetworkReply *currentReply = spdyPairs.at(a).second;-
1042 ((!(currentReply)) ? qt_assert("currentReply",__FILE__,1104) : qt_noop());-
1043 currentReply->finishedWithError(error, QHttpNetworkConnectionChannel::tr(message));-
1044 }
never executed: end of block
0
1045}
never executed: end of block
0
1046-
1047void QHttpNetworkConnectionChannel::_q_sslErrors(const QList<QSslError> &errors)-
1048{-
1049 if (!socket
!socketDescription
TRUEnever evaluated
FALSEevaluated 54 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
)
0-54
1050 return;
never executed: return;
0
1051-
1052-
1053-
1054 connection->d_func()->pauseConnection();-
1055 if (pendingEncrypt
pendingEncryptDescription
TRUEevaluated 54 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
&& !reply
!replyDescription
TRUEevaluated 48 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
0-54
1056 connection->d_func()->dequeueRequest(socket);
executed 48 times by 3 tests: connection->d_func()->dequeueRequest(socket);
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
48
1057 if (connection->connectionType() == QHttpNetworkConnection::ConnectionTypeHTTP
connection->co...ectionTypeHTTPDescription
TRUEevaluated 47 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 7 times by 1 test
Evaluated by:
  • tst_Spdy
) {
7-47
1058 if (reply
replyDescription
TRUEevaluated 45 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
2-45
1059 reply->sslErrors(errors);
executed 45 times by 3 tests: reply->sslErrors(errors);
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
45
1060 }
executed 47 times by 3 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
47
1061-
1062 else {-
1063 QList<HttpMessagePair> spdyPairs = spdyRequestsToSend.values();-
1064 for (int a = 0; a < spdyPairs.count()
a < spdyPairs.count()Description
TRUEevaluated 7 times by 1 test
Evaluated by:
  • tst_Spdy
FALSEevaluated 7 times by 1 test
Evaluated by:
  • tst_Spdy
; ++a) {
7
1065-
1066 QHttpNetworkReply *currentReply = spdyPairs.at(a).second;-
1067 ((!(currentReply)) ? qt_assert("currentReply",__FILE__,1129) : qt_noop());-
1068 currentReply->sslErrors(errors);-
1069 }
executed 7 times by 1 test: end of block
Executed by:
  • tst_Spdy
7
1070 }
executed 7 times by 1 test: end of block
Executed by:
  • tst_Spdy
7
1071-
1072 connection->d_func()->resumeConnection();-
1073}
executed 54 times by 3 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
54
1074-
1075void QHttpNetworkConnectionChannel::_q_preSharedKeyAuthenticationRequired(QSslPreSharedKeyAuthenticator *authenticator)-
1076{-
1077 connection->d_func()->pauseConnection();-
1078-
1079 if (pendingEncrypt
pendingEncryptDescription
TRUEnever evaluated
FALSEnever evaluated
&& !reply
!replyDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1080 connection->d_func()->dequeueRequest(socket);
never executed: connection->d_func()->dequeueRequest(socket);
0
1081-
1082 if (connection->connectionType() == QHttpNetworkConnection::ConnectionTypeHTTP
connection->co...ectionTypeHTTPDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1083 if (reply
replyDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1084 reply->preSharedKeyAuthenticationRequired(authenticator);
never executed: reply->preSharedKeyAuthenticationRequired(authenticator);
0
1085 }
never executed: end of block
else {
0
1086 QList<HttpMessagePair> spdyPairs = spdyRequestsToSend.values();-
1087 for (int a = 0; a < spdyPairs.count()
a < spdyPairs.count()Description
TRUEnever evaluated
FALSEnever evaluated
; ++a) {
0
1088-
1089 QHttpNetworkReply *currentReply = spdyPairs.at(a).second;-
1090 ((!(currentReply)) ? qt_assert("currentReply",__FILE__,1152) : qt_noop());-
1091 currentReply->preSharedKeyAuthenticationRequired(authenticator);-
1092 }
never executed: end of block
0
1093 }
never executed: end of block
0
1094-
1095 connection->d_func()->resumeConnection();-
1096}
never executed: end of block
0
1097-
1098void QHttpNetworkConnectionChannel::_q_encryptedBytesWritten(qint64 bytes)-
1099{-
1100 (void)bytes;;-
1101-
1102 if (isSocketWriting()
isSocketWriting()Description
TRUEevaluated 896 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 1182 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
)
896-1182
1103 sendRequest();
executed 896 times by 1 test: sendRequest();
Executed by:
  • tst_QNetworkReply
896
1104-
1105}
executed 2078 times by 3 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
2078
1106-
1107-
1108-
1109void QHttpNetworkConnectionChannel::setConnection(QHttpNetworkConnection *c)-
1110{-
1111-
1112-
1113 connection = c;-
1114}
executed 3416 times by 8 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
3416
1115-
1116-
1117-
Switch to Source codePreprocessed file

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