OpenCoverage

qnetworkreply.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/network/access/qnetworkreply.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4const int QNetworkReplyPrivate::progressSignalInterval = 100;-
5-
6QNetworkReplyPrivate::QNetworkReplyPrivate()-
7 : readBufferMaxSize(0),-
8 emitAllUploadProgressSignals(false),-
9 operation(QNetworkAccessManager::UnknownOperation),-
10 errorCode(QNetworkReply::NoError)-
11 , isFinished(false)-
12{-
13-
14 attributes.insert(QNetworkRequest::ConnectionEncryptedAttribute, false);-
15}
executed 1069 times by 10 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_Spdy
1069
16QNetworkReply::QNetworkReply(QObject *parent)-
17 : QIODevice(*new QNetworkReplyPrivate, parent)-
18{-
19}
never executed: end of block
0
20-
21-
22-
23-
24QNetworkReply::QNetworkReply(QNetworkReplyPrivate &dd, QObject *parent)-
25 : QIODevice(dd, parent)-
26{-
27}
executed 1069 times by 10 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_Spdy
1069
28QNetworkReply::~QNetworkReply()-
29{-
30}-
31void QNetworkReply::close()-
32{-
33 QIODevice::close();-
34}
executed 6 times by 2 tests: end of block
Executed by:
  • tst_QNetworkAccessManager
  • tst_QNetworkReply
6
35-
36-
37-
38-
39bool QNetworkReply::isSequential() const-
40{-
41 return
executed 94 times by 2 tests: return true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
true;
executed 94 times by 2 tests: return true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
94
42}-
43-
44-
45-
46-
47-
48-
49qint64 QNetworkReply::readBufferSize() const-
50{-
51 return
executed 226 times by 1 test: return d_func()->readBufferMaxSize;
Executed by:
  • tst_QNetworkReply
d_func()->readBufferMaxSize;
executed 226 times by 1 test: return d_func()->readBufferMaxSize;
Executed by:
  • tst_QNetworkReply
226
52}-
53void QNetworkReply::setReadBufferSize(qint64 size)-
54{-
55 QNetworkReplyPrivate * const d = d_func();-
56 d->readBufferMaxSize = size;-
57}
executed 23 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
23
58-
59-
60-
61-
62-
63QNetworkAccessManager *QNetworkReply::manager() const-
64{-
65 return
executed 1 time by 1 test: return d_func()->manager;
Executed by:
  • tst_QNetworkReply
d_func()->manager;
executed 1 time by 1 test: return d_func()->manager;
Executed by:
  • tst_QNetworkReply
1
66}-
67QNetworkRequest QNetworkReply::request() const-
68{-
69 return
executed 3 times by 1 test: return d_func()->originalRequest;
Executed by:
  • tst_QNetworkReply
d_func()->originalRequest;
executed 3 times by 1 test: return d_func()->originalRequest;
Executed by:
  • tst_QNetworkReply
3
70}-
71-
72-
73-
74-
75-
76-
77QNetworkAccessManager::Operation QNetworkReply::operation() const-
78{-
79 return
executed 1 time by 1 test: return d_func()->operation;
Executed by:
  • tst_QNetworkReply
d_func()->operation;
executed 1 time by 1 test: return d_func()->operation;
Executed by:
  • tst_QNetworkReply
1
80}-
81-
82-
83-
84-
85-
86-
87-
88QNetworkReply::NetworkError QNetworkReply::error() const-
89{-
90 return
executed 1287 times by 3 tests: return d_func()->errorCode;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_Spdy
d_func()->errorCode;
executed 1287 times by 3 tests: return d_func()->errorCode;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
  • tst_Spdy
1287
91}-
92bool QNetworkReply::isFinished() const-
93{-
94 return
executed 3005 times by 1 test: return d_func()->isFinished;
Executed by:
  • tst_QNetworkReply
d_func()->isFinished;
executed 3005 times by 1 test: return d_func()->isFinished;
Executed by:
  • tst_QNetworkReply
3005
95}-
96bool QNetworkReply::isRunning() const-
97{-
98 return
executed 16 times by 1 test: return !isFinished();
Executed by:
  • tst_QNetworkReply
!isFinished();
executed 16 times by 1 test: return !isFinished();
Executed by:
  • tst_QNetworkReply
16
99}-
100QUrl QNetworkReply::url() const-
101{-
102 return
executed 706 times by 2 tests: return d_func()->url;
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
d_func()->url;
executed 706 times by 2 tests: return d_func()->url;
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
706
103}-
104QVariant QNetworkReply::header(QNetworkRequest::KnownHeaders header) const-
105{-
106 return
executed 347 times by 2 tests: return d_func()->cookedHeaders.value(header);
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
d_func()->cookedHeaders.value(header);
executed 347 times by 2 tests: return d_func()->cookedHeaders.value(header);
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
347
107}-
108-
109-
110-
111-
112-
113-
114-
115bool QNetworkReply::hasRawHeader(const QByteArray &headerName) const-
116{-
117 const QNetworkReplyPrivate * const d = d_func();-
118 return
never executed: return d->findRawHeader(headerName) != d->rawHeaders.constEnd();
d->findRawHeader(headerName) != d->rawHeaders.constEnd();
never executed: return d->findRawHeader(headerName) != d->rawHeaders.constEnd();
0
119}-
120QByteArray QNetworkReply::rawHeader(const QByteArray &headerName) const-
121{-
122 const QNetworkReplyPrivate * const d = d_func();-
123 QNetworkHeadersPrivate::RawHeadersList::ConstIterator it =-
124 d->findRawHeader(headerName);-
125 if (it != d->rawHeaders.constEnd()
it != d->rawHeaders.constEnd()Description
TRUEevaluated 409 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 5050 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
)
409-5050
126 return
executed 409 times by 5 tests: return it->second;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
it->second;
executed 409 times by 5 tests: return it->second;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
409
127 return
executed 5050 times by 6 tests: return QByteArray();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
QByteArray();
executed 5050 times by 6 tests: return QByteArray();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
5050
128}-
129const QList<QNetworkReply::RawHeaderPair>& QNetworkReply::rawHeaderPairs() const-
130{-
131 const QNetworkReplyPrivate * const d = d_func();-
132 return
never executed: return d->rawHeaders;
d->rawHeaders;
never executed: return d->rawHeaders;
0
133}-
134-
135-
136-
137-
138-
139-
140QList<QByteArray> QNetworkReply::rawHeaderList() const-
141{-
142 return
executed 116 times by 3 tests: return d_func()->rawHeadersKeys();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
d_func()->rawHeadersKeys();
executed 116 times by 3 tests: return d_func()->rawHeadersKeys();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
116
143}-
144QVariant QNetworkReply::attribute(QNetworkRequest::Attribute code) const-
145{-
146 return
executed 829 times by 4 tests: return d_func()->attributes.value(code);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
d_func()->attributes.value(code);
executed 829 times by 4 tests: return d_func()->attributes.value(code);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
829
147}-
148QSslConfiguration QNetworkReply::sslConfiguration() const-
149{-
150 QSslConfiguration config;-
151 sslConfigurationImplementation(config);-
152 return
executed 211 times by 2 tests: return config;
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
config;
executed 211 times by 2 tests: return config;
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
211
153}-
154-
155-
156-
157-
158-
159void QNetworkReply::setSslConfiguration(const QSslConfiguration &config)-
160{-
161 setSslConfigurationImplementation(config);-
162}
executed 108 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
108
163void QNetworkReply::ignoreSslErrors(const QList<QSslError> &errors)-
164{-
165 ignoreSslErrorsImplementation(errors);-
166}
executed 10 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
10
167void QNetworkReply::sslConfigurationImplementation(QSslConfiguration &) const-
168{-
169}-
170void QNetworkReply::setSslConfigurationImplementation(const QSslConfiguration &)-
171{-
172}-
173void QNetworkReply::ignoreSslErrorsImplementation(const QList<QSslError> &)-
174{-
175}-
176void QNetworkReply::ignoreSslErrors()-
177{-
178}-
179-
180-
181-
182-
183qint64 QNetworkReply::writeData(const char *, qint64)-
184{-
185 return
never executed: return -1;
-1;
never executed: return -1;
0
186}-
187void QNetworkReply::setOperation(QNetworkAccessManager::Operation operation)-
188{-
189 QNetworkReplyPrivate * const d = d_func();-
190 d->operation = operation;-
191}
executed 60 times by 2 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_QXmlStream
60
192void QNetworkReply::setRequest(const QNetworkRequest &request)-
193{-
194 QNetworkReplyPrivate * const d = d_func();-
195 d->originalRequest = request;-
196}
executed 60 times by 2 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_QXmlStream
60
197void QNetworkReply::setError(NetworkError errorCode, const QString &errorString)-
198{-
199 QNetworkReplyPrivate * const d = d_func();-
200 d->errorCode = errorCode;-
201 setErrorString(errorString);-
202}
executed 7 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
7
203void QNetworkReply::setFinished(bool finished)-
204{-
205 QNetworkReplyPrivate * const d = d_func();-
206 d->isFinished = finished;-
207}
executed 1122 times by 9 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlStream
  • tst_Spdy
1122
208void QNetworkReply::setUrl(const QUrl &url)-
209{-
210 QNetworkReplyPrivate * const d = d_func();-
211 d->url = url;-
212}
executed 89 times by 2 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_QXmlStream
89
213-
214-
215-
216-
217-
218-
219-
220void QNetworkReply::setHeader(QNetworkRequest::KnownHeaders header, const QVariant &value)-
221{-
222 QNetworkReplyPrivate * const d = d_func();-
223 d->setCookedHeader(header, value);-
224}
executed 106 times by 2 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_QXmlStream
106
225void QNetworkReply::setRawHeader(const QByteArray &headerName, const QByteArray &value)-
226{-
227 QNetworkReplyPrivate * const d = d_func();-
228 d->setRawHeader(headerName, value);-
229}
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
230void QNetworkReply::setAttribute(QNetworkRequest::Attribute code, const QVariant &value)-
231{-
232 QNetworkReplyPrivate * const d = d_func();-
233 if (value.isValid()
value.isValid()Description
TRUEevaluated 4842 times by 9 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_Spdy
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
8-4842
234 d->attributes.insert(code, value);
executed 4842 times by 9 tests: d->attributes.insert(code, value);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_Spdy
4842
235 else-
236 d->attributes.remove(code);
executed 8 times by 1 test: d->attributes.remove(code);
Executed by:
  • tst_QNetworkReply
8
237}-
238-
239-
Switch to Source codePreprocessed file

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