Commit ce981b54 authored by Martin Tobias Holmedahl Sandsmark's avatar Martin Tobias Holmedahl Sandsmark
Browse files

Fix hang on exit when viewing huge folder

Even if thumbnail storing is turned off in the settings gwenview still
stores them and instead deletes them on exit. I have a separate fix for
that, but this also meant that it hung for a long time when exiting
because it didn't try to shut down the thumbnail writer thread.

Differential Revision:
parent 03550233
......@@ -183,6 +183,7 @@ ThumbnailProvider::~ThumbnailProvider()
if (mPreviousThumbnailGenerator) {
disconnect(mPreviousThumbnailGenerator, nullptr, sThumbnailWriter, nullptr);
......@@ -68,7 +68,7 @@ void ThumbnailWriter::queueThumbnail(const QString& path, const QImage& image)
void ThumbnailWriter::run()
QMutexLocker locker(&mMutex);
while (!mCache.isEmpty()) {
while (!mCache.isEmpty() && !isInterruptionRequested()) {
Cache::ConstIterator it = mCache.constBegin();
const QString path = it.key();
const QImage image = it.value();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment