mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
54d56a74aa
commit
117f4a0d7d
2 changed files with 21 additions and 18 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue