qnetworkaccessbackend.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/network/access/qnetworkaccessbackend.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9class QNetworkAccessBackendFactoryData: public QList<QNetworkAccessBackendFactory *>-
10{-
11public:-
12 QNetworkAccessBackendFactoryData() : mutex(QMutex::Recursive)-
13 {-
14 valid.ref();-
15 }
executed 9 times by 9 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QXmlInputSource
  • tst_QXmlStream
9
16 ~QNetworkAccessBackendFactoryData()-
17 {-
18 QMutexLocker locker(&mutex);-
19 valid.deref();-
20 }
executed 10 times by 10 tests: end of block
Executed by:
  • tst_qabstractnetworkcache - unknown status
  • tst_qhttpnetworkconnection - unknown status
  • tst_qnetworkaccessmanager - unknown status
  • tst_qnetworkaccessmanager_and_qprogressdialog - unknown status
  • tst_qnetworkconfigurationmanagerqappless - unknown status
  • tst_qnetworkdiskcache - unknown status
  • tst_qnetworkproxyfactory - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlstream - unknown status
  • tst_spdy - unknown status
10
21-
22 QMutex mutex;-
23-
24 static QBasicAtomicInt valid;-
25};-
26namespace { namespace Q_QGS_factoryData { typedef QNetworkAccessBackendFactoryData Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized
guard.load() =...c::InitializedDescription
TRUEevaluated 10 times by 10 tests
Evaluated by:
  • tst_qabstractnetworkcache - unknown status
  • tst_qhttpnetworkconnection - unknown status
  • tst_qnetworkaccessmanager - unknown status
  • tst_qnetworkaccessmanager_and_qprogressdialog - unknown status
  • tst_qnetworkconfigurationmanagerqappless - unknown status
  • tst_qnetworkdiskcache - unknown status
  • tst_qnetworkproxyfactory - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlstream - unknown status
  • tst_spdy - unknown status
FALSEnever evaluated
) guard.store(QtGlobalStatic::Destroyed);
executed 10 times by 10 tests: guard.store(QtGlobalStatic::Destroyed);
Executed by:
  • tst_qabstractnetworkcache - unknown status
  • tst_qhttpnetworkconnection - unknown status
  • tst_qnetworkaccessmanager - unknown status
  • tst_qnetworkaccessmanager_and_qprogressdialog - unknown status
  • tst_qnetworkconfigurationmanagerqappless - unknown status
  • tst_qnetworkdiskcache - unknown status
  • tst_qnetworkproxyfactory - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlstream - unknown status
  • tst_spdy - unknown status
}
executed 10 times by 10 tests: end of block
Executed by:
  • tst_qabstractnetworkcache - unknown status
  • tst_qhttpnetworkconnection - unknown status
  • tst_qnetworkaccessmanager - unknown status
  • tst_qnetworkaccessmanager_and_qprogressdialog - unknown status
  • tst_qnetworkconfigurationmanagerqappless - unknown status
  • tst_qnetworkdiskcache - unknown status
  • tst_qnetworkproxyfactory - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlstream - unknown status
  • tst_spdy - unknown status
}; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ())) : value () { guard.store(QtGlobalStatic::Initialized); } } holder; return
executed 438 times by 20 tests: return &holder.value;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qabstractnetworkcache - unknown status
  • tst_qhttpnetworkconnection - unknown status
  • tst_qnetworkaccessmanager - unknown status
  • tst_qnetworkaccessmanager_and_qprogressdialog - unknown status
  • tst_qnetworkconfigurationmanagerqappless - unknown status
  • tst_qnetworkdiskcache - unknown status
  • tst_qnetworkproxyfactory - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlstream - unknown status
  • tst_spdy - unknown status
&holder.value;
executed 438 times by 20 tests: return &holder.value;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_qabstractnetworkcache - unknown status
  • tst_qhttpnetworkconnection - unknown status
  • tst_qnetworkaccessmanager - unknown status
  • tst_qnetworkaccessmanager_and_qprogressdialog - unknown status
  • tst_qnetworkconfigurationmanagerqappless - unknown status
  • tst_qnetworkdiskcache - unknown status
  • tst_qnetworkproxyfactory - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlstream - unknown status
  • tst_spdy - unknown status
} } } static QGlobalStatic<QNetworkAccessBackendFactoryData, Q_QGS_factoryData::innerFunction, Q_QGS_factoryData::guard> factoryData;
0-438
27QBasicAtomicInt QNetworkAccessBackendFactoryData::valid = { 0 };-
28-
29QNetworkAccessBackendFactory::QNetworkAccessBackendFactory()-
30{-
31 QMutexLocker locker(&factoryData()->mutex);-
32 factoryData()->append(this);-
33}
executed 27 times by 9 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QXmlInputSource
  • tst_QXmlStream
27
34-
35QNetworkAccessBackendFactory::~QNetworkAccessBackendFactory()-
36{-
37 if (QNetworkAccessBackendFactoryData::valid.load()
QNetworkAccess...::valid.load()Description
TRUEevaluated 30 times by 10 tests
Evaluated by:
  • tst_qabstractnetworkcache - unknown status
  • tst_qhttpnetworkconnection - unknown status
  • tst_qnetworkaccessmanager - unknown status
  • tst_qnetworkaccessmanager_and_qprogressdialog - unknown status
  • tst_qnetworkconfigurationmanagerqappless - unknown status
  • tst_qnetworkdiskcache - unknown status
  • tst_qnetworkproxyfactory - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlstream - unknown status
  • tst_spdy - unknown status
FALSEnever evaluated
) {
0-30
38 QMutexLocker locker(&factoryData()->mutex);-
39 factoryData()->removeAll(this);-
40 }
executed 30 times by 10 tests: end of block
Executed by:
  • tst_qabstractnetworkcache - unknown status
  • tst_qhttpnetworkconnection - unknown status
  • tst_qnetworkaccessmanager - unknown status
  • tst_qnetworkaccessmanager_and_qprogressdialog - unknown status
  • tst_qnetworkconfigurationmanagerqappless - unknown status
  • tst_qnetworkdiskcache - unknown status
  • tst_qnetworkproxyfactory - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlstream - unknown status
  • tst_spdy - unknown status
30
41}
executed 30 times by 10 tests: end of block
Executed by:
  • tst_qabstractnetworkcache - unknown status
  • tst_qhttpnetworkconnection - unknown status
  • tst_qnetworkaccessmanager - unknown status
  • tst_qnetworkaccessmanager_and_qprogressdialog - unknown status
  • tst_qnetworkconfigurationmanagerqappless - unknown status
  • tst_qnetworkdiskcache - unknown status
  • tst_qnetworkproxyfactory - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlstream - unknown status
  • tst_spdy - unknown status
30
42-
43QNetworkAccessBackend *QNetworkAccessManagerPrivate::findBackend(QNetworkAccessManager::Operation op,-
44 const QNetworkRequest &request)-
45{-
46 if (QNetworkAccessBackendFactoryData::valid.load()
QNetworkAccess...::valid.load()Description
TRUEevaluated 108 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
) {
0-108
47 QMutexLocker locker(&factoryData()->mutex);-
48 QNetworkAccessBackendFactoryData::ConstIterator it = factoryData()->constBegin(),-
49 end = factoryData()->constEnd();-
50 while (it != end
it != endDescription
TRUEevaluated 209 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
4-209
51 QNetworkAccessBackend *backend = (*it)->create(op, request);-
52 if (backend
backendDescription
TRUEevaluated 104 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 105 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
104-105
53 backend->manager = this;-
54 return
executed 104 times by 1 test: return backend;
Executed by:
  • tst_QNetworkReply
backend;
executed 104 times by 1 test: return backend;
Executed by:
  • tst_QNetworkReply
104
55 }-
56 ++it;-
57 }
executed 105 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
105
58 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
4
59 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
60}-
61-
62QStringList QNetworkAccessManagerPrivate::backendSupportedSchemes() const-
63{-
64 if (QNetworkAccessBackendFactoryData::valid.load()
QNetworkAccess...::valid.load()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
65 QMutexLocker locker(&factoryData()->mutex);-
66 QNetworkAccessBackendFactoryData::ConstIterator it = factoryData()->constBegin();-
67 QNetworkAccessBackendFactoryData::ConstIterator end = factoryData()->constEnd();-
68 QStringList schemes;-
69 while (it != end
it != endDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
70 schemes += (*it)->supportedSchemes();-
71 ++it;-
72 }
never executed: end of block
0
73 return
never executed: return schemes;
schemes;
never executed: return schemes;
0
74 }-
75 return
never executed: return QStringList();
QStringList();
never executed: return QStringList();
0
76}-
77-
78QNonContiguousByteDevice* QNetworkAccessBackend::createUploadByteDevice()-
79{-
80 if (reply->outgoingDataBuffer
reply->outgoingDataBufferDescription
TRUEnever evaluated
FALSEevaluated 59 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
0-59
81 uploadByteDevice = QNonContiguousByteDeviceFactory::createShared(reply->outgoingDataBuffer);
never executed: uploadByteDevice = QNonContiguousByteDeviceFactory::createShared(reply->outgoingDataBuffer);
0
82 else if (reply->outgoingData
reply->outgoingDataDescription
TRUEevaluated 59 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
) {
0-59
83 uploadByteDevice = QNonContiguousByteDeviceFactory::createShared(reply->outgoingData);-
84 }
executed 59 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
else {
59
85 return
never executed: return 0;
0;
never executed: return 0;
0
86 }-
87-
88-
89 if (!isSynchronous()
!isSynchronous()Description
TRUEevaluated 59 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
)
0-59
90 connect(uploadByteDevice.data(), qFlagLocation("2""readProgress(qint64,qint64)" "\0" __FILE__ ":" "139"), this, qFlagLocation("1""emitReplyUploadProgress(qint64,qint64)" "\0" __FILE__ ":" "139"));
executed 59 times by 1 test: connect(uploadByteDevice.data(), qFlagLocation("2""readProgress(qint64,qint64)" "\0" __FILE__ ":" "139"), this, qFlagLocation("1""emitReplyUploadProgress(qint64,qint64)" "\0" __FILE__ ":" "139"));
Executed by:
  • tst_QNetworkReply
59
91-
92 return
executed 59 times by 1 test: return uploadByteDevice.data();
Executed by:
  • tst_QNetworkReply
uploadByteDevice.data();
executed 59 times by 1 test: return uploadByteDevice.data();
Executed by:
  • tst_QNetworkReply
59
93}-
94-
95-
96-
97void QNetworkAccessBackend::emitReplyUploadProgress(qint64 bytesSent, qint64 bytesTotal)-
98{-
99 if (reply->isFinished
reply->isFinishedDescription
TRUEnever evaluated
FALSEevaluated 1053 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
0-1053
100 return;
never executed: return;
0
101 reply->emitUploadProgress(bytesSent, bytesTotal);-
102}
executed 1053 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
1053
103-
104QNetworkAccessBackend::QNetworkAccessBackend()-
105 : manager(0)-
106 , reply(0)-
107 , synchronous(false)-
108{-
109}
executed 118 times by 3 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager
  • tst_QNetworkReply
118
110-
111QNetworkAccessBackend::~QNetworkAccessBackend()-
112{-
113}-
114-
115void QNetworkAccessBackend::downstreamReadyWrite()-
116{-
117-
118}-
119-
120void QNetworkAccessBackend::setDownstreamLimited(bool b)-
121{-
122 (void)b;;-
123-
124}
executed 4 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
4
125-
126void QNetworkAccessBackend::copyFinished(QIODevice *)-
127{-
128-
129}-
130-
131void QNetworkAccessBackend::ignoreSslErrors()-
132{-
133-
134}-
135-
136void QNetworkAccessBackend::ignoreSslErrors(const QList<QSslError> &errors)-
137{-
138 (void)errors;;-
139-
140}
never executed: end of block
0
141-
142void QNetworkAccessBackend::fetchSslConfiguration(QSslConfiguration &) const-
143{-
144-
145}-
146-
147void QNetworkAccessBackend::setSslConfiguration(const QSslConfiguration &)-
148{-
149-
150}-
151-
152QNetworkCacheMetaData QNetworkAccessBackend::fetchCacheMetaData(const QNetworkCacheMetaData &) const-
153{-
154 return
never executed: return QNetworkCacheMetaData();
QNetworkCacheMetaData();
never executed: return QNetworkCacheMetaData();
0
155}-
156-
157QNetworkAccessManager::Operation QNetworkAccessBackend::operation() const-
158{-
159 return
executed 462 times by 2 tests: return reply->operation;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
reply->operation;
executed 462 times by 2 tests: return reply->operation;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
462
160}-
161-
162QNetworkRequest QNetworkAccessBackend::request() const-
163{-
164 return
executed 125 times by 2 tests: return reply->request;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
reply->request;
executed 125 times by 2 tests: return reply->request;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
125
165}-
166-
167-
168QList<QNetworkProxy> QNetworkAccessBackend::proxyList() const-
169{-
170 return
executed 53 times by 1 test: return reply->proxyList;
Executed by:
  • tst_QNetworkReply
reply->proxyList;
executed 53 times by 1 test: return reply->proxyList;
Executed by:
  • tst_QNetworkReply
53
171}-
172-
173-
174QAbstractNetworkCache *QNetworkAccessBackend::networkCache() const-
175{-
176 if (!manager
!managerDescription
TRUEnever evaluated
FALSEevaluated 43 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
)
0-43
177 return
never executed: return 0;
0;
never executed: return 0;
0
178 return
executed 43 times by 2 tests: return manager->networkCache;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
manager->networkCache;
executed 43 times by 2 tests: return manager->networkCache;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
43
179}-
180-
181void QNetworkAccessBackend::setCachingEnabled(bool enable)-
182{-
183 reply->setCachingEnabled(enable);-
184}
executed 43 times by 2 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
43
185-
186bool QNetworkAccessBackend::isCachingEnabled() const-
187{-
188 return
never executed: return reply->isCachingEnabled();
reply->isCachingEnabled();
never executed: return reply->isCachingEnabled();
0
189}-
190-
191qint64 QNetworkAccessBackend::nextDownstreamBlockSize() const-
192{-
193 return
executed 38 times by 1 test: return reply->nextDownstreamBlockSize();
Executed by:
  • tst_QNetworkReply
reply->nextDownstreamBlockSize();
executed 38 times by 1 test: return reply->nextDownstreamBlockSize();
Executed by:
  • tst_QNetworkReply
38
194}-
195-
196void QNetworkAccessBackend::writeDownstreamData(QByteDataBuffer &list)-
197{-
198 reply->appendDownstreamData(list);-
199}
executed 488 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
488
200-
201void QNetworkAccessBackend::writeDownstreamData(QIODevice *data)-
202{-
203 reply->appendDownstreamData(data);-
204}
executed 9 times by 2 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
9
205-
206-
207void QNetworkAccessBackend::writeDownstreamDataDownloadBuffer(qint64 bytesReceived, qint64 bytesTotal)-
208{-
209 reply->appendDownstreamDataDownloadBuffer(bytesReceived, bytesTotal);-
210}
never executed: end of block
0
211-
212char* QNetworkAccessBackend::getDownloadBuffer(qint64 size)-
213{-
214 return
never executed: return reply->getDownloadBuffer(size);
reply->getDownloadBuffer(size);
never executed: return reply->getDownloadBuffer(size);
0
215}-
216-
217QVariant QNetworkAccessBackend::header(QNetworkRequest::KnownHeaders header) const-
218{-
219 return
never executed: return reply->q_func()->header(header);
reply->q_func()->header(header);
never executed: return reply->q_func()->header(header);
0
220}-
221-
222void QNetworkAccessBackend::setHeader(QNetworkRequest::KnownHeaders header, const QVariant &value)-
223{-
224 reply->setCookedHeader(header, value);-
225}
executed 69 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
69
226-
227bool QNetworkAccessBackend::hasRawHeader(const QByteArray &headerName) const-
228{-
229 return
never executed: return reply->q_func()->hasRawHeader(headerName);
reply->q_func()->hasRawHeader(headerName);
never executed: return reply->q_func()->hasRawHeader(headerName);
0
230}-
231-
232QByteArray QNetworkAccessBackend::rawHeader(const QByteArray &headerName) const-
233{-
234 return
never executed: return reply->q_func()->rawHeader(headerName);
reply->q_func()->rawHeader(headerName);
never executed: return reply->q_func()->rawHeader(headerName);
0
235}-
236-
237QList<QByteArray> QNetworkAccessBackend::rawHeaderList() const-
238{-
239 return
never executed: return reply->q_func()->rawHeaderList();
reply->q_func()->rawHeaderList();
never executed: return reply->q_func()->rawHeaderList();
0
240}-
241-
242void QNetworkAccessBackend::setRawHeader(const QByteArray &headerName, const QByteArray &headerValue)-
243{-
244 reply->setRawHeader(headerName, headerValue);-
245}
executed 36 times by 2 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
36
246-
247QVariant QNetworkAccessBackend::attribute(QNetworkRequest::Attribute code) const-
248{-
249 return
never executed: return reply->q_func()->attribute(code);
reply->q_func()->attribute(code);
never executed: return reply->q_func()->attribute(code);
0
250}-
251-
252void QNetworkAccessBackend::setAttribute(QNetworkRequest::Attribute code, const QVariant &value)-
253{-
254 if (value.isValid()
value.isValid()Description
TRUEevaluated 25 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
8-25
255 reply->attributes.insert(code, value);
executed 25 times by 2 tests: reply->attributes.insert(code, value);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
25
256 else-
257 reply->attributes.remove(code);
executed 8 times by 1 test: reply->attributes.remove(code);
Executed by:
  • tst_QNetworkReply
8
258}-
259QUrl QNetworkAccessBackend::url() const-
260{-
261 return
executed 391 times by 2 tests: return reply->url;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
reply->url;
executed 391 times by 2 tests: return reply->url;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
391
262}-
263-
264void QNetworkAccessBackend::setUrl(const QUrl &url)-
265{-
266 reply->url = url;-
267}
executed 50 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
50
268-
269void QNetworkAccessBackend::finished()-
270{-
271 reply->finished();-
272}
executed 114 times by 2 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
114
273-
274void QNetworkAccessBackend::error(QNetworkReply::NetworkError code, const QString &errorString)-
275{-
276 reply->error(code, errorString);-
277}
executed 17 times by 2 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
17
278-
279-
280void QNetworkAccessBackend::proxyAuthenticationRequired(const QNetworkProxy &proxy,-
281 QAuthenticator *authenticator)-
282{-
283 manager->proxyAuthenticationRequired(QUrl(), proxy, synchronous, authenticator, &reply->lastProxyAuthentication);-
284}
never executed: end of block
0
285-
286-
287void QNetworkAccessBackend::authenticationRequired(QAuthenticator *authenticator)-
288{-
289 manager->authenticationRequired(authenticator, reply->q_func(), synchronous, reply->url, &reply->urlForLastAuthentication);-
290}
executed 3 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
3
291-
292void QNetworkAccessBackend::metaDataChanged()-
293{-
294 reply->metaDataChanged();-
295}
executed 54 times by 2 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
54
296-
297void QNetworkAccessBackend::redirectionRequested(const QUrl &target)-
298{-
299 reply->redirectionRequested(target);-
300}
never executed: end of block
0
301-
302void QNetworkAccessBackend::encrypted()-
303{-
304-
305 reply->encrypted();-
306-
307}
never executed: end of block
0
308-
309void QNetworkAccessBackend::sslErrors(const QList<QSslError> &errors)-
310{-
311-
312 reply->sslErrors(errors);-
313-
314-
315-
316}
never executed: end of block
0
317-
318-
319-
320-
321-
322-
323bool QNetworkAccessBackend::start()-
324{-
325-
326-
327 QSharedPointer<QNetworkSession> networkSession(manager->getNetworkSession());-
328 if (networkSession
networkSessionDescription
TRUEevaluated 119 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEnever evaluated
) {
0-119
329-
330 if (networkSession->isOpen()
networkSession->isOpen()Description
TRUEevaluated 116 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QNetworkReply
&&
3-116
331 networkSession->state() == QNetworkSession::Connected
networkSession...ion::ConnectedDescription
TRUEevaluated 116 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEnever evaluated
) {
0-116
332-
333-
334 setProperty("_q_networksession", QVariant::fromValue(networkSession));-
335 }
executed 116 times by 2 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
else {
116
336-
337-
338-
339-
340 if (!reply->url.isLocalFile()
!reply->url.isLocalFile()Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
) {
0-3
341 const QString host = reply->url.host();-
342 if (host != QLatin1String("localhost")
host != QLatin...g("localhost")Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
&& !QHostAddress(host).isLoopback()
!QHostAddress(...).isLoopback()Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
)
0-3
343 return
executed 3 times by 1 test: return false;
Executed by:
  • tst_QNetworkReply
false;
executed 3 times by 1 test: return false;
Executed by:
  • tst_QNetworkReply
3
344 }
never executed: end of block
0
345 }
never executed: end of block
0
346 }-
347-
348-
349-
350-
351-
352-
353 QNetworkSession *session = networkSession.data();-
354 QNetworkConfiguration config;-
355 if (session
sessionDescription
TRUEevaluated 116 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEnever evaluated
) {
0-116
356 QNetworkConfigurationManager configManager;-
357-
358 QVariant v = session->sessionProperty(QLatin1String("ActiveConfiguration"));-
359 if (v.isValid()
v.isValid()Description
TRUEevaluated 116 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEnever evaluated
)
0-116
360 config = configManager.configurationFromIdentifier(qvariant_cast<QString>(v));
executed 116 times by 2 tests: config = configManager.configurationFromIdentifier(qvariant_cast<QString>(v));
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
116
361-
362 if (!config.isValid()
!config.isValid()Description
TRUEnever evaluated
FALSEevaluated 116 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
)
0-116
363 config = session->configuration();
never executed: config = session->configuration();
0
364-
365 if (!config.isValid()
!config.isValid()Description
TRUEnever evaluated
FALSEevaluated 116 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
)
0-116
366 config = QNetworkConfiguration();
never executed: config = QNetworkConfiguration();
0
367 }
executed 116 times by 2 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
116
368 reply->proxyList = manager->queryProxy(QNetworkProxyQuery(config, url()));-
369-
370-
371-
372-
373-
374-
375-
376 open();-
377 return
executed 116 times by 2 tests: return true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
true;
executed 116 times by 2 tests: return true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
116
378}-
379-
380-
Switch to Source codePreprocessed file

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