mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
630862971f
commit
5d372cfda3
3 changed files with 14 additions and 22 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue