Simplify image hashing logic

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Robert C. Helling 2016-01-09 16:27:23 +01:00 committed by Dirk Hohndel
parent 09c854fee0
commit 3ae6326847
2 changed files with 2 additions and 5 deletions

View file

@ -1014,11 +1014,7 @@ QString fileFromHash(char *hash)
void updateHash(struct picture *picture) {
QByteArray hash = hashFile(fileFromHash(picture->hash));
QMutexLocker locker(&hashOfMutex);
hashOf[QString(picture->filename)] = hash;
char *old = picture->hash;
picture->hash = strdup(hash.toHex());
free(old);
learnHash(picture, hash);
}
void hashPicture(struct picture *picture)