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
@ -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…
x
Reference in New Issue
Block a user