From f3ef38ca0d6db6f7e022a0e565f7460ed22f431e Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 10 Jun 2018 16:39:47 +0200 Subject: Dive pictures: remove hashes In the last commits, the canonical-to-local filename map was made independent from the image hashes and the location of moved images was based on filename not hashes. The hashes are now in principle unused (except for conversion of old-style local filename lookups). Therefore, remove the hashes in this commit. This makes addition of images distinctly faster. Signed-off-by: Berthold Stoeger --- core/qthelper.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'core/qthelper.h') diff --git a/core/qthelper.h b/core/qthelper.h index 0594bf7df..b20763a3c 100644 --- a/core/qthelper.h +++ b/core/qthelper.h @@ -27,16 +27,10 @@ QString get_divepoint_gas_string(struct dive *d, const divedatapoint& dp); QString get_taglist_string(struct tag_entry *tag_list); void read_hashes(); void write_hashes(); -void updateHash(struct picture *picture); -QByteArray hashFile(const QString &filename); -QString hashString(const char *filename); QString thumbnailFileName(const QString &filename); -void learnImages(const QStringList &dirNames, int max_recursions); +void learnImages(const QStringList &dirNames, int max_recursions, const QVector &imageFilenames); void learnPictureFilename(const QString &originalName, const QString &localName); -void hashPicture(QString filename); -extern "C" char *hashstring(const char *filename); QString localFilePath(const QString &originalFilename); -void learnHash(const QString &originalName, const QString &localName, const QByteArray &hash); weight_t string_to_weight(const char *str); depth_t string_to_depth(const char *str); pressure_t string_to_pressure(const char *str); @@ -109,8 +103,6 @@ void updateWindowTitle(); void subsurface_mkdir(const char *dir); char *get_file_name(const char *fileName); void copy_image_and_overwrite(const char *cfileName, const char *path, const char *cnewName); -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); char *cloud_url(); -- cgit v1.2.3-70-g09d2