core/imagedownloader.cpp: remove recursion

If loading from hash failed in the saveImage() slot(!) it would
recurse into loadFromUrl(), which would generate a new network
reply. Very scary and a (small) wonder that it worked.

Let's try to make this all more explicit.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2018-02-08 22:45:55 +01:00 committed by Lubomir I. Ivanov
parent 54d56a74aa
commit 117f4a0d7d
2 changed files with 21 additions and 18 deletions

View file

@ -14,11 +14,9 @@ public:
void load(bool fromHash);
private:
bool loadFromUrl(const QUrl &); // return true on success
void saveImage(QNetworkReply *reply, bool &success);
struct picture *picture;
bool loadFromHash;
private slots:
void saveImage(QNetworkReply *reply);
};
class SHashedImage : public QImage {