core/imagedownloader.cpp: Make the manager object local to load()

The QNetworkAccessManager is only used in the load() function. No
point in it being a subobject.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2018-02-08 22:19:03 +01:00 committed by Lubomir I. Ivanov
parent 2803b7d385
commit 54d56a74aa
2 changed files with 1 additions and 1 deletions

View file

@ -34,6 +34,7 @@ void ImageDownloader::load(bool fromHash){
url = QUrl::fromUserInput(QString(picture->filename));
if (url.isValid()) {
QEventLoop loop;
QNetworkAccessManager manager;
QNetworkRequest request(url);
connect(&manager, SIGNAL(finished(QNetworkReply *)), this, SLOT(saveImage(QNetworkReply *)));
QNetworkReply *reply = manager.get(request);

View file

@ -15,7 +15,6 @@ public:
private:
struct picture *picture;
QNetworkAccessManager manager;
bool loadFromHash;
private slots: