From fae552580c1214ff5b3e61c6f981c720b3f49263 Mon Sep 17 00:00:00 2001 From: Arno Date: Mon, 8 Jul 2013 22:36:23 +0200 Subject: 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... --- smdirwatcher.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 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; -- cgit v1.2.3-70-g09d2