diff options
author | Robert C. Helling <helling@atdotde.de> | 2015-11-09 16:48:12 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-11-09 10:18:10 -0800 |
commit | 2075038de1d3a181eb964020c635099ebf52b4ed (patch) | |
tree | c1d3bfa1e455928c78cdd91312ebffaab35482d2 /subsurface-core | |
parent | e0f43d8a84b29431359452b694a556052a74135d (diff) | |
download | subsurface-2075038de1d3a181eb964020c635099ebf52b4ed.tar.gz |
Store Thumbnails with image hashes
This drastically improves the time it takes to select a dive
with several pictures at the expense of longer startup and
bigger hash files.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-core')
-rw-r--r-- | subsurface-core/qthelper.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/subsurface-core/qthelper.cpp b/subsurface-core/qthelper.cpp index 40c507a7e..63248f6c4 100644 --- a/subsurface-core/qthelper.cpp +++ b/subsurface-core/qthelper.cpp @@ -1129,6 +1129,7 @@ extern "C" void reverseGeoLookup(degrees_t latitude, degrees_t longitude, uint32 QHash<QString, QByteArray> hashOf; QMutex hashOfMutex; QHash<QByteArray, QString> localFilenameOf; +QHash <QString, QImage > thumbnailCache; extern "C" char * hashstring(char * filename) { @@ -1152,6 +1153,7 @@ void read_hashes() QDataStream stream(&hashfile); stream >> localFilenameOf; stream >> hashOf; + stream >> thumbnailCache; hashfile.close(); } } @@ -1163,6 +1165,7 @@ void write_hashes() QDataStream stream(&hashfile); stream << localFilenameOf; stream << hashOf; + stream << thumbnailCache; hashfile.commit(); } else { qDebug() << "cannot open" << hashfile.fileName(); |