diff --git a/sources/fileelementscollection.cpp b/sources/fileelementscollection.cpp index b76bab07e..1243117e3 100644 --- a/sources/fileelementscollection.cpp +++ b/sources/fileelementscollection.cpp @@ -51,6 +51,7 @@ ElementsCategory *FileElementsCollection::rootCategory() { Recharge l'arborescence des categories et elements. */ void FileElementsCollection::reload() { + QMutexLocker reload_lock(&reload_mutex_); // oublie l'arborescence precedente deleteContent(); diff --git a/sources/fileelementscollection.h b/sources/fileelementscollection.h index a2498be16..70d4b3231 100644 --- a/sources/fileelementscollection.h +++ b/sources/fileelementscollection.h @@ -57,5 +57,6 @@ class FileElementsCollection : public ElementsCollection { private: QString coll_path; FileElementsCategory *root; + QMutex reload_mutex_; ///< Mutex used to avoid loading a collection twice at the same time }; #endif