qnetworkreplydataimpl.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/network/access/qnetworkreplydataimpl.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4QNetworkReplyDataImplPrivate::QNetworkReplyDataImplPrivate()-
5 : QNetworkReplyPrivate()-
6{-
7}
executed 30 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
30
8-
9QNetworkReplyDataImplPrivate::~QNetworkReplyDataImplPrivate()-
10{-
11}-
12-
13QNetworkReplyDataImpl::~QNetworkReplyDataImpl()-
14{-
15}-
16-
17QNetworkReplyDataImpl::QNetworkReplyDataImpl(QObject *parent, const QNetworkRequest &req, const QNetworkAccessManager::Operation op)-
18 : QNetworkReply(*new QNetworkReplyDataImplPrivate(), parent)-
19{-
20 QNetworkReplyDataImplPrivate * const d = d_func();-
21 setRequest(req);-
22 setUrl(req.url());-
23 setOperation(op);-
24 setFinished(true);-
25 QNetworkReply::open(QIODevice::ReadOnly);-
26-
27 QUrl url = req.url();-
28 QString mimeType;-
29 QByteArray payload;-
30 if (qDecodeDataUrl(url, mimeType, payload)
qDecodeDataUrl...Type, payload)Description
TRUEevaluated 30 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
) {
0-30
31 qint64 size = payload.size();-
32 setHeader(QNetworkRequest::ContentTypeHeader, mimeType);-
33 setHeader(QNetworkRequest::ContentLengthHeader, size);-
34 QMetaObject::invokeMethod(this, "metaDataChanged", Qt::QueuedConnection);-
35-
36 d->decodedData.setData(payload);-
37 d->decodedData.open(QIODevice::ReadOnly);-
38-
39 QMetaObject::invokeMethod(this, "downloadProgress", Qt::QueuedConnection,-
40 QArgument<qint64 >("qint64", size), QArgument<qint64 >("qint64", size));-
41 QMetaObject::invokeMethod(this, "readyRead", Qt::QueuedConnection);-
42 QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection);-
43 }
executed 30 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
else {
30
44-
45 const QString msg = QCoreApplication::translate("QNetworkAccessDataBackend",-
46 "Invalid URI: %1").arg(url.toString());-
47 setError(QNetworkReply::ProtocolFailure, msg);-
48 QMetaObject::invokeMethod(this, "error", Qt::QueuedConnection,-
49 QArgument<QNetworkReply::NetworkError >("QNetworkReply::NetworkError", QNetworkReply::ProtocolFailure));-
50 QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection);-
51 }
never executed: end of block
0
52}-
53-
54void QNetworkReplyDataImpl::close()-
55{-
56 QNetworkReply::close();-
57}
never executed: end of block
0
58-
59void QNetworkReplyDataImpl::abort()-
60{-
61 QNetworkReply::close();-
62}
never executed: end of block
0
63-
64qint64 QNetworkReplyDataImpl::bytesAvailable() const-
65{-
66 const QNetworkReplyDataImplPrivate * const d = d_func();-
67 return
executed 8 times by 1 test: return QNetworkReply::bytesAvailable() + d->decodedData.bytesAvailable();
Executed by:
  • tst_QNetworkReply
QNetworkReply::bytesAvailable() + d->decodedData.bytesAvailable();
executed 8 times by 1 test: return QNetworkReply::bytesAvailable() + d->decodedData.bytesAvailable();
Executed by:
  • tst_QNetworkReply
8
68}-
69-
70bool QNetworkReplyDataImpl::isSequential () const-
71{-
72 return
executed 29 times by 1 test: return true;
Executed by:
  • tst_QNetworkReply
true;
executed 29 times by 1 test: return true;
Executed by:
  • tst_QNetworkReply
29
73}-
74-
75qint64 QNetworkReplyDataImpl::size() const-
76{-
77 const QNetworkReplyDataImplPrivate * const d = d_func();-
78 return
never executed: return d->decodedData.size();
d->decodedData.size();
never executed: return d->decodedData.size();
0
79}-
80-
81-
82-
83-
84qint64 QNetworkReplyDataImpl::readData(char *data, qint64 maxlen)-
85{-
86 QNetworkReplyDataImplPrivate * const d = d_func();-
87-
88-
89-
90-
91-
92 return
executed 47 times by 1 test: return d->decodedData.read(data, maxlen);
Executed by:
  • tst_QNetworkReply
d->decodedData.read(data, maxlen);
executed 47 times by 1 test: return d->decodedData.read(data, maxlen);
Executed by:
  • tst_QNetworkReply
47
93}-
94-
95-
96-
97-
Switch to Source codePreprocessed file

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