aboutsummaryrefslogtreecommitdiffstats
path: root/subsurface-core/imagedownloader.h
AgeCommit message (Collapse)Author
2016-03-16Fix loading images from URLsGravatar Robert C. Helling
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>
2016-03-16When handing off a picture to a worker thread, copy it firstGravatar Robert C. Helling
as otherwise we crash when the picture is freed before the worker thread (to load from the net or to compute hashes) is finished Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-10If all else fails try loading images from cloud serverGravatar Robert C. Helling
Of course, as of this writing, there are no images on the server. In addition, this patch adds comments to explain the by now convoluted image retrieval logic (local file, filename as URL, by hash, cloud server). Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06Move ImageDownloader out of the desktop widgetsGravatar Dirk Hohndel
This required a bit more untangling, but with this it seems we can build subsurface-mobile again (at least on the desktop). Interesting is the removal from inside the ImageDownloader of the call to DivePictureModel::instance()->updateDivePictures() - which actually could cause some interesting recursion issues. If it turns out we did indeed need this, it needs to be re-architected. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>