summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2013-07-08 22:36:23 +0200
committerArno <am@disconnect.de>2013-07-08 22:36:23 +0200
commitfae552580c1214ff5b3e61c6f981c720b3f49263 (patch)
tree7f25a5ba5d759ec4fde627091346c4e791a272dd
parent9dc2528dfdb04f18641602cfd24c09cb9b119107 (diff)
downloadSheMov-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...
-rw-r--r--smdirwatcher.cpp3
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;