summaryrefslogtreecommitdiffstats
path: root/core/imagedownloader.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-03-07 16:37:31 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-05-13 13:52:35 -0700
commitf60343eebbf6a31a4643dde9f4454f6ce84f61d3 (patch)
tree160871fa52c6973c1d9e1459df6c98d6b5db19a4 /core/imagedownloader.h
parent5d372cfda3770207ce95e6d64ac2ee141681421b (diff)
downloadsubsurface-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 'core/imagedownloader.h')
-rw-r--r--core/imagedownloader.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/core/imagedownloader.h b/core/imagedownloader.h
index 2a3d95df4..337185869 100644
--- a/core/imagedownloader.h
+++ b/core/imagedownloader.h
@@ -9,16 +9,15 @@
class ImageDownloader : public QObject {
Q_OBJECT
public:
- ImageDownloader(struct picture *picture);
- ~ImageDownloader();
+ ImageDownloader(const QString &filename);
void load(bool fromHash);
private:
bool loadFromUrl(const QUrl &); // return true on success
void saveImage(QNetworkReply *reply, bool &success);
- struct picture *picture;
+ QString filename;
};
-QImage getHashedImage(struct picture *picture);
+QImage getHashedImage(const QString &filename);
#endif // IMAGEDOWNLOADER_H