Added a mutex to avoid loading a collection twice at the same time.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1334 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavier
2011-09-20 17:49:17 +00:00
parent d2712d8188
commit 5e39beaa7d
2 changed files with 2 additions and 0 deletions

View File

@@ -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();

View File

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