From 06cfadc8386aec27b9c7c43486fc0b057e9fb022 Mon Sep 17 00:00:00 2001 From: Arno Date: Mon, 29 Jul 2013 10:08:33 +0200 Subject: Prevent datacollector from running when operating on files This stuff was racy from the beginning. It could happen that the model got reset after we fetched the selected indexes. Add a mutex and lock it before operating on the file view. Hopefully this will many, if not all random crashes. --- smdirmodel.h | 1 + 1 file changed, 1 insertion(+) (limited to 'smdirmodel.h') diff --git a/smdirmodel.h b/smdirmodel.h index 21aab40..1c7e9b2 100644 --- a/smdirmodel.h +++ b/smdirmodel.h @@ -34,6 +34,7 @@ class SmDirModel : public SmTreeModel { QDir dir() const; QFileInfo fileInfo(const QModelIndex &idx) const; QTimer *refresTimer() { return mRefreshTimer; } + SmDataColletor *collector() { return mCollector; } public slots: void setDir(const QString &dir); -- cgit v1.2.3-70-g09d2