diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-03-07 16:37:31 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-05-13 13:52:35 -0700 |
commit | f60343eebbf6a31a4643dde9f4454f6ce84f61d3 (patch) | |
tree | 160871fa52c6973c1d9e1459df6c98d6b5db19a4 /qt-models/divepicturemodel.cpp | |
parent | 5d372cfda3770207ce95e6d64ac2ee141681421b (diff) | |
download | subsurface-f60343eebbf6a31a4643dde9f4454f6ce84f61d3.tar.gz |
Dive pictures: replace picture struct by QString
In imagedownloader.cpp the only thing we need from the picture struct
is the filename. Therefore, use QStrings instead of the picture struct.
This simplifies memory management.
Remove the clone_picture() function, which is not needed anymore.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/divepicturemodel.cpp')
-rw-r--r-- | qt-models/divepicturemodel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-models/divepicturemodel.cpp b/qt-models/divepicturemodel.cpp index 6a90c1431..33ac7e886 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 = getHashedImage(entry.picture).scaled(maxSize, maxSize, Qt::KeepAspectRatio); + thumbnail = getHashedImage(QString(entry.picture->filename)); addThumbnailToCache(thumbnail, entry); } |