From: Frank Reininghaus Date: Thu, 6 Jun 2013 06:38:58 +0000 (+0200) Subject: startPreviewJob: if items is empty, delay call to slotPreviewJobFinshed X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/e7a9d5590b8e4c0b11df6b4ef7c16db046208bca 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 --- 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; }