summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/dive.c1
-rw-r--r--core/qthelper.cpp13
-rw-r--r--core/qthelper.h1
3 files changed, 0 insertions, 15 deletions
diff --git a/core/dive.c b/core/dive.c
index a931c5dd0..6821629d1 100644
--- a/core/dive.c
+++ b/core/dive.c
@@ -3838,7 +3838,6 @@ void dive_add_picture(struct dive *dive, struct picture *newpic)
pic_ptr = &(*pic_ptr)->next;
newpic->next = *pic_ptr;
*pic_ptr = newpic;
- cache_picture(newpic);
return;
}
diff --git a/core/qthelper.cpp b/core/qthelper.cpp
index d6a61b39c..12b025c3c 100644
--- a/core/qthelper.cpp
+++ b/core/qthelper.cpp
@@ -1216,12 +1216,6 @@ void learnHash(const QString &originalName, const QString &localName, const QByt
hashOf[originalName] = hash;
}
-static bool haveHash(const QString &filename)
-{
- QMutexLocker locker(&hashOfMutex);
- return hashOf.contains(filename);
-}
-
QString localFilePath(const QString &originalFilename)
{
QMutexLocker locker(&hashOfMutex);
@@ -1241,13 +1235,6 @@ void hashPicture(QString filename)
mark_divelist_changed(true);
}
-extern "C" void cache_picture(struct picture *picture)
-{
- QString filename = picture->filename;
- if (!haveHash(filename))
- QtConcurrent::run(hashPicture, filename);
-}
-
QStringList imageExtensionFilters() {
QStringList filters;
foreach (QString format, QImageReader::supportedImageFormats()) {
diff --git a/core/qthelper.h b/core/qthelper.h
index e4c64afa8..f48032d13 100644
--- a/core/qthelper.h
+++ b/core/qthelper.h
@@ -113,7 +113,6 @@ char *hashstring(const char *filename);
void register_hash(const char *filename, const char *hash);
char *move_away(const char *path);
const char *local_file_path(struct picture *picture);
-void cache_picture(struct picture *picture);
char *cloud_url();
char *hashfile_name_string();
char *picturedir_string();