39 : QNetworkReply (parent)
46 setError (error, text);
51 setHeader (header, value);
56 setHeader (QNetworkRequest::ContentTypeHeader, ct);
69 open (ReadOnly | Unbuffered);
71 SetHeader (QNetworkRequest::ContentLengthHeader, QVariant (Content_.size ()));
73 QTimer::singleShot (0,
75 SIGNAL (readyRead ()));
76 QTimer::singleShot (0,
78 SIGNAL (finished ()));
87 return Content_.size () - Offset_;
97 if (Offset_ >= Content_.size ())
101 std::memcpy (data, Content_.constData () + Offset_, number);
void SetHeader(QNetworkRequest::KnownHeaders header, const QVariant &value)
Sets the given header to the given value.
qint64 readData(char *, qint64)
qint64 bytesAvailable() const
Reimplemented from QNetworkReply::bytesAvailable().
void SetContentType(const QByteArray &type)
Sets the content type of this reply.
bool isSequential() const
Reimplemented from QNetworkReply::isSequential().
CustomNetworkReply(const QUrl &url, QObject *parent=0)
Creates the reply with the given url and parent.
void SetError(NetworkError error, const QString &reason=QString())
Sets the network error of this reply.
void abort()
Reimplemented from QNetworkReply::abort().
void SetContent(const QString &string)
Sets content of this reply to the given string.