summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/divelistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/divelistview.cpp')
-rw-r--r--desktop-widgets/divelistview.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/desktop-widgets/divelistview.cpp b/desktop-widgets/divelistview.cpp
index 104b65a63..b32493a5d 100644
--- a/desktop-widgets/divelistview.cpp
+++ b/desktop-widgets/divelistview.cpp
@@ -1000,11 +1000,7 @@ void DiveListView::loadImageFromURL(QUrl url)
stream.writeRawData(imageData.data(), imageData.length());
imageFile.waitForBytesWritten(-1);
imageFile.close();
- add_hash(imageFile.fileName(), hash.result());
- struct picture picture;
- picture.hash = NULL;
- picture.filename = strdup(url.toString().toUtf8().data());
- learnHash(&picture, hash.result());
+ learnHash(url.toString(), imageFile.fileName(), hash.result());
matchImagesToDives(QStringList(url.toString()));
}
}