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
This commit is contained in:
Frank Reininghaus 2013-06-06 08:38:58 +02:00
parent a8348c8fd9
commit 0c3305c8d0

View file

@ -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;
}