Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (19 sloc) 0.684 kb
#include <QtNetwork/QNetworkAccessManager>
#include <QtNetwork/QNetworkRequest>
#include <QtNetwork/QNetworkReply>
#include <QStringList>
class NetworkAccessManager : public QNetworkAccessManager {
Q_OBJECT
public:
NetworkAccessManager(QObject *parent = 0);
void addHeader(QString key, QString value);
void setUrlBlacklist(QStringList blacklist);
void resetHeaders();
protected:
QNetworkReply* createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &req, QIODevice * outgoingData);
private:
bool isBlacklisted(QUrl url);
QNetworkReply* noOpRequest();
QHash<QString, QString> m_headers;
QList<QUrl> m_urlBlacklist;
};
Jump to Line
Something went wrong with that request. Please try again.