summaryrefslogtreecommitdiffstats
path: root/subsurface-core/qthelper.cpp
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2016-01-09 16:27:23 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-10 14:12:23 -0800
commit3ae6326847d84cddf633ff3b9ea5651a76e6d1ca (patch)
tree5a288e5821dbf4f3f031a16d769ed9b6f5135d2b /subsurface-core/qthelper.cpp
parent09c854fee030d7f2626a843c45f8e58a19bccb8c (diff)
downloadsubsurface-3ae6326847d84cddf633ff3b9ea5651a76e6d1ca.tar.gz
Simplify image hashing logic
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-core/qthelper.cpp')
-rw-r--r--subsurface-core/qthelper.cpp6
1 files changed, 1 insertions, 5 deletions
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)