Fix loading images from URLs

This was broken when introducing loading images from the server. Now it first tries the
server and if that fails tries the actual URL.

Still, the image does not show up immediately, since the DivePictureModel is
unavailable to the image downloader to be told to update the images.

This needs to be fixed but in the mean time, the image is shown when the dive
is reselected (possibly on the next run) since it is then loaded from the cache.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Robert C. Helling 2016-03-15 22:45:17 +01:00 committed by Dirk Hohndel
parent 8a59d78faa
commit e32ae20ca3
2 changed files with 12 additions and 2 deletions

View file

@ -20,6 +20,7 @@ public:
private:
struct picture *picture;
QNetworkAccessManager manager;
bool loadFromHash;
private slots:
void saveImage(QNetworkReply *reply);