From 08962cb38dbd7e07d98397826c5192f0a4156143 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 2 Jun 2018 18:03:03 +0200 Subject: 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 --- desktop-widgets/divelistview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'desktop-widgets') 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())); } } -- cgit v1.2.3-70-g09d2