diff options
author | Arno <am@disconnect.de> | 2013-07-08 22:36:23 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2013-07-08 22:36:23 +0200 |
commit | fae552580c1214ff5b3e61c6f981c720b3f49263 (patch) | |
tree | 7f25a5ba5d759ec4fde627091346c4e791a272dd /smdirwatcher.cpp | |
parent | 9dc2528dfdb04f18641602cfd24c09cb9b119107 (diff) | |
download | SheMov-fae552580c1214ff5b3e61c6f981c720b3f49263.tar.gz SheMov-fae552580c1214ff5b3e61c6f981c720b3f49263.tar.bz2 SheMov-fae552580c1214ff5b3e61c6f981c720b3f49263.zip |
Fix crashes in SmDirWatcher
Finally! Return a copy of the file tree instead of the working item!
Hopefully this fixes a lot of crashes.
Threading is a bitch...
Diffstat (limited to 'smdirwatcher.cpp')
-rw-r--r-- | smdirwatcher.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/smdirwatcher.cpp b/smdirwatcher.cpp index 9883a85..2421b1e 100644 --- a/smdirwatcher.cpp +++ b/smdirwatcher.cpp @@ -112,7 +112,8 @@ void SmDataColletor::run(){ QPair<QString, SmDirWatcher::DWEvent> cur = mDataQueue->dequeue(); if(cur.second == SmDirWatcher::Populate){ SmTreeItem *i = populate(cur.first); - emit population(i); + SmTreeItem *copy = new SmTreeItem(*i); + emit population(copy); mSemFree->release(); continue; |