]> cloud.milkyroute.net Git - dolphin.git/commitdiff
startPreviewJob: if items is empty, delay call to slotPreviewJobFinshed
authorFrank Reininghaus <frank78ac@googlemail.com>
Thu, 6 Jun 2013 06:38:58 +0000 (08:38 +0200)
committerFrank Reininghaus <frank78ac@googlemail.com>
Thu, 6 Jun 2013 06:38:58 +0000 (08:38 +0200)
This should prevent that other functions, which start preview jobs,
eventually call themselves and thus cause trouble.

CCBUG: 320791

src/kitemviews/kfileitemmodelrolesupdater.cpp

index c083559bfef8a35009e871582f98521aa2a9d7ea..644605c5720235867a825a0c17c6a7564a3789d8 100644 (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;
     }