From e7a9d5590b8e4c0b11df6b4ef7c16db046208bca Mon Sep 17 00:00:00 2001 From: Frank Reininghaus Date: Thu, 6 Jun 2013 08:38:58 +0200 Subject: [PATCH] startPreviewJob: if items is empty, delay call to slotPreviewJobFinshed This should prevent that other functions, which start preview jobs, eventually call themselves and thus cause trouble. CCBUG: 320791 --- src/kitemviews/kfileitemmodelrolesupdater.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kitemviews/kfileitemmodelrolesupdater.cpp b/src/kitemviews/kfileitemmodelrolesupdater.cpp index c083559bf..644605c57 100644 --- a/src/kitemviews/kfileitemmodelrolesupdater.cpp +++ b/src/kitemviews/kfileitemmodelrolesupdater.cpp @@ -912,7 +912,7 @@ void KFileItemModelRolesUpdater::startPreviewJob(const KFileItemList items) m_state = PreviewJobRunning; if (items.isEmpty()) { - slotPreviewJobFinished(0); + QMetaObject::invokeMethod(this, "slotPreviewJobFinished", Qt::QueuedConnection, Q_ARG(KJob*, 0)); return; } -- 2.47.3