summaryrefslogtreecommitdiffstats
path: root/core/imagedownloader.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-02-06 20:04:09 +0100
committerGravatar Robert C. Helling <helling@atdotde.de>2018-02-07 09:44:43 +0100
commitfe133e2cca3830cd69c3c006c4fe350f1e4640fb (patch)
tree000f5985bb460599d3eefd08f575fb19b08aa71e /core/imagedownloader.cpp
parent4c84c0baf15ccbb2f136295e8132abfdbe0ccbd1 (diff)
downloadsubsurface-fe133e2cca3830cd69c3c006c4fe350f1e4640fb.tar.gz
Cleanup: unserialize loading of pictures
The images to load are kept in a set to avoid multiple loading of the same picture. The set was protected with a mutex. Problem: the mutex was not released before loading the picture, effectively serializing the loading of pictures. Therefore unlock the mutex once the set is updated. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/imagedownloader.cpp')
-rw-r--r--core/imagedownloader.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/imagedownloader.cpp b/core/imagedownloader.cpp
index 62308fb5d..05900c40d 100644
--- a/core/imagedownloader.cpp
+++ b/core/imagedownloader.cpp
@@ -89,6 +89,8 @@ static void loadPicture(struct picture *picture, bool fromHash)
if (queuedPictures.contains(QString(picture->filename)))
return;
queuedPictures.insert(QString(picture->filename));
+ locker.unlock();
+
ImageDownloader download(picture);
download.load(fromHash);
}