mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
0646b41275
commit
f3ef38ca0d
11 changed files with 32 additions and 122 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue