mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 23:20:52 +01:00
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:
@@ -51,6 +51,7 @@ ElementsCategory *FileElementsCollection::rootCategory() {
|
|||||||
Recharge l'arborescence des categories et elements.
|
Recharge l'arborescence des categories et elements.
|
||||||
*/
|
*/
|
||||||
void FileElementsCollection::reload() {
|
void FileElementsCollection::reload() {
|
||||||
|
QMutexLocker reload_lock(&reload_mutex_);
|
||||||
// oublie l'arborescence precedente
|
// oublie l'arborescence precedente
|
||||||
deleteContent();
|
deleteContent();
|
||||||
|
|
||||||
|
|||||||
@@ -57,5 +57,6 @@ class FileElementsCollection : public ElementsCollection {
|
|||||||
private:
|
private:
|
||||||
QString coll_path;
|
QString coll_path;
|
||||||
FileElementsCategory *root;
|
FileElementsCategory *root;
|
||||||
|
QMutex reload_mutex_; ///< Mutex used to avoid loading a collection twice at the same time
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user