Make the QNetworkAccessManager a singleton available to all

One of the rules of using QNetworkAccessManager is to share it among all
users, since sockets and other state can be shared. Looks like Marble
doesn't allow us to set it, though, and it creates multiple instances.
I'll prepare an upstream patch to fix that sometime.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
This commit is contained in:
Thiago Macieira 2013-11-14 14:55:49 -08:00
parent b38eac89e4
commit ff96bcb0fc
2 changed files with 10 additions and 9 deletions

View file

@ -17,6 +17,8 @@ public:
void hidePassword();
void hideUpload();
static QNetworkAccessManager *manager();
private slots:
virtual void startDownload() = 0;
virtual void startUpload() = 0;
@ -25,7 +27,6 @@ private slots:
protected:
Ui::WebServices ui;
QNetworkReply *reply;
QNetworkAccessManager *manager;
QByteArray downloadedData;
};