Dive pictures: Make failure of loading images less noisy

For debug reasons, failure to load the original image was spilled
to the console, even if the local file was then found.

Only print a message, when also the local image failed loading.
This needed a bit of code reshuffling. To know when to print a
failed-loading message, the URL is now checked at the Thumbnailer
level, not the ImageDownloader level. The ImageDownloader is
passed the URL and the original filename (if different). The
image is loaded from the URL, but the signals send the original
filename, so that the thumbnail can be associated to the proper
image.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2018-06-12 12:50:34 +02:00 committed by Dirk Hohndel
parent be361c5cfb
commit 4c19d3da1d
2 changed files with 14 additions and 28 deletions

View file

@ -13,7 +13,7 @@ public:
static ImageDownloader *instance();
ImageDownloader();
public slots:
void load(QString filename);
void load(QUrl url, QString filename);
signals:
void loaded(QString filename);
void failed(QString filename);