mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-17 20:16:16 +00:00
core/imagedownloader.cpp: Simplify deletion of objects
1) Destroying the QNetworkManager seems like a bug: this was a subobject of ImageDonwloader. It's mysterious how this didn't crash. 2) Instead of calling deleteLater() on the reply object, simply delete it after completion. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
c1cd2e0f02
commit
2803b7d385
1 changed files with 1 additions and 2 deletions
|
@ -41,6 +41,7 @@ void ImageDownloader::load(bool fromHash){
|
|||
loop.processEvents();
|
||||
sleep(1);
|
||||
}
|
||||
delete reply;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,8 +70,6 @@ void ImageDownloader::saveImage(QNetworkReply *reply)
|
|||
add_hash(imageFile.fileName(), hash.result());
|
||||
learnHash(picture, hash.result());
|
||||
}
|
||||
reply->manager()->deleteLater();
|
||||
reply->deleteLater();
|
||||
// This should be called to make the picture actually show.
|
||||
// Problem is DivePictureModel is not in core.
|
||||
// Nevertheless, the image shows when the dive is selected the next time.
|
||||
|
|
Loading…
Add table
Reference in a new issue