From b750a48f0f834dcf33fc2518c877f498f3b3cff5 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 18 Feb 2018 14:07:15 +0100 Subject: Cleanup: Don't store hash in picture struct in learnHash() learnHash() is called either on a local picture structure [DiveListView::loadImageFromURL()] or on a cloned picture structure [ImageDownloader::saveImage()]. In neither case the picture structure is passed to the frontend. Therefore, storing the new hash in the picture struct is not necessary. Signed-off-by: Berthold Stoeger --- tests/testpicture.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests/testpicture.cpp') diff --git a/tests/testpicture.cpp b/tests/testpicture.cpp index 38e8e3d5b..94b1fe0ee 100644 --- a/tests/testpicture.cpp +++ b/tests/testpicture.cpp @@ -43,9 +43,8 @@ void TestPicture::addPicture() QVERIFY(pic2->hash == NULL); learnHash(pic1, hashFile(localFilePath(pic1->filename))); learnHash(pic2, hashFile(localFilePath(pic2->filename))); - QCOMPARE(pic1->hash, "929ad9499b7ae7a9e39ef63eb6c239604ac2adfa"); - QCOMPARE(pic2->hash, "fa8bd48f8f24017a81e1204f52300bd98b43d4a7"); - + QCOMPARE(hashstring(pic1->filename), "929ad9499b7ae7a9e39ef63eb6c239604ac2adfa"); + QCOMPARE(hashstring(pic2->filename), "fa8bd48f8f24017a81e1204f52300bd98b43d4a7"); } -- cgit v1.2.3-70-g09d2