aboutsummaryrefslogtreecommitdiffstats
path: root/qt-models
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-03-04 16:40:06 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-05-13 13:52:35 -0700
commit5d372cfda3770207ce95e6d64ac2ee141681421b (patch)
treeba4eb0e0f9e3faba5f8089129d8d4855b45e2a09 /qt-models
parent630862971fc314439dfa6d274474eb18e8f96711 (diff)
downloadsubsurface-5d372cfda3770207ce95e6d64ac2ee141681421b.tar.gz
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 <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models')
-rw-r--r--qt-models/divepicturemodel.cpp2
1 files changed, 1 insertions, 1 deletions
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);
}