Dive pictures: Introduce thumbnailer class

Create a new class, which performs all thumbnailing code.
This is mostly code reshuffling. Thumbnails are extracted
either from a cache or thumbnail calculation is started in
a worker thread.

Since getHashedImage() is called from a worker thread it
makes no sense to call subfunctions in yet another worker
thread. Remove these calls.

In contrast to the previous code, on error the background
thread produces a failure image, but it is not yet shown.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2018-03-10 14:15:50 +01:00 committed by Dirk Hohndel
parent f60343eebb
commit 3967b1fd4d
4 changed files with 141 additions and 68 deletions

View file

@ -11,6 +11,9 @@
#include "gettextfromc.h"
#include "metadata.h"
#include <sys/time.h>
#include "exif.h"
#include "file.h"
#include "imagedownloader.h"
#include "prefs-macros.h"
#include <QFile>
#include <QRegExp>