diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-06-02 18:03:03 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-07-04 02:27:36 +0800 |
commit | 08962cb38dbd7e07d98397826c5192f0a4156143 (patch) | |
tree | b974f574d8b68bd97f6b50bd0150fbd83ac6dd87 /desktop-widgets | |
parent | 5375eee4e6a6af1402c2bf8f7cce40fc4f5340f5 (diff) | |
download | subsurface-08962cb38dbd7e07d98397826c5192f0a4156143.tar.gz |
Dive pictures: index local file name by canonical filname
The connection canonical filename to local filename was done via
two maps:
1) canonical filename -> hash
2) hash -> local filename
But the local filename was always queried from the canonical filename.
Therefore, directly index the former with the latter.
On startup, convert the old map to the new one.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/divelistview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop-widgets/divelistview.cpp b/desktop-widgets/divelistview.cpp index 20d708957..ded3acbc7 100644 --- a/desktop-widgets/divelistview.cpp +++ b/desktop-widgets/divelistview.cpp @@ -999,7 +999,7 @@ void DiveListView::loadImageFromURL(QUrl url) stream.writeRawData(imageData.data(), imageData.length()); imageFile.waitForBytesWritten(-1); imageFile.close(); - learnHash(url.toString(), imageFile.fileName(), hash.result()); + learnPictureFilename(url.toString(), imageFile.fileName()); matchImagesToDives(QStringList(url.toString())); } } |