diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-02-08 22:19:03 +0100 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2018-03-05 18:04:57 +0200 |
commit | 54d56a74aaa8d09c801a1a73989a1d5d95a72795 (patch) | |
tree | 2856ebfc760a5a29cd57de05dce105d3c091b9ea /core/imagedownloader.cpp | |
parent | 2803b7d3857dc1067f9ec465bf31b9834cbba699 (diff) | |
download | subsurface-54d56a74aaa8d09c801a1a73989a1d5d95a72795.tar.gz |
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>
Diffstat (limited to 'core/imagedownloader.cpp')
-rw-r--r-- | core/imagedownloader.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/imagedownloader.cpp b/core/imagedownloader.cpp index f5bc734b2..82ca53026 100644 --- a/core/imagedownloader.cpp +++ b/core/imagedownloader.cpp @@ -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); |