mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Dive pictures: Don't enter infinity loop on invalid pictures
The recently committed refactoring of the dive-picture code introduced a severe bug: If an image couldn't be loaded from disk owing to an invalid file, the filename was interpreted as an url and loaded in the background. This succeeded, because the file actually exists. After download, the file would then still be invalid and the whole thing restarted, leading to an infinity loop. To fix this, do two things: 1) Don't even try to download local files. 2) If interpreting a downloaded file fails, don't try the downloading business again. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
f4d569d89d
commit
c3c2c2f606
2 changed files with 15 additions and 11 deletions
|
|
@ -46,7 +46,7 @@ signals:
|
|||
void thumbnailChanged(QString filename, QImage thumbnail);
|
||||
private:
|
||||
Thumbnailer();
|
||||
void processItem(QString filename);
|
||||
void processItem(QString filename, bool tryDownload);
|
||||
|
||||
mutable QMutex lock;
|
||||
QThreadPool pool;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue