From 5d372cfda3770207ce95e6d64ac2ee141681421b Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 4 Mar 2018 16:40:06 +0100 Subject: Dive pictures: turn SHashedImage class into getHashedImage() function SHashedImage was a subclass of QImage, which fetched the image according to the filename hashes. Turn this into a function, as this is much more idiomatic and flexible. Signed-off-by: Berthold Stoeger --- qt-models/divepicturemodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-models') diff --git a/qt-models/divepicturemodel.cpp b/qt-models/divepicturemodel.cpp index e92a16bd0..6a90c1431 100644 --- a/qt-models/divepicturemodel.cpp +++ b/qt-models/divepicturemodel.cpp @@ -65,7 +65,7 @@ static void scaleImages(PictureEntry &entry, int maxSize) // Rescale in such a case to avoid resizing artifacts. if (thumbnail.isNull() || (thumbnail.size().width() < maxSize && thumbnail.size().height() < maxSize)) { qDebug() << "No thumbnail in cache for" << entry.filename; - thumbnail = SHashedImage(entry.picture).scaled(maxSize, maxSize, Qt::KeepAspectRatio); + thumbnail = getHashedImage(entry.picture).scaled(maxSize, maxSize, Qt::KeepAspectRatio); addThumbnailToCache(thumbnail, entry); } -- cgit v1.2.3-70-g09d2