From f60343eebbf6a31a4643dde9f4454f6ce84f61d3 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Wed, 7 Mar 2018 16:37:31 +0100 Subject: 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 --- core/imagedownloader.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'core/imagedownloader.h') 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 -- cgit v1.2.3-70-g09d2