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

30 lines (22 sloc) 0.816 kb
#include <QtNetwork/QNetworkAccessManager>
#include <QtNetwork/QNetworkRequest>
#include <QtNetwork/QNetworkReply>
class NetworkAccessManager : public QNetworkAccessManager {
Q_OBJECT
public:
NetworkAccessManager(QObject *parent = 0);
void addHeader(QString key, QString value);
void resetHeaders();
void setUserName(const QString &userName);
void setPassword(const QString &password);
protected:
QNetworkReply* createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &req, QIODevice * outgoingData);
QString m_userName;
QString m_password;
private:
QHash<QString, QString> m_headers;
private slots:
void provideAuthentication(QNetworkReply *reply, QAuthenticator *authenticator);
signals:
void requestCreated(QNetworkReply *reply);
};
Jump to Line
Something went wrong with that request. Please try again.