From 3ae6326847d84cddf633ff3b9ea5651a76e6d1ca Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Sat, 9 Jan 2016 16:27:23 +0100 Subject: Simplify image hashing logic Signed-off-by: Robert C. Helling Signed-off-by: Dirk Hohndel --- subsurface-core/qthelper.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'subsurface-core/qthelper.cpp') diff --git a/subsurface-core/qthelper.cpp b/subsurface-core/qthelper.cpp index 4efe57bd4..915f2636c 100644 --- a/subsurface-core/qthelper.cpp +++ b/subsurface-core/qthelper.cpp @@ -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) -- cgit v1.2.3-70-g09d2