Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

33 lines (25 sloc) 0.774 kB
#include <QTimer>
#include "NoOpReply.h"
NoOpReply::NoOpReply(QNetworkRequest &request, QObject *parent) : QNetworkReply(parent) {
open(ReadOnly | Unbuffered);
setAttribute(QNetworkRequest::HttpStatusCodeAttribute, 200);
setHeader(QNetworkRequest::ContentLengthHeader, QVariant(0));
setHeader(QNetworkRequest::ContentTypeHeader, QVariant(QString("text/plain")));
setUrl(request.url());
QTimer::singleShot( 0, this, SIGNAL(readyRead()) );
QTimer::singleShot( 0, this, SIGNAL(finished()) );
}
void NoOpReply::abort() {
// NO-OP
}
qint64 NoOpReply::bytesAvailable() const {
return 0;
}
bool NoOpReply::isSequential() const {
return true;
}
qint64 NoOpReply::readData(char *data, qint64 maxSize) {
Q_UNUSED(data);
Q_UNUSED(maxSize);
return 0;
}
Jump to Line
Something went wrong with that request. Please try again.