mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cleanup: remove updateHash() function
updateHash() and hashPicture() did the same thing, with the exception that hashPicture() marked the dive list as changed if a hash changed. This seems like a good idea in any case, therefore always use hashPicture(). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
f8835751dc
commit
a0d02bacf3
2 changed files with 1 additions and 10 deletions
|
@ -120,7 +120,7 @@ SHashedImage::SHashedImage(struct picture *picture) : QImage()
|
|||
load(filename);
|
||||
if (!isNull()) {
|
||||
// Make sure the hash still matches the image file
|
||||
QtConcurrent::run(updateHash, clone_picture(picture));
|
||||
QtConcurrent::run(hashPicture, clone_picture(picture));
|
||||
} else {
|
||||
// Interpret filename as URL
|
||||
QtConcurrent::run(loadPicture, clone_picture(picture), false);
|
||||
|
|
|
@ -1185,15 +1185,6 @@ QString fileFromHash(const char *hash)
|
|||
return localFilenameOf[QByteArray::fromHex(hash)];
|
||||
}
|
||||
|
||||
// This needs to operate on a copy of picture as it frees it after finishing!
|
||||
void updateHash(struct picture *picture) {
|
||||
if (!picture)
|
||||
return;
|
||||
QByteArray hash = hashFile(fileFromHash(picture->hash));
|
||||
learnHash(picture, hash);
|
||||
picture_free(picture);
|
||||
}
|
||||
|
||||
// This needs to operate on a copy of picture as it frees it after finishing!
|
||||
void hashPicture(struct picture *picture)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue