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