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 <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2018-06-10 16:39:47 +02:00 committed by Dirk Hohndel
parent 0646b41275
commit f3ef38ca0d
11 changed files with 32 additions and 122 deletions

View file

@ -986,9 +986,8 @@ void DiveListView::loadImageFromURL(QUrl url)
return;
}
// Since we already downloaded the image we can cache it as well.
QCryptographicHash hash(QCryptographicHash::Sha1);
hash.addData(imageData);
hash.addData(url.toString().toUtf8());
QString path = QStandardPaths::standardLocations(QStandardPaths::CacheLocation).first();
QDir dir(path);
if (!dir.exists())