qnetworkreplyhttpimpl.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/network/access/qnetworkreplyhttpimpl.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10-
11-
12-
13class QNetworkProxy;-
14-
15static inline bool isSeparator(char c)-
16{-
17 static const char separators[] = "()<>@,;:\\\"/[]?={}";-
18 return
executed 157 times by 2 tests: return isLWS(c) || strchr(separators, c) != 0;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
isLWS(c) || strchr(separators, c) != 0;
executed 157 times by 2 tests: return isLWS(c) || strchr(separators, c) != 0;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
157
19}-
20-
21-
22static QHash<QByteArray, QByteArray> parseHttpOptionHeader(const QByteArray &header)-
23{-
24-
25-
26-
27-
28 QHash<QByteArray, QByteArray> result;-
29-
30 int pos = 0;-
31 while (true) {-
32-
33 pos = nextNonWhitespace(header, pos);-
34 if (pos == header.length()
pos == header.length()Description
TRUEevaluated 22 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 69 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
)
22-69
35 return
executed 22 times by 2 tests: return result;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
result;
executed 22 times by 2 tests: return result;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
22
36-
37-
38 int comma = header.indexOf(',', pos);-
39 int equal = header.indexOf('=', pos);-
40 if (comma == pos
comma == posDescription
TRUEnever evaluated
FALSEevaluated 69 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
|| equal == pos
equal == posDescription
TRUEnever evaluated
FALSEevaluated 69 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
)
0-69
41-
42 return
never executed: return result;
result;
never executed: return result;
0
43-
44-
45-
46 int end = comma;-
47 if (end == -1
end == -1Description
TRUEevaluated 50 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 19 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
)
19-50
48 end = header.length();
executed 50 times by 2 tests: end = header.length();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
50
49 if (equal != -1
equal != -1Description
TRUEevaluated 47 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 22 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
&& end > equal
end > equalDescription
TRUEevaluated 43 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QAbstractNetworkCache
)
4-47
50 end = equal;
executed 43 times by 2 tests: end = equal;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
43
51 QByteArray key = QByteArray(header.constData() + pos, end - pos).trimmed().toLower();-
52 pos = end + 1;-
53-
54 if (uint(equal) < uint(comma)
uint(equal) < uint(comma)Description
TRUEevaluated 43 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 26 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
) {
26-43
55-
56-
57 pos = nextNonWhitespace(header, pos);-
58 if (pos == header.length()
pos == header.length()Description
TRUEnever evaluated
FALSEevaluated 43 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
)
0-43
59-
60 return
never executed: return result;
result;
never executed: return result;
0
61-
62 QByteArray value;-
63 value.reserve(header.length() - pos);-
64 if (header.at(pos) == '"'
header.at(pos) == '"'Description
TRUEnever evaluated
FALSEevaluated 43 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
) {
0-43
65-
66-
67-
68-
69 ++pos;-
70 while (pos < header.length()
pos < header.length()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
71 char c = header.at(pos);-
72 if (c == '"'
c == '"'Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
73-
74 break;
never executed: break;
0
75 } else if (c == '\\'
c == '\\'Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
76 ++pos;-
77 if (pos >= header.length()
pos >= header.length()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
78-
79 return
never executed: return result;
result;
never executed: return result;
0
80 c = header.at(pos);-
81 }
never executed: end of block
0
82-
83 value += c;-
84 ++pos;-
85 }
never executed: end of block
0
86 }
never executed: end of block
else {
0
87-
88 while (pos < header.length()
pos < header.length()Description
TRUEevaluated 157 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 28 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
) {
28-157
89 char c = header.at(pos);-
90 if (isSeparator(c)
isSeparator(c)Description
TRUEevaluated 15 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 142 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
)
15-142
91 break;
executed 15 times by 2 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
15
92 value += c;-
93 ++pos;-
94 }
executed 142 times by 2 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
142
95 }
executed 43 times by 2 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
43
96-
97 result.insert(key, value);-
98-
99-
100 comma = header.indexOf(',', pos);-
101 if (comma == -1
comma == -1Description
TRUEevaluated 28 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 15 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
)
15-28
102 return
executed 28 times by 2 tests: return result;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
result;
executed 28 times by 2 tests: return result;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
28
103 pos = comma + 1;-
104 }
executed 15 times by 2 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
else {
15
105-
106-
107 result.insert(key, QByteArray());-
108 }
executed 26 times by 2 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
26
109 }-
110}
never executed: end of block
0
111-
112QNetworkReplyHttpImpl::QNetworkReplyHttpImpl(QNetworkAccessManager* const manager,-
113 const QNetworkRequest& request,-
114 QNetworkAccessManager::Operation& operation,-
115 QIODevice* outgoingData)-
116 : QNetworkReply(*new QNetworkReplyHttpImplPrivate, manager)-
117{-
118 QNetworkReplyHttpImplPrivate * const d = d_func();-
119 d->manager = manager;-
120 d->managerPrivate = manager->d_func();-
121 d->request = request;-
122 d->originalRequest = request;-
123 d->operation = operation;-
124 d->outgoingData = outgoingData;-
125 d->url = request.url();-
126-
127 d->sslConfiguration = request.sslConfiguration();-
128-
129-
130-
131 QIODevice::open(QIODevice::ReadOnly);-
132-
133-
134-
135-
136 QVariant synchronousHttpAttribute = request.attribute(-
137 static_cast<QNetworkRequest::Attribute>(QNetworkRequest::SynchronousRequestAttribute));-
138 if (synchronousHttpAttribute.isValid()
synchronousHtt...bute.isValid()Description
TRUEevaluated 76 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 811 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
) {
76-811
139 d->synchronous = synchronousHttpAttribute.toBool();-
140 if (d->synchronous
d->synchronousDescription
TRUEevaluated 76 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
&& outgoingData
outgoingDataDescription
TRUEevaluated 41 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 35 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
0-76
141-
142-
143 d->outgoingDataBuffer = QSharedPointer<QRingBuffer>::create();-
144 qint64 previousDataSize = 0;-
145 do {-
146 previousDataSize = d->outgoingDataBuffer->size();-
147 d->outgoingDataBuffer->append(d->outgoingData->readAll());-
148 }
executed 77 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
while (d->outgoingDataBuffer->size() != previousDataSize
d->outgoingDat...eviousDataSizeDescription
TRUEevaluated 36 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 41 times by 1 test
Evaluated by:
  • tst_QNetworkReply
);
36-77
149 d->_q_startOperation();-
150 return;
executed 41 times by 1 test: return;
Executed by:
  • tst_QNetworkReply
41
151 }-
152 }
executed 35 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
35
153-
154-
155 if (outgoingData
outgoingDataDescription
TRUEevaluated 155 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
FALSEevaluated 691 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
) {
155-691
156-
157-
158 if (!d->outgoingData->isSequential()
!d->outgoingDa...isSequential()Description
TRUEevaluated 96 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
FALSEevaluated 59 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
59-96
159-
160-
161 QMetaObject::invokeMethod(this, "_q_startOperation", Qt::QueuedConnection);-
162-
163 }
executed 96 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
else {
96
164 bool bufferingDisallowed =-
165 request.attribute(QNetworkRequest::DoNotBufferUploadDataAttribute,-
166 false).toBool();-
167-
168 if (bufferingDisallowed
bufferingDisallowedDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 58 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
1-58
169-
170-
171 if (request.header(QNetworkRequest::ContentLengthHeader).isValid()
request.header...der).isValid()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
) {
0-1
172 QMetaObject::invokeMethod(this, "_q_startOperation", Qt::QueuedConnection);-
173-
174 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_QNetworkReply
else {
1
175 d->state = d->Buffering;-
176 QMetaObject::invokeMethod(this, "_q_bufferOutgoingData", Qt::QueuedConnection);-
177 }
never executed: end of block
0
178 } else {-
179-
180 d->state = d->Buffering;-
181 QMetaObject::invokeMethod(this, "_q_bufferOutgoingData", Qt::QueuedConnection);-
182 }
executed 58 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
58
183 }-
184 } else {-
185-
186 d->_q_startOperation();-
187 }
executed 691 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
691
188}-
189-
190QNetworkReplyHttpImpl::~QNetworkReplyHttpImpl()-
191{-
192-
193 abortHttpRequest();-
194}
executed 886 times by 9 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_spdy - unknown status
886
195-
196void QNetworkReplyHttpImpl::close()-
197{-
198 QNetworkReplyHttpImplPrivate * const d = d_func();-
199-
200 if (d->state == QNetworkReplyPrivate::Aborted
d->state == QN...ivate::AbortedDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
||
0-1
201 d->state == QNetworkReplyPrivate::Finished
d->state == QN...vate::FinishedDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
)
0-1
202 return;
never executed: return;
0
203-
204-
205-
206 QNetworkReply::close();-
207-
208-
209-
210 d->error(OperationCanceledError, tr("Operation canceled"));-
211 d->finished();-
212}
executed 1 time by 1 test: end of block
Executed by:
  • tst_QNetworkReply
1
213-
214void QNetworkReplyHttpImpl::abort()-
215{-
216 QNetworkReplyHttpImplPrivate * const d = d_func();-
217-
218 if (d->state == QNetworkReplyPrivate::Finished
d->state == QN...vate::FinishedDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QNetworkReply
|| d->state == QNetworkReplyPrivate::Aborted
d->state == QN...ivate::AbortedDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
0-2
219 return;
executed 1 time by 1 test: return;
Executed by:
  • tst_QNetworkReply
1
220-
221 QNetworkReply::close();-
222-
223 if (d->state != QNetworkReplyPrivate::Finished
d->state != QN...vate::FinishedDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
) {
0-2
224-
225-
226 d->error(OperationCanceledError, tr("Operation canceled"));-
227-
228-
229 if (d->state == QNetworkReplyPrivate::WaitingForSession
d->state == QN...tingForSessionDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
0-2
230 d->state = QNetworkReplyPrivate::Working;
never executed: d->state = QNetworkReplyPrivate::Working;
0
231 d->finished();-
232 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
2
233-
234 d->state = QNetworkReplyPrivate::Aborted;-
235-
236 abortHttpRequest();-
237}
executed 2 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
2
238-
239qint64 QNetworkReplyHttpImpl::bytesAvailable() const-
240{-
241 const QNetworkReplyHttpImplPrivate * const d = d_func();-
242-
243-
244 if (d->cacheLoadDevice
d->cacheLoadDeviceDescription
TRUEnever evaluated
FALSEevaluated 2143 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
0-2143
245 return
never executed: return QNetworkReply::bytesAvailable() + d->cacheLoadDevice->bytesAvailable();
QNetworkReply::bytesAvailable() + d->cacheLoadDevice->bytesAvailable();
never executed: return QNetworkReply::bytesAvailable() + d->cacheLoadDevice->bytesAvailable();
0
246 }-
247-
248-
249 if (d->downloadZerocopyBuffer
d->downloadZerocopyBufferDescription
TRUEevaluated 1190 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 953 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
953-1190
250 return
executed 1190 times by 1 test: return QNetworkReply::bytesAvailable() + d->downloadBufferCurrentSize - d->downloadBufferReadPosition;
Executed by:
  • tst_QNetworkReply
QNetworkReply::bytesAvailable() + d->downloadBufferCurrentSize - d->downloadBufferReadPosition;
executed 1190 times by 1 test: return QNetworkReply::bytesAvailable() + d->downloadBufferCurrentSize - d->downloadBufferReadPosition;
Executed by:
  • tst_QNetworkReply
1190
251 }-
252-
253-
254 return
executed 953 times by 1 test: return QNetworkReply::bytesAvailable();
Executed by:
  • tst_QNetworkReply
QNetworkReply::bytesAvailable();
executed 953 times by 1 test: return QNetworkReply::bytesAvailable();
Executed by:
  • tst_QNetworkReply
953
255}-
256-
257bool QNetworkReplyHttpImpl::isSequential () const-
258{-
259-
260-
261 return
executed 578 times by 3 tests: return true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_Spdy
true;
executed 578 times by 3 tests: return true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_Spdy
578
262}-
263-
264qint64 QNetworkReplyHttpImpl::size() const-
265{-
266-
267 return
executed 67 times by 1 test: return QNetworkReply::size();
Executed by:
  • tst_QNetworkReply
QNetworkReply::size();
executed 67 times by 1 test: return QNetworkReply::size();
Executed by:
  • tst_QNetworkReply
67
268}-
269-
270qint64 QNetworkReplyHttpImpl::readData(char* data, qint64 maxlen)-
271{-
272 QNetworkReplyHttpImplPrivate * const d = d_func();-
273-
274-
275 if (d->cacheLoadDevice
d->cacheLoadDeviceDescription
TRUEnever evaluated
FALSEevaluated 1342 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_Spdy
) {
0-1342
276-
277-
278 qint64 ret = d->cacheLoadDevice->read(data, maxlen);-
279 return
never executed: return ret;
ret;
never executed: return ret;
0
280 }-
281-
282-
283 if (d->downloadZerocopyBuffer
d->downloadZerocopyBufferDescription
TRUEevaluated 576 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 766 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_Spdy
) {
576-766
284-
285-
286 qint64 howMuch = qMin(maxlen, (d->downloadBufferCurrentSize - d->downloadBufferReadPosition));-
287 memcpy(data, d->downloadZerocopyBuffer + d->downloadBufferReadPosition, howMuch);-
288 d->downloadBufferReadPosition += howMuch;-
289 return
executed 576 times by 2 tests: return howMuch;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
howMuch;
executed 576 times by 2 tests: return howMuch;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
576
290-
291 }-
292-
293-
294 if (d->state == d->Finished
d->state == d->FinishedDescription
TRUEevaluated 568 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 198 times by 1 test
Evaluated by:
  • tst_QNetworkReply
|| d->state == d->Aborted
d->state == d->AbortedDescription
TRUEnever evaluated
FALSEevaluated 198 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
0-568
295 return
executed 568 times by 3 tests: return -1;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_Spdy
-1;
executed 568 times by 3 tests: return -1;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_Spdy
568
296-
297 qint64 wasBuffered = d->bytesBuffered;-
298 d->bytesBuffered = 0;-
299 if (readBufferSize()
readBufferSize()Description
TRUEevaluated 198 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
)
0-198
300 readBufferFreed(wasBuffered);
executed 198 times by 1 test: readBufferFreed(wasBuffered);
Executed by:
  • tst_QNetworkReply
198
301 return
executed 198 times by 1 test: return 0;
Executed by:
  • tst_QNetworkReply
0;
executed 198 times by 1 test: return 0;
Executed by:
  • tst_QNetworkReply
198
302}-
303-
304void QNetworkReplyHttpImpl::setReadBufferSize(qint64 size)-
305{-
306 QNetworkReply::setReadBufferSize(size);-
307 readBufferSizeChanged(size);-
308 return;
executed 18 times by 1 test: return;
Executed by:
  • tst_QNetworkReply
18
309}-
310-
311bool QNetworkReplyHttpImpl::canReadLine () const-
312{-
313 const QNetworkReplyHttpImplPrivate * const d = d_func();-
314-
315 if (QNetworkReply::canReadLine()
QNetworkReply::canReadLine()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 5 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
1-5
316 return
executed 1 time by 1 test: return true;
Executed by:
  • tst_QNetworkReply
true;
executed 1 time by 1 test: return true;
Executed by:
  • tst_QNetworkReply
1
317-
318 if (d->cacheLoadDevice
d->cacheLoadDeviceDescription
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
0-5
319 return
never executed: return d->cacheLoadDevice->canReadLine();
d->cacheLoadDevice->canReadLine();
never executed: return d->cacheLoadDevice->canReadLine();
0
320-
321 if (d->downloadZerocopyBuffer
d->downloadZerocopyBufferDescription
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
)
0-5
322 return
executed 5 times by 1 test: return memchr(d->downloadZerocopyBuffer + d->downloadBufferReadPosition, '\n', d->downloadBufferCurrentSize - d->downloadBufferReadPosition);
Executed by:
  • tst_QNetworkReply
memchr(d->downloadZerocopyBuffer + d->downloadBufferReadPosition, '\n', d->downloadBufferCurrentSize - d->downloadBufferReadPosition);
executed 5 times by 1 test: return memchr(d->downloadZerocopyBuffer + d->downloadBufferReadPosition, '\n', d->downloadBufferCurrentSize - d->downloadBufferReadPosition);
Executed by:
  • tst_QNetworkReply
5
323-
324 return
never executed: return false;
false;
never executed: return false;
0
325}-
326-
327-
328void QNetworkReplyHttpImpl::ignoreSslErrors()-
329{-
330 QNetworkReplyHttpImplPrivate * const d = d_func();-
331-
332 d->pendingIgnoreAllSslErrors = true;-
333}
executed 143 times by 2 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
143
334-
335void QNetworkReplyHttpImpl::ignoreSslErrorsImplementation(const QList<QSslError> &errors)-
336{-
337 QNetworkReplyHttpImplPrivate * const d = d_func();-
338-
339-
340-
341 d->pendingIgnoreSslErrorsList = errors;-
342}
executed 10 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
10
343-
344void QNetworkReplyHttpImpl::setSslConfigurationImplementation(const QSslConfiguration &newconfig)-
345{-
346-
347-
348 (void)newconfig;;-
349}
never executed: end of block
0
350-
351void QNetworkReplyHttpImpl::sslConfigurationImplementation(QSslConfiguration &configuration) const-
352{-
353 const QNetworkReplyHttpImplPrivate * const d = d_func();-
354 configuration = d->sslConfiguration;-
355}
executed 211 times by 2 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
211
356-
357-
358QNetworkReplyHttpImplPrivate::QNetworkReplyHttpImplPrivate()-
359 : QNetworkReplyPrivate()-
360 , manager(0)-
361 , managerPrivate(0)-
362 , synchronous(false)-
363 , state(Idle)-
364 , statusCode(0)-
365 , uploadByteDevicePosition(false)-
366 , uploadDeviceChoking(false)-
367 , outgoingData(0)-
368 , bytesUploaded(-1)-
369 , cacheLoadDevice(0)-
370 , loadingFromCache(false)-
371 , cacheSaveDevice(0)-
372 , cacheEnabled(false)-
373 , resumeOffset(0)-
374 , preMigrationDownloaded(-1)-
375 , bytesDownloaded(0)-
376 , bytesBuffered(0)-
377 , downloadBufferReadPosition(0)-
378 , downloadBufferCurrentSize(0)-
379 , downloadZerocopyBuffer(0)-
380 , pendingDownloadDataEmissions(QSharedPointer<QAtomicInt>::create())-
381 , pendingDownloadProgressEmissions(QSharedPointer<QAtomicInt>::create())-
382-
383 , pendingIgnoreAllSslErrors(false)-
384-
385-
386{-
387}
executed 887 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
887
388-
389QNetworkReplyHttpImplPrivate::~QNetworkReplyHttpImplPrivate()-
390{-
391}-
392-
393-
394-
395-
396-
397-
398-
399bool QNetworkReplyHttpImplPrivate::loadFromCacheIfAllowed(QHttpNetworkRequest &httpRequest)-
400{-
401 QNetworkRequest::CacheLoadControl CacheLoadControlAttribute =-
402 (QNetworkRequest::CacheLoadControl)request.attribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::PreferNetwork).toInt();-
403 if (CacheLoadControlAttribute == QNetworkRequest::AlwaysNetwork
CacheLoadContr...:AlwaysNetworkDescription
TRUEevaluated 12 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 668 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
) {
12-668
404-
405-
406 if (!request.rawHeaderList().contains("Cache-Control")
!request.rawHe...ache-Control")Description
TRUEevaluated 12 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEnever evaluated
) {
0-12
407 httpRequest.setHeaderField("Cache-Control", "no-cache");-
408 httpRequest.setHeaderField("Pragma", "no-cache");-
409 }
executed 12 times by 2 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
12
410 return
executed 12 times by 2 tests: return false;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
false;
executed 12 times by 2 tests: return false;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
12
411 }-
412-
413-
414-
415 if (request.hasRawHeader("Range")
request.hasRawHeader("Range")Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 666 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
)
2-666
416 return
executed 2 times by 1 test: return false;
Executed by:
  • tst_QNetworkReply
false;
executed 2 times by 1 test: return false;
Executed by:
  • tst_QNetworkReply
2
417-
418 QAbstractNetworkCache *nc = managerPrivate->networkCache;-
419 if (!nc
!ncDescription
TRUEevaluated 579 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 87 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
)
87-579
420 return
executed 579 times by 6 tests: return false;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
false;
executed 579 times by 6 tests: return false;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
579
421-
422 QNetworkCacheMetaData metaData = nc->metaData(httpRequest.url());-
423 if (!metaData.isValid()
!metaData.isValid()Description
TRUEevaluated 50 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
FALSEevaluated 37 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
)
37-50
424 return
executed 50 times by 3 tests: return false;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
false;
executed 50 times by 3 tests: return false;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
50
425-
426 if (!metaData.saveToDisk()
!metaData.saveToDisk()Description
TRUEnever evaluated
FALSEevaluated 37 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
)
0-37
427 return
never executed: return false;
false;
never executed: return false;
0
428-
429 QNetworkHeadersPrivate cacheHeaders;-
430 QNetworkHeadersPrivate::RawHeadersList::ConstIterator it;-
431 cacheHeaders.setAllRawHeaders(metaData.rawHeaders());-
432-
433 it = cacheHeaders.findRawHeader("etag");-
434 if (it != cacheHeaders.rawHeaders.constEnd()
it != cacheHea...ers.constEnd()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QAbstractNetworkCache
FALSEevaluated 33 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
)
4-33
435 httpRequest.setHeaderField("If-None-Match", it->second);
executed 4 times by 1 test: httpRequest.setHeaderField("If-None-Match", it->second);
Executed by:
  • tst_QAbstractNetworkCache
4
436-
437 QDateTime lastModified = metaData.lastModified();-
438 if (lastModified.isValid()
lastModified.isValid()Description
TRUEevaluated 22 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 15 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
)
15-22
439 httpRequest.setHeaderField("If-Modified-Since", QNetworkHeadersPrivate::toHttpDate(lastModified));
executed 22 times by 2 tests: httpRequest.setHeaderField("If-Modified-Since", QNetworkHeadersPrivate::toHttpDate(lastModified));
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
22
440-
441 it = cacheHeaders.findRawHeader("Cache-Control");-
442 if (it != cacheHeaders.rawHeaders.constEnd()
it != cacheHea...ers.constEnd()Description
TRUEevaluated 22 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 15 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
) {
15-22
443 QHash<QByteArray, QByteArray> cacheControl = parseHttpOptionHeader(it->second);-
444 if (cacheControl.contains("must-revalidate")
cacheControl.c...t-revalidate")Description
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
)
6-16
445 return
executed 6 times by 2 tests: return false;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
false;
executed 6 times by 2 tests: return false;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
6
446 }
executed 16 times by 2 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
16
447-
448 QDateTime currentDateTime = QDateTime::currentDateTimeUtc();-
449 QDateTime expirationDate = metaData.expirationDate();-
450-
451 bool response_is_fresh;-
452 if (!expirationDate.isValid()
!expirationDate.isValid()Description
TRUEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
FALSEevaluated 22 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
) {
9-22
453 int age_value = 0;-
454 it = cacheHeaders.findRawHeader("age");-
455 if (it != cacheHeaders.rawHeaders.constEnd()
it != cacheHea...ers.constEnd()Description
TRUEnever evaluated
FALSEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
)
0-9
456 age_value = it->second.toInt();
never executed: age_value = it->second.toInt();
0
457-
458 QDateTime dateHeader;-
459 int date_value = 0;-
460 it = cacheHeaders.findRawHeader("date");-
461 if (it != cacheHeaders.rawHeaders.constEnd()
it != cacheHea...ers.constEnd()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_QAbstractNetworkCache
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkDiskCache
) {
1-8
462 dateHeader = QNetworkHeadersPrivate::fromHttpDate(it->second);-
463 date_value = dateHeader.toTime_t();-
464 }
executed 8 times by 1 test: end of block
Executed by:
  • tst_QAbstractNetworkCache
8
465-
466 int now = currentDateTime.toTime_t();-
467 int request_time = now;-
468 int response_time = now;-
469-
470-
471 int apparent_age = qMax(0, response_time - date_value);-
472 int corrected_received_age = qMax(apparent_age, age_value);-
473 int response_delay = response_time - request_time;-
474 int corrected_initial_age = corrected_received_age + response_delay;-
475 int resident_time = now - response_time;-
476 int current_age = corrected_initial_age + resident_time;-
477-
478 int freshness_lifetime = 0;-
479-
480-
481 if (lastModified.isValid()
lastModified.isValid()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QAbstractNetworkCache
FALSEevaluated 5 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
&& dateHeader.isValid()
dateHeader.isValid()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QAbstractNetworkCache
FALSEnever evaluated
) {
0-5
482 int diff = lastModified.secsTo(dateHeader);-
483 freshness_lifetime = diff / 10;-
484 if (httpRequest.headerField("Warning").isEmpty()
httpRequest.he...ng").isEmpty()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QAbstractNetworkCache
FALSEnever evaluated
) {
0-4
485 QDateTime dt = currentDateTime.addSecs(current_age);-
486 if (currentDateTime.daysTo(dt) > 1
currentDateTime.daysTo(dt) > 1Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QAbstractNetworkCache
)
0-4
487 httpRequest.setHeaderField("Warning", "113");
never executed: httpRequest.setHeaderField("Warning", "113");
0
488 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_QAbstractNetworkCache
4
489 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_QAbstractNetworkCache
4
490-
491-
492-
493 response_is_fresh = (freshness_lifetime > current_age);-
494 }
executed 9 times by 2 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
else {
9
495-
496 response_is_fresh = currentDateTime.secsTo(expirationDate) >= 0;-
497 }
executed 22 times by 2 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
22
498-
499 if (!response_is_fresh
!response_is_freshDescription
TRUEevaluated 13 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
FALSEevaluated 18 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
)
13-18
500 return
executed 13 times by 3 tests: return false;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
false;
executed 13 times by 3 tests: return false;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
13
501-
502-
503-
504-
505 return
executed 18 times by 2 tests: return sendCacheContents(metaData);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
sendCacheContents(metaData);
executed 18 times by 2 tests: return sendCacheContents(metaData);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
18
506}-
507-
508QHttpNetworkRequest::Priority QNetworkReplyHttpImplPrivate::convert(const QNetworkRequest::Priority& prio)-
509{-
510 switch (prio) {-
511 case
never executed: case QNetworkRequest::LowPriority:
QNetworkRequest::LowPriority:
never executed: case QNetworkRequest::LowPriority:
0
512 return
never executed: return QHttpNetworkRequest::LowPriority;
QHttpNetworkRequest::LowPriority;
never executed: return QHttpNetworkRequest::LowPriority;
0
513 case
never executed: case QNetworkRequest::HighPriority:
QNetworkRequest::HighPriority:
never executed: case QNetworkRequest::HighPriority:
0
514 return
never executed: return QHttpNetworkRequest::HighPriority;
QHttpNetworkRequest::HighPriority;
never executed: return QHttpNetworkRequest::HighPriority;
0
515 case
executed 887 times by 8 tests: case QNetworkRequest::NormalPriority:
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
QNetworkRequest::NormalPriority:
executed 887 times by 8 tests: case QNetworkRequest::NormalPriority:
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
887
516 default
never executed: default:
:
never executed: default:
0
517 return
executed 887 times by 8 tests: return QHttpNetworkRequest::NormalPriority;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
QHttpNetworkRequest::NormalPriority;
executed 887 times by 8 tests: return QHttpNetworkRequest::NormalPriority;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
887
518 }-
519}-
520-
521void QNetworkReplyHttpImplPrivate::postRequest(const QNetworkRequest &newHttpRequest)-
522{-
523 QNetworkReplyHttpImpl * const q = q_func();-
524-
525 QThread *thread = 0;-
526 if (synchronous
synchronousDescription
TRUEevaluated 76 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 814 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
) {
76-814
527-
528 thread = new QThread();-
529 thread->setObjectName(([]() -> QString { enum { Size = sizeof(u"" "Qt HTTP synchronous thread")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Qt HTTP synchronous thread" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 76 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_QNetworkReply
qstring_literal_temp;
executed 76 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_QNetworkReply
}()));
76
530 QObject::connect(thread, qFlagLocation("2""finished()" "\0" __FILE__ ":" "600"), thread, qFlagLocation("1""deleteLater()" "\0" __FILE__ ":" "600"));-
531 thread->start();-
532 }
executed 76 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
else if (!managerPrivate->httpThread
!managerPrivate->httpThreadDescription
TRUEevaluated 471 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 343 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
) {
76-471
533-
534-
535 managerPrivate->httpThread = new QThread();-
536 managerPrivate->httpThread->setObjectName(([]() -> QString { enum { Size = sizeof(u"" "Qt HTTP thread")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Qt HTTP thread" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 471 times by 8 tests: return qstring_literal_temp;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
qstring_literal_temp;
executed 471 times by 8 tests: return qstring_literal_temp;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
}()));
471
537 managerPrivate->httpThread->start();-
538-
539 thread = managerPrivate->httpThread;-
540 }
executed 471 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 {
471
541-
542 thread = managerPrivate->httpThread;-
543 }
executed 343 times by 4 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
343
544-
545 QUrl url = newHttpRequest.url();-
546 httpRequest.setUrl(url);-
547 httpRequest.setRedirectCount(newHttpRequest.maximumRedirectsAllowed());-
548-
549 QString scheme = url.scheme();-
550 bool ssl = (scheme == QLatin1String("https")
scheme == QLat...tring("https")Description
TRUEevaluated 231 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 659 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
231-659
551 || scheme == QLatin1String("preconnect-https")
scheme == QLat...onnect-https")Description
TRUEnever evaluated
FALSEevaluated 659 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-659
552 q->setAttribute(QNetworkRequest::ConnectionEncryptedAttribute, ssl);-
553 httpRequest.setSsl(ssl);-
554-
555 bool preConnect = (scheme == QLatin1String("preconnect-http")
scheme == QLat...connect-http")Description
TRUEnever evaluated
FALSEevaluated 890 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-890
556 || scheme == QLatin1String("preconnect-https")
scheme == QLat...onnect-https")Description
TRUEnever evaluated
FALSEevaluated 890 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-890
557 httpRequest.setPreConnect(preConnect);-
558-
559-
560 QNetworkProxy transparentProxy, cacheProxy;-
561-
562-
563 const auto proxies = managerPrivate->queryProxy(QNetworkProxyQuery(newHttpRequest.url()));-
564 for (const QNetworkProxy &p : proxies) {-
565-
566-
567-
568 if (!ssl
!sslDescription
TRUEevaluated 661 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 234 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
234-661
569 && (p.capabilities() & QNetworkProxy::CachingCapability)-
570 && (p.type() == QNetworkProxy::HttpProxy
p.type() == QN...oxy::HttpProxyDescription
TRUEevaluated 47 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 11 times by 1 test
Evaluated by:
  • tst_QNetworkReply
||
11-47
571 p.type() == QNetworkProxy::HttpCachingProxy
p.type() == QN...tpCachingProxyDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)) {
3-8
572 cacheProxy = p;-
573 transparentProxy = QNetworkProxy::NoProxy;-
574 break;
executed 55 times by 1 test: break;
Executed by:
  • tst_QNetworkReply
55
575 }-
576 if (p.isTransparentProxy()
p.isTransparentProxy()Description
TRUEevaluated 832 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 8 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
8-832
577 transparentProxy = p;-
578 cacheProxy = QNetworkProxy::NoProxy;-
579 break;
executed 832 times by 8 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
832
580 }-
581 }
executed 8 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
8
582-
583-
584 if (transparentProxy.type() == QNetworkProxy::DefaultProxy
transparentPro...::DefaultProxyDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 887 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-887
585 cacheProxy.type() == QNetworkProxy::DefaultProxy
cacheProxy.typ...::DefaultProxyDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
) {
0-3
586-
587 QMetaObject::invokeMethod(q, "_q_error", synchronous ? Qt::DirectConnection : Qt::QueuedConnection,-
588 QArgument<QNetworkReply::NetworkError >("QNetworkReply::NetworkError", QNetworkReply::ProxyNotFoundError),-
589 QArgument<QString >("QString", QNetworkReplyHttpImpl::tr("No suitable proxy found")));-
590 QMetaObject::invokeMethod(q, "_q_finished", synchronous ? Qt::DirectConnection : Qt::QueuedConnection);-
591 return;
executed 3 times by 1 test: return;
Executed by:
  • tst_QNetworkReply
3
592 }-
593-
594-
595 if (newHttpRequest.attribute(QNetworkRequest::FollowRedirectsAttribute).toBool()
newHttpRequest...bute).toBool()Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 878 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
)
9-878
596 httpRequest.setFollowRedirects(true);
executed 9 times by 1 test: httpRequest.setFollowRedirects(true);
Executed by:
  • tst_QNetworkReply
9
597-
598 httpRequest.setPriority(convert(newHttpRequest.priority()));-
599-
600 switch (operation) {-
601 case
executed 654 times by 7 tests: case QNetworkAccessManager::GetOperation:
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
QNetworkAccessManager::GetOperation:
executed 654 times by 7 tests: case QNetworkAccessManager::GetOperation:
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
654
602 httpRequest.setOperation(QHttpNetworkRequest::Get);-
603 if (loadFromCacheIfAllowed(httpRequest)
loadFromCacheI...d(httpRequest)Description
TRUEevaluated 18 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 636 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
)
18-636
604 return;
executed 18 times by 2 tests: return;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
18
605 break;
executed 636 times by 7 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
636
606-
607 case
executed 26 times by 1 test: case QNetworkAccessManager::HeadOperation:
Executed by:
  • tst_QNetworkReply
QNetworkAccessManager::HeadOperation:
executed 26 times by 1 test: case QNetworkAccessManager::HeadOperation:
Executed by:
  • tst_QNetworkReply
26
608 httpRequest.setOperation(QHttpNetworkRequest::Head);-
609 if (loadFromCacheIfAllowed(httpRequest)
loadFromCacheI...d(httpRequest)Description
TRUEnever evaluated
FALSEevaluated 26 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
0-26
610 return;
never executed: return;
0
611 break;
executed 26 times by 1 test: break;
Executed by:
  • tst_QNetworkReply
26
612-
613 case
executed 157 times by 3 tests: case QNetworkAccessManager::PostOperation:
Executed by:
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
QNetworkAccessManager::PostOperation:
executed 157 times by 3 tests: case QNetworkAccessManager::PostOperation:
Executed by:
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
157
614 invalidateCache();-
615 httpRequest.setOperation(QHttpNetworkRequest::Post);-
616 createUploadByteDevice();-
617 break;
executed 157 times by 3 tests: break;
Executed by:
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
157
618-
619 case
executed 36 times by 2 tests: case QNetworkAccessManager::PutOperation:
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
QNetworkAccessManager::PutOperation:
executed 36 times by 2 tests: case QNetworkAccessManager::PutOperation:
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
36
620 invalidateCache();-
621 httpRequest.setOperation(QHttpNetworkRequest::Put);-
622 createUploadByteDevice();-
623 break;
executed 36 times by 2 tests: break;
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
36
624-
625 case
executed 7 times by 1 test: case QNetworkAccessManager::DeleteOperation:
Executed by:
  • tst_QNetworkReply
QNetworkAccessManager::DeleteOperation:
executed 7 times by 1 test: case QNetworkAccessManager::DeleteOperation:
Executed by:
  • tst_QNetworkReply
7
626 invalidateCache();-
627 httpRequest.setOperation(QHttpNetworkRequest::Delete);-
628 break;
executed 7 times by 1 test: break;
Executed by:
  • tst_QNetworkReply
7
629-
630 case
executed 7 times by 1 test: case QNetworkAccessManager::CustomOperation:
Executed by:
  • tst_QNetworkReply
QNetworkAccessManager::CustomOperation:
executed 7 times by 1 test: case QNetworkAccessManager::CustomOperation:
Executed by:
  • tst_QNetworkReply
7
631 invalidateCache();-
632 httpRequest.setOperation(QHttpNetworkRequest::Custom);-
633 createUploadByteDevice();-
634 httpRequest.setCustomVerb(newHttpRequest.attribute(-
635 QNetworkRequest::CustomVerbAttribute).toByteArray());-
636 break;
executed 7 times by 1 test: break;
Executed by:
  • tst_QNetworkReply
7
637-
638 default
never executed: default:
:
never executed: default:
0
639 break;
never executed: break;
0
640 }-
641-
642 QList<QByteArray> headers = newHttpRequest.rawHeaderList();-
643 if (resumeOffset != 0
resumeOffset != 0Description
TRUEnever evaluated
FALSEevaluated 869 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-869
644 const int rangeIndex = headers.indexOf("Range");-
645 if (rangeIndex != -1
rangeIndex != -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
646-
647-
648 headers.removeAt(rangeIndex);-
649-
650-
651 QByteArray requestRange = newHttpRequest.rawHeader("Range").mid(6);-
652-
653 int index = requestRange.indexOf('-');-
654-
655 quint64 requestStartOffset = requestRange.left(index).toULongLong();-
656 quint64 requestEndOffset = requestRange.mid(index + 1).toULongLong();-
657-
658 requestRange = "bytes=" + QByteArray::number(resumeOffset + requestStartOffset) +-
659 '-' + QByteArray::number(requestEndOffset);-
660-
661 httpRequest.setHeaderField("Range", requestRange);-
662 }
never executed: end of block
else {
0
663 httpRequest.setHeaderField("Range", "bytes=" + QByteArray::number(resumeOffset) + '-');-
664 }
never executed: end of block
0
665 }-
666-
667 for (const QByteArray &header : qAsConst(headers))-
668 httpRequest.setHeaderField(header, newHttpRequest.rawHeader(header));
executed 319 times by 3 tests: httpRequest.setHeaderField(header, newHttpRequest.rawHeader(header));
Executed by:
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
319
669-
670 if (newHttpRequest.attribute(QNetworkRequest::HttpPipeliningAllowedAttribute).toBool()
newHttpRequest...bute).toBool()Description
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 849 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
)
20-849
671 httpRequest.setPipeliningAllowed(true);
executed 20 times by 1 test: httpRequest.setPipeliningAllowed(true);
Executed by:
  • tst_QNetworkReply
20
672-
673 if (request.attribute(QNetworkRequest::SpdyAllowedAttribute).toBool()
request.attrib...bute).toBool()Description
TRUEevaluated 113 times by 1 test
Evaluated by:
  • tst_Spdy
FALSEevaluated 756 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
)
113-756
674 httpRequest.setSPDYAllowed(true);
executed 113 times by 1 test: httpRequest.setSPDYAllowed(true);
Executed by:
  • tst_Spdy
113
675-
676 if (static_cast<
static_cast<QN...equest::ManualDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 868 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
QNetworkRequest::LoadControl>
static_cast<QN...equest::ManualDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 868 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
1-868
677 (newHttpRequest.attribute(QNetworkRequest::AuthenticationReuseAttribute,
static_cast<QN...equest::ManualDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 868 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
1-868
678 QNetworkRequest::Automatic).toInt()) == QNetworkRequest::Manual
static_cast<QN...equest::ManualDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 868 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
)
1-868
679 httpRequest.setWithCredentials(false);
executed 1 time by 1 test: httpRequest.setWithCredentials(false);
Executed by:
  • tst_QNetworkReply
1
680-
681 if (request.attribute(QNetworkRequest::EmitAllUploadProgressSignalsAttribute).toBool()
request.attrib...bute).toBool()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 868 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
)
1-868
682 emitAllUploadProgressSignals = true;
executed 1 time by 1 test: emitAllUploadProgressSignals = true;
Executed by:
  • tst_QNetworkReply
1
683-
684-
685-
686 QHttpThreadDelegate *delegate = new QHttpThreadDelegate;-
687-
688 delegate->networkSession = managerPrivate->getNetworkSession();-
689-
690-
691-
692-
693 QObject::connect(thread, qFlagLocation("2""finished()" "\0" __FILE__ ":" "763"), delegate, qFlagLocation("1""deleteLater()" "\0" __FILE__ ":" "763"));-
694-
695-
696 delegate->httpRequest = httpRequest;-
697-
698 delegate->cacheProxy = cacheProxy;-
699 delegate->transparentProxy = transparentProxy;-
700-
701 delegate->ssl = ssl;-
702-
703 if (ssl
sslDescription
TRUEevaluated 229 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 640 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
)
229-640
704 delegate->
executed 229 times by 2 tests: delegate->incomingSslConfiguration = newHttpRequest.sslConfiguration();
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
incomingSslConfiguration = newHttpRequest.sslConfiguration();
executed 229 times by 2 tests: delegate->incomingSslConfiguration = newHttpRequest.sslConfiguration();
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
229
705-
706-
707-
708 delegate->synchronous = synchronous;-
709-
710-
711-
712 delegate->authenticationManager = managerPrivate->authenticationManager;-
713-
714 if (!synchronous
!synchronousDescription
TRUEevaluated 793 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 76 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
76-793
715-
716 QVariant downloadBufferMaximumSizeAttribute = newHttpRequest.attribute(QNetworkRequest::MaximumDownloadBufferSizeAttribute);-
717 if (downloadBufferMaximumSizeAttribute.isValid()
downloadBuffer...bute.isValid()Description
TRUEevaluated 7 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 786 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
) {
7-786
718 delegate->downloadBufferMaximumSize = downloadBufferMaximumSizeAttribute.toLongLong();-
719 }
executed 7 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
else {
7
720-
721-
722-
723 delegate->downloadBufferMaximumSize = 128*1024;-
724 }
executed 786 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
786
725-
726-
727-
728 delegate->pendingDownloadData = pendingDownloadDataEmissions;-
729 delegate->pendingDownloadProgress = pendingDownloadProgressEmissions;-
730-
731-
732 QObject::connect(delegate, qFlagLocation("2""downloadData(QByteArray)" "\0" __FILE__ ":" "802"),-
733 q, qFlagLocation("1""replyDownloadData(QByteArray)" "\0" __FILE__ ":" "803"),-
734 Qt::QueuedConnection);-
735 QObject::connect(delegate, qFlagLocation("2""downloadFinished()" "\0" __FILE__ ":" "805"),-
736 q, qFlagLocation("1""replyFinished()" "\0" __FILE__ ":" "806"),-
737 Qt::QueuedConnection);-
738 QObject::connect(delegate, qFlagLocation("2""downloadMetaData(QList<QPair<QByteArray,QByteArray> >, int, QString, bool, QSharedPointer<char>, qint64, bool)" "\0"-
739-
740 __FILE__-
741 ":" "810")-
742-
743 ,-
744 q, qFlagLocation("1""replyDownloadMetaData(QList<QPair<QByteArray,QByteArray> >, int, QString, bool, QSharedPointer<char>, qint64, bool)" "\0"-
745-
746 __FILE__-
747 ":" "813")-
748-
749 ,-
750 Qt::QueuedConnection);-
751 QObject::connect(delegate, qFlagLocation("2""downloadProgress(qint64,qint64)" "\0" __FILE__ ":" "815"),-
752 q, qFlagLocation("1""replyDownloadProgressSlot(qint64,qint64)" "\0" __FILE__ ":" "816"),-
753 Qt::QueuedConnection);-
754 QObject::connect(delegate, qFlagLocation("2""error(QNetworkReply::NetworkError,QString)" "\0" __FILE__ ":" "818"),-
755 q, qFlagLocation("1""httpError(QNetworkReply::NetworkError,QString)" "\0" __FILE__ ":" "819"),-
756 Qt::QueuedConnection);-
757 QObject::connect(delegate, qFlagLocation("2""redirected(QUrl,int,int)" "\0" __FILE__ ":" "821"),-
758 q, qFlagLocation("1""onRedirected(QUrl,int,int)" "\0" __FILE__ ":" "822"),-
759 Qt::QueuedConnection);-
760-
761 QObject::connect(delegate, qFlagLocation("2""sslConfigurationChanged(QSslConfiguration)" "\0" __FILE__ ":" "825"),-
762 q, qFlagLocation("1""replySslConfigurationChanged(QSslConfiguration)" "\0" __FILE__ ":" "826"),-
763 Qt::QueuedConnection);-
764-
765-
766 QObject::connect(delegate, qFlagLocation("2""authenticationRequired(QHttpNetworkRequest,QAuthenticator*)" "\0" __FILE__ ":" "830"),-
767 q, qFlagLocation("1""httpAuthenticationRequired(QHttpNetworkRequest,QAuthenticator*)" "\0" __FILE__ ":" "831"),-
768 Qt::BlockingQueuedConnection);-
769-
770 QObject::connect(delegate, qFlagLocation("2""proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)" "\0" __FILE__ ":" "834"),-
771 q, qFlagLocation("1""proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)" "\0" __FILE__ ":" "835"),-
772 Qt::BlockingQueuedConnection);-
773-
774-
775 QObject::connect(delegate, qFlagLocation("2""encrypted()" "\0" __FILE__ ":" "839"), q, qFlagLocation("1""replyEncrypted()" "\0" __FILE__ ":" "839"),-
776 Qt::BlockingQueuedConnection);-
777 QObject::connect(delegate, qFlagLocation("2""sslErrors(QList<QSslError>,bool*,QList<QSslError>*)" "\0" __FILE__ ":" "841"),-
778 q, qFlagLocation("1""replySslErrors(QList<QSslError>,bool*,QList<QSslError>*)" "\0" __FILE__ ":" "842"),-
779 Qt::BlockingQueuedConnection);-
780 QObject::connect(delegate, qFlagLocation("2""preSharedKeyAuthenticationRequired(QSslPreSharedKeyAuthenticator*)" "\0" __FILE__ ":" "844"),-
781 q, qFlagLocation("1""replyPreSharedKeyAuthenticationRequiredSlot(QSslPreSharedKeyAuthenticator*)" "\0" __FILE__ ":" "845"),-
782 Qt::BlockingQueuedConnection);-
783-
784-
785 QObject::connect(q, qFlagLocation("2""startHttpRequest()" "\0" __FILE__ ":" "849"), delegate, qFlagLocation("1""startRequest()" "\0" __FILE__ ":" "849"));-
786 QObject::connect(q, qFlagLocation("2""abortHttpRequest()" "\0" __FILE__ ":" "850"), delegate, qFlagLocation("1""abortRequest()" "\0" __FILE__ ":" "850"));-
787-
788-
789 QObject::connect(q, qFlagLocation("2""readBufferSizeChanged(qint64)" "\0" __FILE__ ":" "853"), delegate, qFlagLocation("1""readBufferSizeChanged(qint64)" "\0" __FILE__ ":" "853"));-
790 QObject::connect(q, qFlagLocation("2""readBufferFreed(qint64)" "\0" __FILE__ ":" "854"), delegate, qFlagLocation("1""readBufferFreed(qint64)" "\0" __FILE__ ":" "854"));-
791-
792 if (uploadByteDevice
uploadByteDeviceDescription
TRUEevaluated 155 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
FALSEevaluated 638 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
) {
155-638
793 QNonContiguousByteDeviceThreadForwardImpl *forwardUploadDevice =-
794 new QNonContiguousByteDeviceThreadForwardImpl(uploadByteDevice->atEnd(), uploadByteDevice->size());-
795 forwardUploadDevice->setParent(delegate);-
796 delegate->httpRequest.setUploadByteDevice(forwardUploadDevice);-
797-
798-
799 QObject::connect(uploadByteDevice.data(), qFlagLocation("2""readyRead()" "\0" __FILE__ ":" "863"),-
800 q, qFlagLocation("1""uploadByteDeviceReadyReadSlot()" "\0" __FILE__ ":" "864"),-
801 Qt::QueuedConnection);-
802-
803-
804 QObject::connect(q, qFlagLocation("2""haveUploadData(qint64,QByteArray,bool,qint64)" "\0" __FILE__ ":" "868"),-
805 forwardUploadDevice, qFlagLocation("1""haveDataSlot(qint64,QByteArray,bool,qint64)" "\0" __FILE__ ":" "869"), Qt::QueuedConnection);-
806 QObject::connect(uploadByteDevice.data(), qFlagLocation("2""readyRead()" "\0" __FILE__ ":" "870"),-
807 forwardUploadDevice, qFlagLocation("2""readyRead()" "\0" __FILE__ ":" "871"),-
808 Qt::QueuedConnection);-
809-
810-
811 QObject::connect(forwardUploadDevice, qFlagLocation("2""wantData(qint64)" "\0" __FILE__ ":" "875"),-
812 q, qFlagLocation("1""wantUploadDataSlot(qint64)" "\0" __FILE__ ":" "876"));-
813 QObject::connect(forwardUploadDevice,qFlagLocation("2""processedData(qint64, qint64)" "\0" __FILE__ ":" "877"),-
814 q, qFlagLocation("1""sentUploadDataSlot(qint64,qint64)" "\0" __FILE__ ":" "878"));-
815 QObject::connect(forwardUploadDevice, qFlagLocation("2""resetData(bool*)" "\0" __FILE__ ":" "879"),-
816 q, qFlagLocation("1""resetUploadDataSlot(bool*)" "\0" __FILE__ ":" "880"),-
817 Qt::BlockingQueuedConnection);-
818 }
executed 155 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
155
819 }
executed 793 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 if (synchronous
synchronousDescription
TRUEevaluated 76 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
) {
0-793
820 QObject::connect(q, qFlagLocation("2""startHttpRequestSynchronously()" "\0" __FILE__ ":" "884"), delegate, qFlagLocation("1""startRequestSynchronously()" "\0" __FILE__ ":" "884"), Qt::BlockingQueuedConnection);-
821-
822 if (uploadByteDevice
uploadByteDeviceDescription
TRUEevaluated 41 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 35 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
35-41
823-
824-
825-
826-
827-
828-
829 delegate->httpRequest.setUploadByteDevice(uploadByteDevice.data());-
830 }
executed 41 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
41
831 }
executed 76 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
76
832-
833-
834-
835 delegate->moveToThread(thread);-
836-
837-
838-
839 downloadProgressSignalChoke.start();-
840 uploadProgressSignalChoke.invalidate();-
841-
842-
843 if (synchronous
synchronousDescription
TRUEevaluated 76 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 793 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
) {
76-793
844 q->startHttpRequestSynchronously();-
845-
846 if (delegate->
delegate->inco...Reply::NoErrorDescription
TRUEevaluated 13 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 63 times by 1 test
Evaluated by:
  • tst_QNetworkReply
incomingErrorCode != QNetworkReply::NoError
delegate->inco...Reply::NoErrorDescription
TRUEevaluated 13 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 63 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
13-63
847 replyDownloadMetaData-
848 (delegate->incomingHeaders,-
849 delegate->incomingStatusCode,-
850 delegate->incomingReasonPhrase,-
851 delegate->isPipeliningUsed,-
852 QSharedPointer<char>(),-
853 delegate->incomingContentLength,-
854 delegate->isSpdyUsed);-
855 replyDownloadData(delegate->synchronousDownloadData);-
856 httpError(delegate->incomingErrorCode, delegate->incomingErrorDetail);-
857 }
executed 13 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
else {
13
858 replyDownloadMetaData-
859 (delegate->incomingHeaders,-
860 delegate->incomingStatusCode,-
861 delegate->incomingReasonPhrase,-
862 delegate->isPipeliningUsed,-
863 QSharedPointer<char>(),-
864 delegate->incomingContentLength,-
865 delegate->isSpdyUsed);-
866 replyDownloadData(delegate->synchronousDownloadData);-
867 }
executed 63 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
63
868-
869 thread->quit();-
870 thread->wait(5000);-
871 if (thread->isFinished()
thread->isFinished()Description
TRUEevaluated 76 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
)
0-76
872 delete thread;
executed 76 times by 1 test: delete thread;
Executed by:
  • tst_QNetworkReply
76
873 else-
874 QObject::connect(thread, qFlagLocation("2""finished()" "\0" __FILE__ ":" "938"), thread, qFlagLocation("1""deleteLater()" "\0" __FILE__ ":" "938"));
never executed: QObject::connect(thread, qFlagLocation("2""finished()" "\0" __FILE__ ":" "938"), thread, qFlagLocation("1""deleteLater()" "\0" __FILE__ ":" "938"));
0
875-
876 finished();-
877 }
executed 76 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
else {
76
878 q->startHttpRequest();-
879 }
executed 793 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
793
880}-
881-
882void QNetworkReplyHttpImplPrivate::invalidateCache()-
883{-
884 QAbstractNetworkCache *nc = managerPrivate->networkCache;-
885 if (nc
ncDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 205 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
)
2-205
886 nc->remove(httpRequest.url());
executed 2 times by 1 test: nc->remove(httpRequest.url());
Executed by:
  • tst_QNetworkReply
2
887}
executed 207 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
207
888-
889void QNetworkReplyHttpImplPrivate::initCacheSaveDevice()-
890{-
891 QNetworkReplyHttpImpl * const q = q_func();-
892-
893-
894-
895 if (q->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt() == 206
q->attribute(Q...toInt() == 206Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 61 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
) {
1-61
896 cacheEnabled = false;-
897 return;
executed 1 time by 1 test: return;
Executed by:
  • tst_QNetworkReply
1
898 }-
899-
900-
901 QNetworkCacheMetaData metaData;-
902 metaData.setUrl(url);-
903 metaData = fetchCacheMetaData(metaData);-
904-
905-
906 QVariant redirectionTarget = q->attribute(QNetworkRequest::RedirectionTargetAttribute);-
907 if (redirectionTarget.isValid()
redirectionTarget.isValid()Description
TRUEnever evaluated
FALSEevaluated 61 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
) {
0-61
908 QNetworkCacheMetaData::AttributesMap attributes = metaData.attributes();-
909 attributes.insert(QNetworkRequest::RedirectionTargetAttribute, redirectionTarget);-
910 metaData.setAttributes(attributes);-
911 }
never executed: end of block
0
912-
913 cacheSaveDevice = managerPrivate->networkCache->prepare(metaData);-
914-
915 if (cacheSaveDevice
cacheSaveDeviceDescription
TRUEevaluated 54 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
FALSEevaluated 7 times by 1 test
Evaluated by:
  • tst_QAbstractNetworkCache
)
7-54
916 q->connect(cacheSaveDevice, qFlagLocation("2""aboutToClose()" "\0" __FILE__ ":" "980"), qFlagLocation("1""_q_cacheSaveDeviceAboutToClose()" "\0" __FILE__ ":" "980"));
executed 54 times by 3 tests: q->connect(cacheSaveDevice, qFlagLocation("2""aboutToClose()" "\0" __FILE__ ":" "980"), qFlagLocation("1""_q_cacheSaveDeviceAboutToClose()" "\0" __FILE__ ":" "980"));
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
54
917-
918 if (!cacheSaveDevice
!cacheSaveDeviceDescription
TRUEevaluated 7 times by 1 test
Evaluated by:
  • tst_QAbstractNetworkCache
FALSEevaluated 54 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
|| (cacheSaveDevice
cacheSaveDeviceDescription
TRUEevaluated 54 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
FALSEnever evaluated
&& !cacheSaveDevice->isOpen()
!cacheSaveDevice->isOpen()Description
TRUEnever evaluated
FALSEevaluated 54 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
)) {
0-54
919 if (__builtin_expect(!!(cacheSaveDevice && !cacheSaveDevice->isOpen()), false)
__builtin_expe...pen()), false)Description
TRUEnever evaluated
FALSEevaluated 7 times by 1 test
Evaluated by:
  • tst_QAbstractNetworkCache
)
0-7
920 QMessageLogger(__FILE__, 984, __PRETTY_FUNCTION__).critical("QNetworkReplyImpl: network cache returned a device that is not open -- "
never executed: QMessageLogger(__FILE__, 984, __PRETTY_FUNCTION__).critical("QNetworkReplyImpl: network cache returned a device that is not open -- " "class %s probably needs to be fixed", managerPrivate->networkCache->metaObject()->className());
0
921 "class %s probably needs to be fixed",
never executed: QMessageLogger(__FILE__, 984, __PRETTY_FUNCTION__).critical("QNetworkReplyImpl: network cache returned a device that is not open -- " "class %s probably needs to be fixed", managerPrivate->networkCache->metaObject()->className());
0
922 managerPrivate->networkCache->metaObject()->className());
never executed: QMessageLogger(__FILE__, 984, __PRETTY_FUNCTION__).critical("QNetworkReplyImpl: network cache returned a device that is not open -- " "class %s probably needs to be fixed", managerPrivate->networkCache->metaObject()->className());
0
923-
924 managerPrivate->networkCache->remove(url);-
925 cacheSaveDevice = 0;-
926 cacheEnabled = false;-
927 }
executed 7 times by 1 test: end of block
Executed by:
  • tst_QAbstractNetworkCache
7
928}
executed 61 times by 3 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
61
929-
930void QNetworkReplyHttpImplPrivate::replyDownloadData(QByteArray d)-
931{-
932 QNetworkReplyHttpImpl * const q = q_func();-
933-
934-
935 if (!q->isOpen()
!q->isOpen()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 6556 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
  • tst_Spdy
)
1-6556
936 return;
executed 1 time by 1 test: return;
Executed by:
  • tst_QNetworkReply
1
937-
938 int pendingSignals = (int)pendingDownloadDataEmissions->fetchAndAddAcquire(-1) - 1;-
939-
940 if (pendingSignals > 0
pendingSignals > 0Description
TRUEevaluated 1275 times by 3 tests
Evaluated by:
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 5281 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
  • tst_Spdy
) {
1275-5281
941-
942-
943-
944-
945 pendingDownloadData.append(d);-
946 return;
executed 1275 times by 3 tests: return;
Executed by:
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
  • tst_Spdy
1275
947 }-
948-
949 pendingDownloadData.append(d);-
950 d.clear();-
951-
952-
953-
954-
955 QByteDataBuffer pendingDownloadDataCopy = pendingDownloadData;-
956 pendingDownloadData.clear();-
957-
958 if (cacheEnabled
cacheEnabledDescription
TRUEevaluated 45 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 5236 times by 3 tests
Evaluated by:
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
  • tst_Spdy
&& isCachingAllowed()
isCachingAllowed()Description
TRUEevaluated 45 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEnever evaluated
&& !cacheSaveDevice
!cacheSaveDeviceDescription
TRUEevaluated 45 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEnever evaluated
) {
0-5236
959 initCacheSaveDevice();-
960 }
executed 45 times by 2 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
45
961-
962 qint64 bytesWritten = 0;-
963 for (int i = 0; i < pendingDownloadDataCopy.bufferCount()
i < pendingDow....bufferCount()Description
TRUEevaluated 6554 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 5281 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
  • tst_Spdy
; i++) {
5281-6554
964 QByteArray const &item = pendingDownloadDataCopy[i];-
965-
966-
967-
968-
969-
970-
971 if (cacheSaveDevice
cacheSaveDeviceDescription
TRUEevaluated 44 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 6510 times by 3 tests
Evaluated by:
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
  • tst_Spdy
)
44-6510
972 cacheSaveDevice->write(item.constData(), item.size());
executed 44 times by 2 tests: cacheSaveDevice->write(item.constData(), item.size());
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
44
973-
974 if (!isHttpRedirectResponse()
!isHttpRedirectResponse()Description
TRUEevaluated 6554 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
)
0-6554
975 buffer.append(item);
executed 6554 times by 4 tests: buffer.append(item);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
  • tst_Spdy
6554
976-
977 bytesWritten += item.size();-
978 }
executed 6554 times by 4 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
  • tst_Spdy
6554
979 bytesBuffered += bytesWritten;-
980 pendingDownloadDataCopy.clear();-
981-
982 QVariant totalSize = cookedHeaders.value(QNetworkRequest::ContentLengthHeader);-
983 if (preMigrationDownloaded != static_cast<long long>(-1LL)
preMigrationDo...ng long>(-1LL)Description
TRUEnever evaluated
FALSEevaluated 5281 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
  • tst_Spdy
)
0-5281
984 totalSize = totalSize.toLongLong() + preMigrationDownloaded;
never executed: totalSize = totalSize.toLongLong() + preMigrationDownloaded;
0
985-
986 if (isHttpRedirectResponse()
isHttpRedirectResponse()Description
TRUEnever evaluated
FALSEevaluated 5281 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
  • tst_Spdy
)
0-5281
987 return;
never executed: return;
0
988-
989 bytesDownloaded += bytesWritten;-
990-
991 q->readyRead();-
992-
993-
994 if (downloadProgressSignalChoke.elapsed() >= progressSignalInterval
downloadProgre...SignalIntervalDescription
TRUEevaluated 49 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 5232 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
  • tst_Spdy
) {
49-5232
995 downloadProgressSignalChoke.restart();-
996 q->downloadProgress(bytesDownloaded,-
997 totalSize.isNull() ? static_cast<long long>(-1LL) : totalSize.toLongLong());-
998 }
executed 49 times by 2 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
49
999-
1000}
executed 5281 times by 4 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
  • tst_Spdy
5281
1001-
1002void QNetworkReplyHttpImplPrivate::replyFinished()-
1003{-
1004-
1005-
1006 if (loadingFromCache
loadingFromCacheDescription
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QAbstractNetworkCache
FALSEevaluated 756 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
)
5-756
1007 return;
executed 5 times by 1 test: return;
Executed by:
  • tst_QAbstractNetworkCache
5
1008-
1009 finished();-
1010}
executed 756 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
756
1011-
1012QNetworkAccessManager::Operation QNetworkReplyHttpImplPrivate::getRedirectOperation(QNetworkAccessManager::Operation currentOp, int httpStatus)-
1013{-
1014-
1015-
1016-
1017 (void)httpStatus;;-
1018-
1019 switch (currentOp) {-
1020 case
never executed: case QNetworkAccessManager::HeadOperation:
QNetworkAccessManager::HeadOperation:
never executed: case QNetworkAccessManager::HeadOperation:
0
1021 return
never executed: return QNetworkAccessManager::HeadOperation;
QNetworkAccessManager::HeadOperation;
never executed: return QNetworkAccessManager::HeadOperation;
0
1022 default
executed 5 times by 1 test: default:
Executed by:
  • tst_QNetworkReply
:
executed 5 times by 1 test: default:
Executed by:
  • tst_QNetworkReply
5
1023 break;
executed 5 times by 1 test: break;
Executed by:
  • tst_QNetworkReply
5
1024 }-
1025-
1026 return
executed 5 times by 1 test: return QNetworkAccessManager::GetOperation;
Executed by:
  • tst_QNetworkReply
QNetworkAccessManager::GetOperation;
executed 5 times by 1 test: return QNetworkAccessManager::GetOperation;
Executed by:
  • tst_QNetworkReply
5
1027}-
1028-
1029bool QNetworkReplyHttpImplPrivate::isHttpRedirectResponse() const-
1030{-
1031 return
executed 14865 times by 7 tests: return httpRequest.isFollowRedirects() && QHttpNetworkReply::isHttpRedirect(statusCode);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
httpRequest.isFollowRedirects() && QHttpNetworkReply::isHttpRedirect(statusCode);
executed 14865 times by 7 tests: return httpRequest.isFollowRedirects() && QHttpNetworkReply::isHttpRedirect(statusCode);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
14865
1032}-
1033-
1034QNetworkRequest QNetworkReplyHttpImplPrivate::createRedirectRequest(const QNetworkRequest &originalRequest,-
1035 const QUrl &url,-
1036 int maxRedirectsRemaining)-
1037{-
1038 QNetworkRequest newRequest(originalRequest);-
1039 newRequest.setUrl(url);-
1040 newRequest.setMaximumRedirectsAllowed(maxRedirectsRemaining);-
1041-
1042 return
executed 5 times by 1 test: return newRequest;
Executed by:
  • tst_QNetworkReply
newRequest;
executed 5 times by 1 test: return newRequest;
Executed by:
  • tst_QNetworkReply
5
1043}-
1044-
1045void QNetworkReplyHttpImplPrivate::onRedirected(const QUrl &redirectUrl, int httpStatus, int maxRedirectsRemaining)-
1046{-
1047 QNetworkReplyHttpImpl * const q = q_func();-
1048-
1049 if (isFinished
isFinishedDescription
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
0-5
1050 return;
never executed: return;
0
1051-
1052 if (httpRequest.isFollowRedirects()
httpRequest.is...lowRedirects()Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
)
0-5
1053 url = redirectUrl;
executed 5 times by 1 test: url = redirectUrl;
Executed by:
  • tst_QNetworkReply
5
1054-
1055 QNetworkRequest redirectRequest = createRedirectRequest(originalRequest, redirectUrl, maxRedirectsRemaining);-
1056 operation = getRedirectOperation(operation, httpStatus);-
1057-
1058 cookedHeaders.clear();-
1059-
1060 if (managerPrivate->httpThread
managerPrivate->httpThreadDescription
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
)
0-5
1061 managerPrivate->httpThread->disconnect();
executed 5 times by 1 test: managerPrivate->httpThread->disconnect();
Executed by:
  • tst_QNetworkReply
5
1062-
1063-
1064 QMetaObject::invokeMethod(q, "start", Qt::QueuedConnection,-
1065 QArgument<QNetworkRequest >("QNetworkRequest", redirectRequest));-
1066-
1067 q->redirected(redirectUrl);-
1068}
executed 5 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
5
1069-
1070void QNetworkReplyHttpImplPrivate::checkForRedirect(const int statusCode)-
1071{-
1072 QNetworkReplyHttpImpl * const q = q_func();-
1073 switch (statusCode) {-
1074 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
1075 case
never executed: case 302:
302:
never executed: case 302:
0
1076 case
never executed: case 303:
303:
never executed: case 303:
0
1077 case
never executed: case 307:
307:
never executed: case 307:
0
1078-
1079-
1080-
1081 QByteArray header = q->rawHeader("location");-
1082 QUrl url = QUrl(QString::fromUtf8(header));-
1083 if (!url.isValid()
!url.isValid()Description
TRUEnever evaluated
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QNetworkProxyFactory
)
0-3
1084 url = QUrl(QLatin1String(header));
never executed: url = QUrl(QLatin1String(header));
0
1085 q->setAttribute(QNetworkRequest::RedirectionTargetAttribute, url);-
1086 }
executed 3 times by 1 test: end of block
Executed by:
  • tst_QNetworkProxyFactory
3
1087}
executed 817 times by 6 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
817
1088-
1089void QNetworkReplyHttpImplPrivate::replyDownloadMetaData(const QList<QPair<QByteArray,QByteArray> > &hm,-
1090 int sc, const QString &rp, bool pu,-
1091 QSharedPointer<char> db,-
1092 qint64 contentLength, bool spdyWasUsed)-
1093{-
1094 QNetworkReplyHttpImpl * const q = q_func();-
1095 (void)contentLength;;-
1096-
1097 statusCode = sc;-
1098 reasonPhrase = rp;-
1099-
1100-
1101 if (!db.isNull()
!db.isNull()Description
TRUEevaluated 364 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
FALSEevaluated 432 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
) {
364-432
1102 downloadBufferPointer = db;-
1103 downloadZerocopyBuffer = downloadBufferPointer.data();-
1104 downloadBufferCurrentSize = 0;-
1105 q->setAttribute(QNetworkRequest::DownloadBufferAttribute, QVariant::fromValue<QSharedPointer<char> > (downloadBufferPointer));-
1106 }
executed 364 times by 3 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
364
1107-
1108 q->setAttribute(QNetworkRequest::HttpPipeliningWasUsedAttribute, pu);-
1109 q->setAttribute(QNetworkRequest::SpdyWasUsedAttribute, spdyWasUsed);-
1110-
1111-
1112 QList<QPair<QByteArray, QByteArray> > headerMap = hm;-
1113 QList<QPair<QByteArray, QByteArray> >::ConstIterator it = headerMap.constBegin(),-
1114 end = headerMap.constEnd();-
1115 for (; it != end
it != endDescription
TRUEevaluated 5050 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 796 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
; ++it) {
796-5050
1116 QByteArray value = q->rawHeader(it->first);-
1117-
1118-
1119-
1120-
1121 if (it->first.toLower() == "location"
it->first.toLo... == "location"Description
TRUEevaluated 43 times by 2 tests
Evaluated by:
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
FALSEevaluated 5007 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
)
43-5007
1122 value.clear();
executed 43 times by 2 tests: value.clear();
Executed by:
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
43
1123-
1124 if (!value.isEmpty()
!value.isEmpty()Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 5045 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
) {
5-5045
1125-
1126-
1127 if (qstricmp(it->first.constData(), "set-cookie") == 0
qstricmp(it->f...-cookie") == 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
2-3
1128 value += '\n';
executed 2 times by 1 test: value += '\n';
Executed by:
  • tst_QNetworkReply
2
1129 else-
1130 value += ", ";
executed 3 times by 1 test: value += ", ";
Executed by:
  • tst_QNetworkReply
3
1131 }-
1132 value += it->second;-
1133 q->setRawHeader(it->first, value);-
1134 }
executed 5050 times by 6 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
5050
1135-
1136 q->setAttribute(QNetworkRequest::HttpStatusCodeAttribute, statusCode);-
1137 q->setAttribute(QNetworkRequest::HttpReasonPhraseAttribute, reasonPhrase);-
1138-
1139-
1140 if (!isHttpRedirectResponse()
!isHttpRedirectResponse()Description
TRUEevaluated 790 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
6-790
1141 checkForRedirect(statusCode);
executed 790 times by 6 tests: checkForRedirect(statusCode);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
790
1142-
1143 if (statusCode >= 500
statusCode >= 500Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 795 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
&& statusCode < 600
statusCode < 600Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
) {
0-795
1144 QAbstractNetworkCache *nc = managerPrivate->networkCache;-
1145 if (nc
ncDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
0-1
1146 QNetworkCacheMetaData metaData = nc->metaData(httpRequest.url());-
1147 QNetworkHeadersPrivate cacheHeaders;-
1148 cacheHeaders.setAllRawHeaders(metaData.rawHeaders());-
1149 QNetworkHeadersPrivate::RawHeadersList::ConstIterator it;-
1150 it = cacheHeaders.findRawHeader("Cache-Control");-
1151 bool mustReValidate = false;-
1152 if (it != cacheHeaders.rawHeaders.constEnd()
it != cacheHea...ers.constEnd()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1153 QHash<QByteArray, QByteArray> cacheControl = parseHttpOptionHeader(it->second);-
1154 if (cacheControl.contains("must-revalidate")
cacheControl.c...t-revalidate")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1155 mustReValidate = true;
never executed: mustReValidate = true;
0
1156 }
never executed: end of block
0
1157 if (!mustReValidate
!mustReValidateDescription
TRUEnever evaluated
FALSEnever evaluated
&& sendCacheContents(metaData)
sendCacheContents(metaData)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1158 return;
never executed: return;
0
1159 }
never executed: end of block
0
1160 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_QNetworkReply
1
1161-
1162 if (statusCode == 304
statusCode == 304Description
TRUEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 787 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
) {
9-787
1163-
1164-
1165-
1166 QAbstractNetworkCache *nc = managerPrivate->networkCache;-
1167 if (nc
ncDescription
TRUEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEnever evaluated
) {
0-9
1168 QNetworkCacheMetaData oldMetaData = nc->metaData(httpRequest.url());-
1169 QNetworkCacheMetaData metaData = fetchCacheMetaData(oldMetaData);-
1170 if (oldMetaData != metaData
oldMetaData != metaDataDescription
TRUEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEnever evaluated
)
0-9
1171 nc->updateMetaData(metaData);
executed 9 times by 2 tests: nc->updateMetaData(metaData);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
9
1172 if (sendCacheContents(metaData)
sendCacheContents(metaData)Description
TRUEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEnever evaluated
)
0-9
1173 return;
executed 9 times by 2 tests: return;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
9
1174 }
never executed: end of block
0
1175 }
never executed: end of block
0
1176-
1177-
1178 if (statusCode != 304
statusCode != 304Description
TRUEevaluated 787 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
&& statusCode != 303
statusCode != 303Description
TRUEevaluated 787 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
) {
0-787
1179 if (!isCachingEnabled()
!isCachingEnabled()Description
TRUEevaluated 787 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
)
0-787
1180 setCachingEnabled(true);
executed 787 times by 6 tests: setCachingEnabled(true);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
787
1181 }
executed 787 times by 6 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
787
1182-
1183 _q_metaDataChanged();-
1184}
executed 787 times by 6 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
787
1185-
1186void QNetworkReplyHttpImplPrivate::replyDownloadProgressSlot(qint64 bytesReceived, qint64 bytesTotal)-
1187{-
1188 QNetworkReplyHttpImpl * const q = q_func();-
1189-
1190-
1191 if (!q->isOpen()
!q->isOpen()Description
TRUEnever evaluated
FALSEevaluated 1489 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
)
0-1489
1192 return;
never executed: return;
0
1193-
1194-
1195-
1196 int pendingSignals = (int)pendingDownloadProgressEmissions->fetchAndAddAcquire(-1) - 1;-
1197 if (pendingSignals > 0
pendingSignals > 0Description
TRUEevaluated 205 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 1284 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
) {
205-1284
1198-
1199-
1200 return;
executed 205 times by 1 test: return;
Executed by:
  • tst_QNetworkReply
205
1201 }-
1202-
1203 if (!q->isOpen()
!q->isOpen()Description
TRUEnever evaluated
FALSEevaluated 1284 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
)
0-1284
1204 return;
never executed: return;
0
1205-
1206 if (cacheEnabled
cacheEnabledDescription
TRUEevaluated 19 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
FALSEevaluated 1265 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
&& isCachingAllowed()
isCachingAllowed()Description
TRUEevaluated 18 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
&& bytesReceived == bytesTotal
bytesReceived == bytesTotalDescription
TRUEevaluated 17 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkDiskCache
) {
1-1265
1207-
1208 initCacheSaveDevice();-
1209-
1210 if (cacheSaveDevice
cacheSaveDeviceDescription
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
FALSEevaluated 7 times by 1 test
Evaluated by:
  • tst_QAbstractNetworkCache
&& cacheEnabled
cacheEnabledDescription
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
FALSEnever evaluated
)
0-10
1211 cacheSaveDevice->write(downloadZerocopyBuffer, bytesTotal);
executed 10 times by 2 tests: cacheSaveDevice->write(downloadZerocopyBuffer, bytesTotal);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
10
1212-
1213 }
executed 17 times by 2 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
17
1214-
1215 if (isHttpRedirectResponse()
isHttpRedirectResponse()Description
TRUEnever evaluated
FALSEevaluated 1284 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
)
0-1284
1216 return;
never executed: return;
0
1217-
1218 bytesDownloaded = bytesReceived;-
1219-
1220 downloadBufferCurrentSize = bytesReceived;-
1221-
1222-
1223-
1224-
1225 if (bytesDownloaded > 0
bytesDownloaded > 0Description
TRUEevaluated 1284 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
FALSEnever evaluated
)
0-1284
1226 q->readyRead();
executed 1284 times by 3 tests: q->readyRead();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
1284
1227 if (downloadProgressSignalChoke.elapsed() >= progressSignalInterval
downloadProgre...SignalIntervalDescription
TRUEevaluated 58 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 1226 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
) {
58-1226
1228 downloadProgressSignalChoke.restart();-
1229 q->downloadProgress(bytesDownloaded, bytesTotal);-
1230 }
executed 58 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
58
1231}
executed 1284 times by 3 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
1284
1232-
1233void QNetworkReplyHttpImplPrivate::httpAuthenticationRequired(const QHttpNetworkRequest &request,-
1234 QAuthenticator *auth)-
1235{-
1236 managerPrivate->authenticationRequired(auth, q_func(), synchronous, url, &urlForLastAuthentication, request.withCredentials());-
1237}
executed 124 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
124
1238-
1239-
1240void QNetworkReplyHttpImplPrivate::proxyAuthenticationRequired(const QNetworkProxy &proxy,-
1241 QAuthenticator *authenticator)-
1242{-
1243 managerPrivate->proxyAuthenticationRequired(request.url(), proxy, synchronous, authenticator, &lastProxyAuthentication);-
1244}
executed 68 times by 2 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
68
1245-
1246-
1247void QNetworkReplyHttpImplPrivate::httpError(QNetworkReply::NetworkError errorCode,-
1248 const QString &errorString)-
1249{-
1250-
1251-
1252-
1253-
1254-
1255 error(errorCode, errorString);-
1256}
executed 112 times by 4 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
112
1257-
1258-
1259void QNetworkReplyHttpImplPrivate::replyEncrypted()-
1260{-
1261 QNetworkReplyHttpImpl * const q = q_func();-
1262 q->encrypted();-
1263}
executed 75 times by 2 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
75
1264-
1265void QNetworkReplyHttpImplPrivate::replySslErrors(-
1266 const QList<QSslError> &list, bool *ignoreAll, QList<QSslError> *toBeIgnored)-
1267{-
1268 QNetworkReplyHttpImpl * const q = q_func();-
1269 q->sslErrors(list);-
1270-
1271 if (pendingIgnoreAllSslErrors
pendingIgnoreAllSslErrorsDescription
TRUEevaluated 32 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
)
16-32
1272 *
executed 32 times by 2 tests: *ignoreAll = true;
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
ignoreAll = true;
executed 32 times by 2 tests: *ignoreAll = true;
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
32
1273 if (!pendingIgnoreSslErrorsList.isEmpty()
!pendingIgnore...List.isEmpty()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 42 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
)
6-42
1274 *
executed 6 times by 1 test: *toBeIgnored = pendingIgnoreSslErrorsList;
Executed by:
  • tst_QNetworkReply
toBeIgnored = pendingIgnoreSslErrorsList;
executed 6 times by 1 test: *toBeIgnored = pendingIgnoreSslErrorsList;
Executed by:
  • tst_QNetworkReply
6
1275}
executed 48 times by 2 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
48
1276-
1277void QNetworkReplyHttpImplPrivate::replySslConfigurationChanged(const QSslConfiguration &sslConfiguration)-
1278{-
1279-
1280 this->sslConfiguration = sslConfiguration;-
1281}
executed 526 times by 2 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
526
1282-
1283void QNetworkReplyHttpImplPrivate::replyPreSharedKeyAuthenticationRequiredSlot(QSslPreSharedKeyAuthenticator *authenticator)-
1284{-
1285 QNetworkReplyHttpImpl * const q = q_func();-
1286 q->preSharedKeyAuthenticationRequired(authenticator);-
1287}
never executed: end of block
0
1288-
1289-
1290-
1291void QNetworkReplyHttpImplPrivate::resetUploadDataSlot(bool *r)-
1292{-
1293 *r = uploadByteDevice->reset();-
1294 if (*
*rDescription
TRUEevaluated 126 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
r
*rDescription
TRUEevaluated 126 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
1-126
1295-
1296 uploadByteDevicePosition = 0;-
1297 }
executed 126 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
126
1298}
executed 127 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
127
1299-
1300-
1301void QNetworkReplyHttpImplPrivate::sentUploadDataSlot(qint64 pos, qint64 amount)-
1302{-
1303 if (uploadByteDevicePosition + amount != pos
uploadByteDevi... amount != posDescription
TRUEnever evaluated
FALSEevaluated 2695 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
) {
0-2695
1304-
1305 error(QNetworkReply::UnknownNetworkError, QString());-
1306 return;
never executed: return;
0
1307 }-
1308 uploadByteDevice->advanceReadPointer(amount);-
1309 uploadByteDevicePosition += amount;-
1310}
executed 2695 times by 2 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
2695
1311-
1312-
1313void QNetworkReplyHttpImplPrivate::wantUploadDataSlot(qint64 maxSize)-
1314{-
1315 QNetworkReplyHttpImpl * const q = q_func();-
1316-
1317-
1318 qint64 currentUploadDataLength = 0;-
1319 char *data = const_cast<char*>(uploadByteDevice->readPointer(maxSize, currentUploadDataLength));-
1320-
1321 if (currentUploadDataLength == 0
currentUploadDataLength == 0Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 2710 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
) {
4-2710
1322 uploadDeviceChoking = true;-
1323-
1324-
1325 return;
executed 4 times by 1 test: return;
Executed by:
  • tst_QNetworkReply
4
1326 } else {-
1327 uploadDeviceChoking = false;-
1328 }
executed 2710 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
2710
1329-
1330-
1331 QByteArray dataArray(data, currentUploadDataLength);-
1332-
1333-
1334 q->haveUploadData(uploadByteDevicePosition, dataArray, uploadByteDevice->atEnd(), uploadByteDevice->size());-
1335}
executed 2710 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
2710
1336-
1337void QNetworkReplyHttpImplPrivate::uploadByteDeviceReadyReadSlot()-
1338{-
1339-
1340-
1341-
1342 if (uploadDeviceChoking
uploadDeviceChokingDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
4-6
1343 uploadDeviceChoking = false;-
1344 wantUploadDataSlot(1024);-
1345 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
4
1346}
executed 10 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
10
1347-
1348-
1349-
1350-
1351-
1352bool QNetworkReplyHttpImplPrivate::sendCacheContents(const QNetworkCacheMetaData &metaData)-
1353{-
1354 QNetworkReplyHttpImpl * const q = q_func();-
1355-
1356 setCachingEnabled(false);-
1357 if (!metaData.isValid()
!metaData.isValid()Description
TRUEnever evaluated
FALSEevaluated 27 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
)
0-27
1358 return
never executed: return false;
false;
never executed: return false;
0
1359-
1360 QAbstractNetworkCache *nc = managerPrivate->networkCache;-
1361 ((!(nc)) ? qt_assert("nc",__FILE__,1425) : qt_noop());-
1362 QIODevice *contents = nc->data(url);-
1363 if (!contents
!contentsDescription
TRUEnever evaluated
FALSEevaluated 27 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
) {
0-27
1364-
1365-
1366-
1367 return
never executed: return false;
false;
never executed: return false;
0
1368 }-
1369 contents->setParent(q);-
1370-
1371 QNetworkCacheMetaData::AttributesMap attributes = metaData.attributes();-
1372 int status = attributes.value(QNetworkRequest::HttpStatusCodeAttribute).toInt();-
1373 if (status < 100
status < 100Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 19 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
)
8-19
1374 status = 200;
executed 8 times by 1 test: status = 200;
Executed by:
  • tst_QNetworkReply
8
1375-
1376 statusCode = status;-
1377-
1378 q->setAttribute(QNetworkRequest::HttpStatusCodeAttribute, status);-
1379 q->setAttribute(QNetworkRequest::HttpReasonPhraseAttribute, attributes.value(QNetworkRequest::HttpReasonPhraseAttribute));-
1380 q->setAttribute(QNetworkRequest::SourceIsFromCacheAttribute, true);-
1381-
1382 QNetworkCacheMetaData::RawHeaderList rawHeaders = metaData.rawHeaders();-
1383 QNetworkCacheMetaData::RawHeaderList::ConstIterator it = rawHeaders.constBegin(),-
1384 end = rawHeaders.constEnd();-
1385 QUrl redirectUrl;-
1386 for ( ; it != end
it != endDescription
TRUEevaluated 100 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 27 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
; ++it) {
27-100
1387 if (httpRequest.isFollowRedirects()
httpRequest.is...lowRedirects()Description
TRUEnever evaluated
FALSEevaluated 100 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
&&
0-100
1388 !qstricmp(it->first.toLower().constData(), "location")
!qstricmp(it->...), "location")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1389 redirectUrl = QUrl::fromEncoded(it->second);
never executed: redirectUrl = QUrl::fromEncoded(it->second);
0
1390 setRawHeader(it->first, it->second);-
1391 }
executed 100 times by 2 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
100
1392-
1393 if (!isHttpRedirectResponse()
!isHttpRedirectResponse()Description
TRUEevaluated 27 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEnever evaluated
)
0-27
1394 checkForRedirect(status);
executed 27 times by 2 tests: checkForRedirect(status);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
27
1395-
1396 cacheLoadDevice = contents;-
1397 q->connect(cacheLoadDevice, qFlagLocation("2""readyRead()" "\0" __FILE__ ":" "1461"), qFlagLocation("1""_q_cacheLoadReadyRead()" "\0" __FILE__ ":" "1461"));-
1398 q->connect(cacheLoadDevice, qFlagLocation("2""readChannelFinished()" "\0" __FILE__ ":" "1462"), qFlagLocation("1""_q_cacheLoadReadyRead()" "\0" __FILE__ ":" "1462"));-
1399-
1400-
1401-
1402-
1403 QMetaObject::invokeMethod(q, "_q_metaDataChanged", Qt::QueuedConnection);-
1404 QMetaObject::invokeMethod(q, "_q_cacheLoadReadyRead", Qt::QueuedConnection);-
1405-
1406-
1407-
1408-
1409-
1410-
1411-
1412 if (httpRequest.isFollowRedirects()
httpRequest.is...lowRedirects()Description
TRUEnever evaluated
FALSEevaluated 27 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
&& QHttpNetworkReply::isHttpRedirect(status)
QHttpNetworkRe...direct(status)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0-27
1413 QMetaObject::invokeMethod(q, "onRedirected", Qt::QueuedConnection,-
1414 QArgument<QUrl >("QUrl", redirectUrl),-
1415 QArgument<int >("int", status),-
1416 QArgument<int >("int", httpRequest.redirectCount() - 1));-
1417 }
never executed: end of block
0
1418-
1419-
1420-
1421 loadingFromCache = true;-
1422 return
executed 27 times by 2 tests: return true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
true;
executed 27 times by 2 tests: return true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
27
1423}-
1424-
1425QNetworkCacheMetaData QNetworkReplyHttpImplPrivate::fetchCacheMetaData(const QNetworkCacheMetaData &oldMetaData) const-
1426{-
1427 const QNetworkReplyHttpImpl * const q = q_func();-
1428-
1429 QNetworkCacheMetaData metaData = oldMetaData;-
1430-
1431 QNetworkHeadersPrivate cacheHeaders;-
1432 cacheHeaders.setAllRawHeaders(metaData.rawHeaders());-
1433 QNetworkHeadersPrivate::RawHeadersList::ConstIterator it;-
1434-
1435 const QList<QByteArray> newHeaders = q->rawHeaderList();-
1436 for (QByteArray header : newHeaders) {-
1437 QByteArray originalHeader = header;-
1438 header = header.toLower();-
1439 bool hop_by_hop =-
1440 (header == "connection"
header == "connection"Description
TRUEevaluated 69 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 387 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
69-387
1441 || header == "keep-alive"
header == "keep-alive"Description
TRUEevaluated 62 times by 1 test
Evaluated by:
  • tst_QAbstractNetworkCache
FALSEevaluated 325 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
62-325
1442 || header == "proxy-authenticate"
header == "proxy-authenticate"Description
TRUEnever evaluated
FALSEevaluated 325 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
0-325
1443 || header == "proxy-authorization"
header == "pro...authorization"Description
TRUEnever evaluated
FALSEevaluated 325 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
0-325
1444 || header == "te"
header == "te"Description
TRUEnever evaluated
FALSEevaluated 325 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
0-325
1445 || header == "trailers"
header == "trailers"Description
TRUEnever evaluated
FALSEevaluated 325 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
0-325
1446 || header == "transfer-encoding"
header == "transfer-encoding"Description
TRUEevaluated 41 times by 1 test
Evaluated by:
  • tst_QAbstractNetworkCache
FALSEevaluated 284 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
41-284
1447 || header == "upgrade"
header == "upgrade"Description
TRUEnever evaluated
FALSEevaluated 284 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
);
0-284
1448 if (hop_by_hop
hop_by_hopDescription
TRUEevaluated 172 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 284 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
)
172-284
1449 continue;
executed 172 times by 2 tests: continue;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
172
1450-
1451 if (header == "set-cookie"
header == "set-cookie"Description
TRUEnever evaluated
FALSEevaluated 284 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
)
0-284
1452 continue;
never executed: continue;
0
1453 if (header == "warning"
header == "warning"Description
TRUEnever evaluated
FALSEevaluated 284 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
) {
0-284
1454 QByteArray v = q->rawHeader(header);-
1455 if (v.length() == 3
v.length() == 3Description
TRUEnever evaluated
FALSEnever evaluated
0
1456 && v[0] == '1'
v[0] == '1'Description
TRUEnever evaluated
FALSEnever evaluated
0
1457 && v[1] >= '0'
v[1] >= '0'Description
TRUEnever evaluated
FALSEnever evaluated
&& v[1] <= '9'
v[1] <= '9'Description
TRUEnever evaluated
FALSEnever evaluated
0
1458 && v[2] >= '0'
v[2] >= '0'Description
TRUEnever evaluated
FALSEnever evaluated
&& v[2] <= '9'
v[2] <= '9'Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1459 continue;
never executed: continue;
0
1460 }
never executed: end of block
0
1461-
1462 it = cacheHeaders.findRawHeader(header);-
1463 if (it != cacheHeaders.rawHeaders.constEnd()
it != cacheHea...ers.constEnd()Description
TRUEevaluated 13 times by 1 test
Evaluated by:
  • tst_QAbstractNetworkCache
FALSEevaluated 271 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
) {
13-271
1464-
1465 if (header == "content-encoding"
header == "content-encoding"Description
TRUEnever evaluated
FALSEevaluated 13 times by 1 test
Evaluated by:
  • tst_QAbstractNetworkCache
0-13
1466 || header == "content-range"
header == "content-range"Description
TRUEnever evaluated
FALSEevaluated 13 times by 1 test
Evaluated by:
  • tst_QAbstractNetworkCache
0-13
1467 || header == "content-type"
header == "content-type"Description
TRUEnever evaluated
FALSEevaluated 13 times by 1 test
Evaluated by:
  • tst_QAbstractNetworkCache
)
0-13
1468 continue;
never executed: continue;
0
1469-
1470-
1471-
1472 if (header == "content-length"
header == "content-length"Description
TRUEnever evaluated
FALSEevaluated 13 times by 1 test
Evaluated by:
  • tst_QAbstractNetworkCache
)
0-13
1473 continue;
never executed: continue;
0
1474 }
executed 13 times by 1 test: end of block
Executed by:
  • tst_QAbstractNetworkCache
13
1475 cacheHeaders.setRawHeader(originalHeader, q->rawHeader(header));-
1476 }
executed 284 times by 3 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
284
1477 metaData.setRawHeaders(cacheHeaders.rawHeaders);-
1478-
1479 bool checkExpired = true;-
1480-
1481 QHash<QByteArray, QByteArray> cacheControl;-
1482 it = cacheHeaders.findRawHeader("Cache-Control");-
1483 if (it != cacheHeaders.rawHeaders.constEnd()
it != cacheHea...ers.constEnd()Description
TRUEevaluated 28 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 42 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
) {
28-42
1484 cacheControl = parseHttpOptionHeader(it->second);-
1485 QByteArray maxAge = cacheControl.value("max-age");-
1486 if (!maxAge.isEmpty()
!maxAge.isEmpty()Description
TRUEevaluated 21 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 7 times by 1 test
Evaluated by:
  • tst_QAbstractNetworkCache
) {
7-21
1487 checkExpired = false;-
1488 QDateTime dt = QDateTime::currentDateTimeUtc();-
1489 dt = dt.addSecs(maxAge.toInt());-
1490 metaData.setExpirationDate(dt);-
1491 }
executed 21 times by 2 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
21
1492 }
executed 28 times by 2 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
28
1493 if (checkExpired
checkExpiredDescription
TRUEevaluated 49 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
FALSEevaluated 21 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
) {
21-49
1494 it = cacheHeaders.findRawHeader("expires");-
1495 if (it != cacheHeaders.rawHeaders.constEnd()
it != cacheHea...ers.constEnd()Description
TRUEevaluated 17 times by 1 test
Evaluated by:
  • tst_QAbstractNetworkCache
FALSEevaluated 32 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
) {
17-32
1496 QDateTime expiredDateTime = QNetworkHeadersPrivate::fromHttpDate(it->second);-
1497 metaData.setExpirationDate(expiredDateTime);-
1498 }
executed 17 times by 1 test: end of block
Executed by:
  • tst_QAbstractNetworkCache
17
1499 }
executed 49 times by 2 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
49
1500-
1501 it = cacheHeaders.findRawHeader("last-modified");-
1502 if (it != cacheHeaders.rawHeaders.constEnd()
it != cacheHea...ers.constEnd()Description
TRUEevaluated 29 times by 1 test
Evaluated by:
  • tst_QAbstractNetworkCache
FALSEevaluated 41 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
)
29-41
1503 metaData.setLastModified(QNetworkHeadersPrivate::fromHttpDate(it->second));
executed 29 times by 1 test: metaData.setLastModified(QNetworkHeadersPrivate::fromHttpDate(it->second));
Executed by:
  • tst_QAbstractNetworkCache
29
1504-
1505 bool canDiskCache;-
1506-
1507-
1508 if (httpRequest.operation() == QHttpNetworkRequest::Get
httpRequest.op...rkRequest::GetDescription
TRUEevaluated 70 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
FALSEnever evaluated
) {
0-70
1509-
1510 canDiskCache = true;-
1511-
1512-
1513-
1514 it = cacheHeaders.findRawHeader("pragma");-
1515 if (it != cacheHeaders.rawHeaders.constEnd()
it != cacheHea...ers.constEnd()Description
TRUEnever evaluated
FALSEevaluated 70 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
0-70
1516 && it->second == "no-cache"
it->second == "no-cache"Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1517 canDiskCache = false;
never executed: canDiskCache = false;
0
1518-
1519-
1520 if (cacheControl.contains("no-cache")
cacheControl.c...ns("no-cache")Description
TRUEevaluated 7 times by 1 test
Evaluated by:
  • tst_QAbstractNetworkCache
FALSEevaluated 63 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
)
7-63
1521 canDiskCache = false;
executed 7 times by 1 test: canDiskCache = false;
Executed by:
  • tst_QAbstractNetworkCache
7
1522 else if (cacheControl.contains("no-store")
cacheControl.c...ns("no-store")Description
TRUEnever evaluated
FALSEevaluated 63 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
)
0-63
1523 canDiskCache = false;
never executed: canDiskCache = false;
0
1524-
1525-
1526 }
executed 70 times by 3 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
else if (httpRequest.operation() == QHttpNetworkRequest::Post
httpRequest.op...kRequest::PostDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0-70
1527-
1528 canDiskCache = false;-
1529-
1530-
1531 if (cacheControl.contains("max-age")
cacheControl.c...ins("max-age")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1532 canDiskCache = true;
never executed: canDiskCache = true;
0
1533-
1534-
1535 }
never executed: end of block
else {
0
1536 canDiskCache = false;-
1537 }
never executed: end of block
0
1538-
1539 metaData.setSaveToDisk(canDiskCache);-
1540 QNetworkCacheMetaData::AttributesMap attributes;-
1541 if (statusCode != 304
statusCode != 304Description
TRUEevaluated 61 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
FALSEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
) {
9-61
1542-
1543 attributes.insert(QNetworkRequest::HttpStatusCodeAttribute, statusCode);-
1544 attributes.insert(QNetworkRequest::HttpReasonPhraseAttribute, reasonPhrase);-
1545 }
executed 61 times by 3 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
else {
61
1546-
1547 attributes = oldMetaData.attributes();-
1548 }
executed 9 times by 2 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
9
1549 metaData.setAttributes(attributes);-
1550 return
executed 70 times by 3 tests: return metaData;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
metaData;
executed 70 times by 3 tests: return metaData;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
70
1551}-
1552-
1553bool QNetworkReplyHttpImplPrivate::canResume() const-
1554{-
1555 const QNetworkReplyHttpImpl * const q = q_func();-
1556-
1557-
1558 if (operation != QNetworkAccessManager::GetOperation
operation != Q...::GetOperationDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1559 return
never executed: return false;
false;
never executed: return false;
0
1560-
1561-
1562 QByteArray acceptRangesheaderName("Accept-Ranges");-
1563 if (!q->hasRawHeader(acceptRangesheaderName)
!q->hasRawHead...gesheaderName)Description
TRUEnever evaluated
FALSEnever evaluated
|| q->rawHeader(acceptRangesheaderName) == "none"
q->rawHeader(a...ame) == "none"Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1564 return
never executed: return false;
false;
never executed: return false;
0
1565-
1566-
1567 if (request.hasRawHeader("Range")
request.hasRawHeader("Range")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1568 QByteArray range = request.rawHeader("Range");-
1569 if (!range.startsWith("bytes=")
!range.startsWith("bytes=")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1570 return
never executed: return false;
false;
never executed: return false;
0
1571 }
never executed: end of block
0
1572-
1573-
1574-
1575 if (downloadZerocopyBuffer
downloadZerocopyBufferDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1576 return
never executed: return false;
false;
never executed: return false;
0
1577-
1578 return
never executed: return true;
true;
never executed: return true;
0
1579}-
1580-
1581void QNetworkReplyHttpImplPrivate::setResumeOffset(quint64 offset)-
1582{-
1583 resumeOffset = offset;-
1584}
never executed: end of block
0
1585-
1586-
1587-
1588-
1589-
1590-
1591bool QNetworkReplyHttpImplPrivate::start(const QNetworkRequest &newHttpRequest)-
1592{-
1593-
1594 QSharedPointer<QNetworkSession> networkSession(managerPrivate->getNetworkSession());-
1595 if (!networkSession
!networkSessionDescription
TRUEnever evaluated
FALSEevaluated 946 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-946
1596-
1597 postRequest(newHttpRequest);-
1598 return
never executed: return true;
true;
never executed: return true;
0
1599-
1600 }-
1601-
1602-
1603 const QString host = url.host();-
1604 if (host == QLatin1String("localhost")
host == QLatin...g("localhost")Description
TRUEevaluated 138 times by 2 tests
Evaluated by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
FALSEevaluated 808 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
||
138-808
1605 QHostAddress(host).isLoopback()
QHostAddress(h...).isLoopback()Description
TRUEevaluated 43 times by 4 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QXmlInputSource
FALSEevaluated 765 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
) {
43-765
1606-
1607 postRequest(newHttpRequest);-
1608 return
executed 181 times by 4 tests: return true;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QXmlInputSource
true;
executed 181 times by 4 tests: return true;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QXmlInputSource
181
1609 }-
1610-
1611 if (networkSession->isOpen()
networkSession->isOpen()Description
TRUEevaluated 709 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 56 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
&&
56-709
1612 networkSession->state() == QNetworkSession::Connected
networkSession...ion::ConnectedDescription
TRUEevaluated 709 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
) {
0-709
1613 QNetworkReplyHttpImpl * const q = q_func();-
1614 QObject::connect(networkSession.data(), qFlagLocation("2""usagePoliciesChanged(QNetworkSession::UsagePolicies)" "\0" __FILE__ ":" "1701"),-
1615 q, qFlagLocation("1""_q_networkSessionUsagePoliciesChanged(QNetworkSession::UsagePolicies)" "\0" __FILE__ ":" "1702"));-
1616 postRequest(newHttpRequest);-
1617 return
executed 709 times by 5 tests: return true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
true;
executed 709 times by 5 tests: return true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
709
1618 } else if (synchronous
synchronousDescription
TRUEnever evaluated
FALSEevaluated 56 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
) {
0-56
1619-
1620 networkSession->open();-
1621 if (networkSession->waitForOpened()
networkSession...aitForOpened()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1622 postRequest(newHttpRequest);-
1623 return
never executed: return true;
true;
never executed: return true;
0
1624 }-
1625 }
never executed: end of block
0
1626 return
executed 56 times by 5 tests: return false;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
false;
executed 56 times by 5 tests: return false;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
56
1627-
1628}-
1629-
1630void QNetworkReplyHttpImplPrivate::_q_startOperation()-
1631{-
1632 QNetworkReplyHttpImpl * const q = q_func();-
1633-
1634-
1635 if (state == Working
state == WorkingDescription
TRUEnever evaluated
FALSEevaluated 943 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-943
1636 QMessageLogger(__FILE__, 1723, __PRETTY_FUNCTION__).debug() << "QNetworkReplyHttpImplPrivate::_q_startOperation was called more than once" << url;-
1637 return;
never executed: return;
0
1638 }-
1639 state = Working;-
1640-
1641-
1642-
1643 QSharedPointer<QNetworkSession> session(manager->d_func()->getNetworkSession());-
1644 QVariant isBackground = request.attribute(QNetworkRequest::BackgroundRequestAttribute, QVariant::fromValue(false));-
1645 if (isBackground.toBool()
isBackground.toBool()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 935 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
&& session
sessionDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
&& session->usagePolicies().testFlag(QNetworkSession::NoBackgroundTrafficPolicy)
session->usage...TrafficPolicy)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
0-935
1646 QMetaObject::invokeMethod(q, "_q_error", synchronous ? Qt::DirectConnection : Qt::QueuedConnection,-
1647 QArgument<QNetworkReply::NetworkError >("QNetworkReply::NetworkError", QNetworkReply::BackgroundRequestNotAllowedError),-
1648 QArgument<QString >("QString", QCoreApplication::translate("QNetworkReply", "Background request not allowed.")));-
1649 QMetaObject::invokeMethod(q, "_q_finished", synchronous ? Qt::DirectConnection : Qt::QueuedConnection);-
1650 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_QNetworkReply
2
1651 }-
1652-
1653 if (!start(request)
!start(request)Description
TRUEevaluated 56 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 885 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
) {
56-885
1654-
1655-
1656-
1657 state = WaitingForSession;-
1658-
1659 if (session
sessionDescription
TRUEevaluated 56 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
) {
0-56
1660 QObject::connect(session.data(), qFlagLocation("2""error(QNetworkSession::SessionError)" "\0" __FILE__ ":" "1747"),-
1661 q, qFlagLocation("1""_q_networkSessionFailed()" "\0" __FILE__ ":" "1748"), Qt::QueuedConnection);-
1662-
1663 if (!session->isOpen()
!session->isOpen()Description
TRUEevaluated 56 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
) {
0-56
1664 session->setSessionProperty(([]() -> QString { enum { Size = sizeof(u"" "ConnectInBackground")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "ConnectInBackground" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 56 times by 5 tests: return qstring_literal_temp;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
qstring_literal_temp;
executed 56 times by 5 tests: return qstring_literal_temp;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
}()), isBackground);
56
1665 session->open();-
1666 }
executed 56 times by 5 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
56
1667 }
executed 56 times by 5 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
else {
56
1668 QMessageLogger(__FILE__, 1755, __PRETTY_FUNCTION__).warning("Backend is waiting for QNetworkSession to connect, but there is none!");-
1669 QMetaObject::invokeMethod(q, "_q_error", synchronous ? Qt::DirectConnection : Qt::QueuedConnection,-
1670 QArgument<QNetworkReply::NetworkError >("QNetworkReply::NetworkError", QNetworkReply::NetworkSessionFailedError),-
1671 QArgument<QString >("QString", QCoreApplication::translate("QNetworkReply", "Network session error.")));-
1672 QMetaObject::invokeMethod(q, "_q_finished", synchronous ? Qt::DirectConnection : Qt::QueuedConnection);-
1673 return;
never executed: return;
0
1674 }-
1675 } else if (session
sessionDescription
TRUEevaluated 885 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-885
1676 QObject::connect(session.data(), qFlagLocation("2""stateChanged(QNetworkSession::State)" "\0" __FILE__ ":" "1763"),-
1677 q, qFlagLocation("1""_q_networkSessionStateChanged(QNetworkSession::State)" "\0" __FILE__ ":" "1764"),-
1678 Qt::QueuedConnection);-
1679 }
executed 885 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
885
1680 if (synchronous
synchronousDescription
TRUEevaluated 76 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 865 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
) {
76-865
1681 state = Finished;-
1682 q_func()->setFinished(true);-
1683 }
executed 76 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
76
1684}
executed 941 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
941
1685-
1686void QNetworkReplyHttpImplPrivate::_q_cacheLoadReadyRead()-
1687{-
1688 QNetworkReplyHttpImpl * const q = q_func();-
1689-
1690 if (state != Working
state != WorkingDescription
TRUEnever evaluated
FALSEevaluated 27 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
)
0-27
1691 return;
never executed: return;
0
1692 if (!cacheLoadDevice
!cacheLoadDeviceDescription
TRUEnever evaluated
FALSEevaluated 27 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
|| !q->isOpen()
!q->isOpen()Description
TRUEnever evaluated
FALSEevaluated 27 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
|| !cacheLoadDevice->bytesAvailable()
!cacheLoadDevi...tesAvailable()Description
TRUEnever evaluated
FALSEevaluated 27 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
)
0-27
1693 return;
never executed: return;
0
1694-
1695-
1696-
1697-
1698-
1699-
1700 QVariant totalSize = cookedHeaders.value(QNetworkRequest::ContentLengthHeader);-
1701-
1702-
1703-
1704-
1705 if (!(isHttpRedirectResponse())
!(isHttpRedirectResponse())Description
TRUEevaluated 27 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEnever evaluated
) {
0-27
1706-
1707 q->readyRead();-
1708-
1709 if (downloadProgressSignalChoke.elapsed() >= progressSignalInterval
downloadProgre...SignalIntervalDescription
TRUEnever evaluated
FALSEevaluated 27 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
) {
0-27
1710 downloadProgressSignalChoke.restart();-
1711 q->downloadProgress(bytesDownloaded,-
1712 totalSize.isNull() ? static_cast<long long>(-1LL) : totalSize.toLongLong());-
1713 }
never executed: end of block
0
1714 }
executed 27 times by 2 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
27
1715-
1716-
1717-
1718 while (cacheLoadDevice->bytesAvailable()
cacheLoadDevic...tesAvailable()Description
TRUEevaluated 27 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 27 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
&& !isHttpRedirectResponse()
!isHttpRedirectResponse()Description
TRUEevaluated 27 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEnever evaluated
)
0-27
1719 buffer.append(cacheLoadDevice->readAll());
executed 27 times by 2 tests: buffer.append(cacheLoadDevice->readAll());
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
27
1720-
1721 if (cacheLoadDevice->isSequential()
cacheLoadDevic...isSequential()Description
TRUEnever evaluated
FALSEevaluated 27 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
) {
0-27
1722-
1723 char c;-
1724 qint64 actualCount = cacheLoadDevice->read(&c, 1);-
1725 if (actualCount < 0
actualCount < 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1726 cacheLoadDevice->deleteLater();-
1727 cacheLoadDevice = 0;-
1728 QMetaObject::invokeMethod(q, "_q_finished", Qt::QueuedConnection);-
1729 }
never executed: end of block
else if (actualCount == 1
actualCount == 1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1730-
1731-
1732 cacheLoadDevice->ungetChar(c);-
1733 }
never executed: end of block
0
1734 }
never executed: end of block
else if ((!cacheLoadDevice->isSequential()
!cacheLoadDevi...isSequential()Description
TRUEevaluated 27 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEnever evaluated
&& cacheLoadDevice->atEnd()
cacheLoadDevice->atEnd()Description
TRUEevaluated 27 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEnever evaluated
)) {
0-27
1735-
1736 cacheLoadDevice->deleteLater();-
1737 cacheLoadDevice = 0;-
1738 QMetaObject::invokeMethod(q, "_q_finished", Qt::QueuedConnection);-
1739 }
executed 27 times by 2 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
27
1740}
executed 27 times by 2 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
27
1741-
1742-
1743void QNetworkReplyHttpImplPrivate::_q_bufferOutgoingDataFinished()-
1744{-
1745 QNetworkReplyHttpImpl * const q = q_func();-
1746-
1747-
1748-
1749 if (state != Buffering
state != BufferingDescription
TRUEnever evaluated
FALSEevaluated 58 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
0-58
1750 return;
never executed: return;
0
1751-
1752-
1753 QObject::disconnect(outgoingData, qFlagLocation("2""readyRead()" "\0" __FILE__ ":" "1851"), q, qFlagLocation("1""_q_bufferOutgoingData()" "\0" __FILE__ ":" "1851"));-
1754 QObject::disconnect(outgoingData, qFlagLocation("2""readChannelFinished()" "\0" __FILE__ ":" "1852"), q, qFlagLocation("1""_q_bufferOutgoingDataFinished()" "\0" __FILE__ ":" "1852"));-
1755-
1756-
1757 QMetaObject::invokeMethod(q, "_q_startOperation", Qt::QueuedConnection);-
1758}
executed 58 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
58
1759-
1760void QNetworkReplyHttpImplPrivate::_q_cacheSaveDeviceAboutToClose()-
1761{-
1762-
1763-
1764 cacheSaveDevice = 0;-
1765}
executed 54 times by 3 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
54
1766-
1767void QNetworkReplyHttpImplPrivate::_q_bufferOutgoingData()-
1768{-
1769 QNetworkReplyHttpImpl * const q = q_func();-
1770-
1771 if (!outgoingDataBuffer
!outgoingDataBufferDescription
TRUEevaluated 58 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
48-58
1772-
1773 outgoingDataBuffer = QSharedPointer<QRingBuffer>::create();-
1774-
1775 QObject::connect(outgoingData, qFlagLocation("2""readyRead()" "\0" __FILE__ ":" "1873"), q, qFlagLocation("1""_q_bufferOutgoingData()" "\0" __FILE__ ":" "1873"));-
1776 QObject::connect(outgoingData, qFlagLocation("2""readChannelFinished()" "\0" __FILE__ ":" "1874"), q, qFlagLocation("1""_q_bufferOutgoingDataFinished()" "\0" __FILE__ ":" "1874"));-
1777 }
executed 58 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
58
1778-
1779 qint64 bytesBuffered = 0;-
1780 qint64 bytesToBuffer = 0;-
1781-
1782-
1783 for(;;) {-
1784 bytesToBuffer = outgoingData->bytesAvailable();-
1785-
1786 if (bytesToBuffer <= 0
bytesToBuffer <= 0Description
TRUEevaluated 106 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
48-106
1787 bytesToBuffer = 2*1024;
executed 106 times by 1 test: bytesToBuffer = 2*1024;
Executed by:
  • tst_QNetworkReply
106
1788-
1789 char *dst = outgoingDataBuffer->reserve(bytesToBuffer);-
1790 bytesBuffered = outgoingData->read(dst, bytesToBuffer);-
1791-
1792 if (bytesBuffered == -1
bytesBuffered == -1Description
TRUEnever evaluated
FALSEevaluated 154 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
0-154
1793-
1794 outgoingDataBuffer->chop(bytesToBuffer);-
1795-
1796 _q_bufferOutgoingDataFinished();-
1797 break;
never executed: break;
0
1798 } else if (bytesBuffered == 0
bytesBuffered == 0Description
TRUEevaluated 106 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
48-106
1799-
1800 outgoingDataBuffer->chop(bytesToBuffer);-
1801-
1802 break;
executed 106 times by 1 test: break;
Executed by:
  • tst_QNetworkReply
106
1803 } else {-
1804-
1805 outgoingDataBuffer->chop(bytesToBuffer - bytesBuffered);-
1806 }
executed 48 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
48
1807 }-
1808}
executed 106 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
106
1809-
1810-
1811void QNetworkReplyHttpImplPrivate::_q_networkSessionConnected()-
1812{-
1813 QNetworkReplyHttpImpl * const q = q_func();-
1814-
1815 if (!manager
!managerDescription
TRUEnever evaluated
FALSEevaluated 158 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
)
0-158
1816 return;
never executed: return;
0
1817-
1818 QSharedPointer<QNetworkSession> session = managerPrivate->getNetworkSession();-
1819 if (!session
!sessionDescription
TRUEnever evaluated
FALSEevaluated 158 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
)
0-158
1820 return;
never executed: return;
0
1821-
1822 if (session->state() != QNetworkSession::Connected
session->state...ion::ConnectedDescription
TRUEnever evaluated
FALSEevaluated 158 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
)
0-158
1823 return;
never executed: return;
0
1824-
1825 switch (state) {-
1826 case
never executed: case QNetworkReplyPrivate::Buffering:
QNetworkReplyPrivate::Buffering:
never executed: case QNetworkReplyPrivate::Buffering:
0
1827 case
never executed: case QNetworkReplyPrivate::Working:
QNetworkReplyPrivate::Working:
never executed: case QNetworkReplyPrivate::Working:
0
1828 case
never executed: case QNetworkReplyPrivate::Reconnecting:
QNetworkReplyPrivate::Reconnecting:
never executed: case QNetworkReplyPrivate::Reconnecting:
0
1829-
1830 migrateBackend();-
1831 break;
never executed: break;
0
1832 case
executed 56 times by 5 tests: case QNetworkReplyPrivate::WaitingForSession:
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
QNetworkReplyPrivate::WaitingForSession:
executed 56 times by 5 tests: case QNetworkReplyPrivate::WaitingForSession:
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
56
1833-
1834 QMetaObject::invokeMethod(q, "_q_startOperation", Qt::QueuedConnection);-
1835 break;
executed 56 times by 5 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
56
1836 default
executed 102 times by 1 test: default:
Executed by:
  • tst_Spdy
:
executed 102 times by 1 test: default:
Executed by:
  • tst_Spdy
102
1837 ;-
1838 }
executed 102 times by 1 test: end of block
Executed by:
  • tst_Spdy
102
1839}-
1840-
1841void QNetworkReplyHttpImplPrivate::_q_networkSessionStateChanged(QNetworkSession::State sessionState)-
1842{-
1843 if (sessionState == QNetworkSession::Disconnected
sessionState =...::DisconnectedDescription
TRUEnever evaluated
FALSEnever evaluated
0
1844 && state != Idle
state != IdleDescription
TRUEnever evaluated
FALSEnever evaluated
&& state != Reconnecting
state != ReconnectingDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1845 error(QNetworkReplyImpl::NetworkSessionFailedError,-
1846 QCoreApplication::translate("QNetworkReply", "Network session error."));-
1847 finished();-
1848 }
never executed: end of block
0
1849}
never executed: end of block
0
1850-
1851void QNetworkReplyHttpImplPrivate::_q_networkSessionFailed()-
1852{-
1853-
1854 if (state == WaitingForSession
state == WaitingForSessionDescription
TRUEnever evaluated
FALSEnever evaluated
|| state == Working
state == WorkingDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1855 state = Working;-
1856 QSharedPointer<QNetworkSession> session(manager->d_func()->getNetworkSession());-
1857 QString errorStr;-
1858 if (session
sessionDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1859 errorStr = session->errorString();
never executed: errorStr = session->errorString();
0
1860 else-
1861 errorStr = QCoreApplication::translate("QNetworkReply", "Network session error.");
never executed: errorStr = QCoreApplication::translate("QNetworkReply", "Network session error.");
0
1862 error(QNetworkReplyImpl::NetworkSessionFailedError, errorStr);-
1863 finished();-
1864 }
never executed: end of block
0
1865}
never executed: end of block
0
1866-
1867void QNetworkReplyHttpImplPrivate::_q_networkSessionUsagePoliciesChanged(QNetworkSession::UsagePolicies newPolicies)-
1868{-
1869 if (request.attribute(QNetworkRequest::BackgroundRequestAttribute).toBool()
request.attrib...bute).toBool()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
4-6
1870 if (newPolicies & QNetworkSession::NoBackgroundTrafficPolicy
newPolicies & ...dTrafficPolicyDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
2
1871-
1872 if (state == WaitingForSession
state == WaitingForSessionDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QNetworkReply
|| state == Working
state == WorkingDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
) {
0-2
1873 state = Working;-
1874 error(QNetworkReply::BackgroundRequestNotAllowedError,-
1875 QCoreApplication::translate("QNetworkReply", "Background request not allowed."));-
1876 finished();-
1877 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
2
1878-
1879 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
2
1880 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
4
1881-
1882}
executed 10 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
10
1883-
1884-
1885-
1886-
1887-
1888void QNetworkReplyHttpImplPrivate::emitReplyUploadProgress(qint64 bytesSent, qint64 bytesTotal)-
1889{-
1890 QNetworkReplyHttpImpl * const q = q_func();-
1891 if (isFinished
isFinishedDescription
TRUEnever evaluated
FALSEevaluated 2695 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
)
0-2695
1892 return;
never executed: return;
0
1893-
1894 if (!emitAllUploadProgressSignals
!emitAllUploadProgressSignalsDescription
TRUEevaluated 2631 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 64 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
64-2631
1895-
1896 if (uploadProgressSignalChoke.isValid()
uploadProgress...hoke.isValid()Description
TRUEevaluated 2498 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 133 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
) {
133-2498
1897 if (bytesSent != bytesTotal
bytesSent != bytesTotalDescription
TRUEevaluated 2425 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 73 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
&& uploadProgressSignalChoke.elapsed() < progressSignalInterval
uploadProgress...SignalIntervalDescription
TRUEevaluated 2403 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 22 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
) {
22-2425
1898 return;
executed 2403 times by 2 tests: return;
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
2403
1899 }-
1900 uploadProgressSignalChoke.restart();-
1901 }
executed 95 times by 2 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
else {
95
1902 uploadProgressSignalChoke.start();-
1903 }
executed 133 times by 2 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
133
1904 }-
1905-
1906 q->uploadProgress(bytesSent, bytesTotal);-
1907}
executed 292 times by 2 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
292
1908-
1909QNonContiguousByteDevice* QNetworkReplyHttpImplPrivate::createUploadByteDevice()-
1910{-
1911 QNetworkReplyHttpImpl * const q = q_func();-
1912-
1913 if (outgoingDataBuffer
outgoingDataBufferDescription
TRUEevaluated 99 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 101 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
)
99-101
1914 uploadByteDevice = QNonContiguousByteDeviceFactory::createShared(outgoingDataBuffer);
executed 99 times by 1 test: uploadByteDevice = QNonContiguousByteDeviceFactory::createShared(outgoingDataBuffer);
Executed by:
  • tst_QNetworkReply
99
1915 else if (outgoingData
outgoingDataDescription
TRUEevaluated 97 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
4-97
1916 uploadByteDevice = QNonContiguousByteDeviceFactory::createShared(outgoingData);-
1917 }
executed 97 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
else {
97
1918 return
executed 4 times by 1 test: return 0;
Executed by:
  • tst_QNetworkReply
0;
executed 4 times by 1 test: return 0;
Executed by:
  • tst_QNetworkReply
4
1919 }-
1920-
1921-
1922 if (!synchronous
!synchronousDescription
TRUEevaluated 155 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
FALSEevaluated 41 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
41-155
1923 QObject::connect(uploadByteDevice.data(), qFlagLocation("2""readProgress(qint64,qint64)" "\0" __FILE__ ":" "2021"),
executed 155 times by 3 tests: QObject::connect(uploadByteDevice.data(), qFlagLocation("2""readProgress(qint64,qint64)" "\0" __FILE__ ":" "2021"), q, qFlagLocation("1""emitReplyUploadProgress(qint64,qint64)" "\0" __FILE__ ":" "2022"));
Executed by:
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
155
1924 q, qFlagLocation("1""emitReplyUploadProgress(qint64,qint64)" "\0" __FILE__ ":" "2022"));
executed 155 times by 3 tests: QObject::connect(uploadByteDevice.data(), qFlagLocation("2""readProgress(qint64,qint64)" "\0" __FILE__ ":" "2021"), q, qFlagLocation("1""emitReplyUploadProgress(qint64,qint64)" "\0" __FILE__ ":" "2022"));
Executed by:
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
155
1925-
1926 return
executed 196 times by 3 tests: return uploadByteDevice.data();
Executed by:
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
uploadByteDevice.data();
executed 196 times by 3 tests: return uploadByteDevice.data();
Executed by:
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
196
1927}-
1928-
1929void QNetworkReplyHttpImplPrivate::_q_finished()-
1930{-
1931-
1932 finished();-
1933}
executed 32 times by 2 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
32
1934-
1935void QNetworkReplyHttpImplPrivate::finished()-
1936{-
1937 QNetworkReplyHttpImpl * const q = q_func();-
1938-
1939 if (state == Finished
state == FinishedDescription
TRUEnever evaluated
FALSEevaluated 869 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
|| state == Aborted
state == AbortedDescription
TRUEnever evaluated
FALSEevaluated 869 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
|| state == WaitingForSession
state == WaitingForSessionDescription
TRUEnever evaluated
FALSEevaluated 869 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
)
0-869
1940 return;
never executed: return;
0
1941-
1942 QVariant totalSize = cookedHeaders.value(QNetworkRequest::ContentLengthHeader);-
1943 if (preMigrationDownloaded != static_cast<long long>(-1LL)
preMigrationDo...ng long>(-1LL)Description
TRUEnever evaluated
FALSEevaluated 869 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
)
0-869
1944 totalSize = totalSize.toLongLong() + preMigrationDownloaded;
never executed: totalSize = totalSize.toLongLong() + preMigrationDownloaded;
0
1945-
1946 if (manager
managerDescription
TRUEevaluated 869 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-869
1947-
1948 QSharedPointer<QNetworkSession> session = managerPrivate->getNetworkSession();-
1949 if (session
sessionDescription
TRUEevaluated 869 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
&& session->state() == QNetworkSession::Roaming
session->state...ssion::RoamingDescription
TRUEnever evaluated
FALSEevaluated 869 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
&&
0-869
1950 state == Working
state == WorkingDescription
TRUEnever evaluated
FALSEnever evaluated
&& errorCode != QNetworkReply::OperationCanceledError
errorCode != Q...nCanceledErrorDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1951-
1952 if (!totalSize.isNull()
!totalSize.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1953 if (bytesDownloaded != totalSize
bytesDownloaded != totalSizeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1954 if (migrateBackend()
migrateBackend()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1955-
1956 if (state == Reconnecting
state == ReconnectingDescription
TRUEnever evaluated
FALSEnever evaluated
|| state == WaitingForSession
state == WaitingForSessionDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1957 return;
never executed: return;
0
1958 }-
1959 }
never executed: end of block
else {
0
1960 error(QNetworkReply::TemporaryNetworkFailureError,-
1961 QNetworkReply::tr("Temporary network failure."));-
1962 }
never executed: end of block
0
1963 }-
1964 }
never executed: end of block
0
1965 }
never executed: end of block
0
1966-
1967 }
executed 869 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
869
1968-
1969-
1970 if (totalSize.isNull()
totalSize.isNull()Description
TRUEevaluated 319 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 550 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
|| totalSize == -1
totalSize == -1Description
TRUEnever evaluated
FALSEevaluated 550 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
|| bytesDownloaded == totalSize
bytesDownloaded == totalSizeDescription
TRUEevaluated 518 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 32 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
)
0-550
1971 completeCacheSave();
executed 837 times by 7 tests: completeCacheSave();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
837
1972-
1973-
1974-
1975 if (isHttpRedirectResponse()
isHttpRedirectResponse()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 863 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
&& errorCode == QNetworkReply::NoError
errorCode == Q...Reply::NoErrorDescription
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
)
1-863
1976 return;
executed 5 times by 1 test: return;
Executed by:
  • tst_QNetworkReply
5
1977-
1978 state = Finished;-
1979 q->setFinished(true);-
1980-
1981 if (totalSize.isNull()
totalSize.isNull()Description
TRUEevaluated 314 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 550 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
|| totalSize == -1
totalSize == -1Description
TRUEnever evaluated
FALSEevaluated 550 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
) {
0-550
1982 q->downloadProgress(bytesDownloaded, bytesDownloaded);-
1983 }
executed 314 times by 5 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
else {
314
1984 q->downloadProgress(bytesDownloaded, totalSize.toLongLong());-
1985 }
executed 550 times by 6 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
550
1986-
1987 if (bytesUploaded == -1
bytesUploaded == -1Description
TRUEevaluated 864 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
&& (outgoingData
outgoingDataDescription
TRUEevaluated 195 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 669 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
|| outgoingDataBuffer
outgoingDataBufferDescription
TRUEnever evaluated
FALSEevaluated 669 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
))
0-864
1988 q->uploadProgress(0, 0);
executed 195 times by 2 tests: q->uploadProgress(0, 0);
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
195
1989-
1990 q->readChannelFinished();-
1991 q->finished();-
1992}
executed 864 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
864
1993-
1994void QNetworkReplyHttpImplPrivate::_q_error(QNetworkReplyImpl::NetworkError code, const QString &errorMessage)-
1995{-
1996 this->error(code, errorMessage);-
1997}
executed 5 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
5
1998-
1999-
2000void QNetworkReplyHttpImplPrivate::error(QNetworkReplyImpl::NetworkError code, const QString &errorMessage)-
2001{-
2002 QNetworkReplyHttpImpl * const q = q_func();-
2003-
2004 if (errorCode != QNetworkReply::NoError
errorCode != Q...Reply::NoErrorDescription
TRUEnever evaluated
FALSEevaluated 122 times by 4 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
) {
0-122
2005 QMessageLogger(__FILE__, 2103, __PRETTY_FUNCTION__).warning("QNetworkReplyImplPrivate::error: Internal problem, this method must only be called once.");-
2006 return;
never executed: return;
0
2007 }-
2008-
2009 errorCode = code;-
2010 q->setErrorString(errorMessage);-
2011-
2012-
2013-
2014-
2015 q->error(code);-
2016}
executed 122 times by 4 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
122
2017-
2018void QNetworkReplyHttpImplPrivate::_q_metaDataChanged()-
2019{-
2020-
2021-
2022 QNetworkReplyHttpImpl * const q = q_func();-
2023-
2024-
2025 if (manager
managerDescription
TRUEevaluated 814 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
) {
0-814
2026 const auto it = cookedHeaders.constFind(QNetworkRequest::SetCookieHeader);-
2027 if (it != cookedHeaders.cend()
it != cookedHeaders.cend()Description
TRUEevaluated 13 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 801 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
13-801
2028 && request.attribute(QNetworkRequest::CookieSaveControlAttribute,
request.attrib...est::AutomaticDescription
TRUEevaluated 13 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
0-13
2029 QNetworkRequest::Automatic).toInt() == QNetworkRequest::Automatic
request.attrib...est::AutomaticDescription
TRUEevaluated 13 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
) {
0-13
2030 QNetworkCookieJar *jar = manager->cookieJar();-
2031 if (jar
jarDescription
TRUEevaluated 13 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
) {
0-13
2032 QList<QNetworkCookie> cookies =-
2033 qvariant_cast<QList<QNetworkCookie> >(it.value());-
2034 jar->setCookiesFromUrl(cookies, url);-
2035 }
executed 13 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
13
2036 }
executed 13 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
13
2037 }
executed 814 times by 6 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
814
2038 q->metaDataChanged();-
2039}
executed 814 times by 6 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
814
2040-
2041-
2042-
2043-
2044-
2045bool QNetworkReplyHttpImplPrivate::migrateBackend()-
2046{-
2047 QNetworkReplyHttpImpl * const q = q_func();-
2048-
2049-
2050 if (state == Finished
state == FinishedDescription
TRUEnever evaluated
FALSEnever evaluated
|| state == Aborted
state == AbortedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2051 return
never executed: return true;
true;
never executed: return true;
0
2052-
2053-
2054 if (!canResume()
!canResume()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2055 return
never executed: return false;
false;
never executed: return false;
0
2056-
2057-
2058 if (outgoingData
outgoingDataDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2059 return
never executed: return false;
false;
never executed: return false;
0
2060-
2061-
2062 if (cacheLoadDevice
cacheLoadDeviceDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2063 return
never executed: return true;
true;
never executed: return true;
0
2064-
2065 state = Reconnecting;-
2066-
2067 cookedHeaders.clear();-
2068 rawHeaders.clear();-
2069-
2070 preMigrationDownloaded = bytesDownloaded;-
2071-
2072 setResumeOffset(bytesDownloaded);-
2073-
2074 q->abortHttpRequest();-
2075-
2076 QMetaObject::invokeMethod(q, "_q_startOperation", Qt::QueuedConnection);-
2077-
2078 return
never executed: return true;
true;
never executed: return true;
0
2079}-
2080-
2081-
2082void QNetworkReplyHttpImplPrivate::createCache()-
2083{-
2084-
2085 if (!managerPrivate->networkCache
!managerPrivate->networkCacheDescription
TRUEevaluated 712 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 75 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
75-712
2086 || !request.attribute(QNetworkRequest::CacheSaveControlAttribute, true).toBool()
!request.attri...true).toBool()Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 65 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
)
10-65
2087 return;
executed 722 times by 5 tests: return;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
722
2088 cacheEnabled = true;-
2089}
executed 65 times by 3 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
65
2090-
2091bool QNetworkReplyHttpImplPrivate::isCachingEnabled() const-
2092{-
2093 return
executed 787 times by 6 tests: return (cacheEnabled && managerPrivate->networkCache != 0);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
(cacheEnabled && managerPrivate->networkCache != 0);
executed 787 times by 6 tests: return (cacheEnabled && managerPrivate->networkCache != 0);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
787
2094}-
2095-
2096void QNetworkReplyHttpImplPrivate::setCachingEnabled(bool enable)-
2097{-
2098 if (!enable
!enableDescription
TRUEevaluated 27 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 787 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
&& !cacheEnabled
!cacheEnabledDescription
TRUEevaluated 27 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEnever evaluated
)
0-787
2099 return;
executed 27 times by 2 tests: return;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
27
2100 if (enable
enableDescription
TRUEevaluated 787 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
&& cacheEnabled
cacheEnabledDescription
TRUEnever evaluated
FALSEevaluated 787 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
)
0-787
2101 return;
never executed: return;
0
2102-
2103 if (enable
enableDescription
TRUEevaluated 787 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
) {
0-787
2104 if (__builtin_expect(!!(bytesDownloaded), false)
__builtin_expe...oaded), false)Description
TRUEnever evaluated
FALSEevaluated 787 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
) {
0-787
2105 QMessageLogger(__FILE__, 2203, __PRETTY_FUNCTION__).debug() << "setCachingEnabled: " << bytesDownloaded << " bytesDownloaded";-
2106-
2107 QMessageLogger(__FILE__, 2205, __PRETTY_FUNCTION__).critical("QNetworkReplyImpl: backend error: caching was enabled after some bytes had been written");-
2108 return;
never executed: return;
0
2109 }-
2110-
2111 createCache();-
2112 }
executed 787 times by 6 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
else {
787
2113-
2114-
2115 QMessageLogger(__FILE__, 2213, __PRETTY_FUNCTION__).debug("QNetworkReplyImpl: setCachingEnabled(true) called after setCachingEnabled(false)");-
2116 managerPrivate->networkCache->remove(url);-
2117 cacheSaveDevice = 0;-
2118 cacheEnabled = false;-
2119 }
never executed: end of block
0
2120}-
2121-
2122bool QNetworkReplyHttpImplPrivate::isCachingAllowed() const-
2123{-
2124 return
executed 64 times by 3 tests: return operation == QNetworkAccessManager::GetOperation || operation == QNetworkAccessManager::HeadOperation;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
operation == QNetworkAccessManager::GetOperation || operation == QNetworkAccessManager::HeadOperation;
executed 64 times by 3 tests: return operation == QNetworkAccessManager::GetOperation || operation == QNetworkAccessManager::HeadOperation;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
64
2125}-
2126-
2127void QNetworkReplyHttpImplPrivate::completeCacheSave()-
2128{-
2129 if (cacheEnabled
cacheEnabledDescription
TRUEevaluated 56 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
FALSEevaluated 781 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
&& errorCode != QNetworkReplyImpl::NoError
errorCode != Q...yImpl::NoErrorDescription
TRUEnever evaluated
FALSEevaluated 56 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
) {
0-781
2130 managerPrivate->networkCache->remove(url);-
2131 }
never executed: end of block
else if (cacheEnabled
cacheEnabledDescription
TRUEevaluated 56 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
FALSEevaluated 781 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
&& cacheSaveDevice
cacheSaveDeviceDescription
TRUEevaluated 53 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
) {
0-781
2132 managerPrivate->networkCache->insert(cacheSaveDevice);-
2133 }
executed 53 times by 2 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
53
2134 cacheSaveDevice = 0;-
2135 cacheEnabled = false;-
2136}
executed 837 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
837
2137-
2138-
Switch to Source codePreprocessed file

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