diff options
author | Arno <arno@disconnect.de> | 2015-08-13 13:51:13 +0200 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2015-08-13 13:51:13 +0200 |
commit | e223bc238ea3e2dbeaabcc4c9218558d26273de5 (patch) | |
tree | 6597a2126b007f3dcbec993072f5984fbe7198b0 /smdirmodel.cpp | |
parent | dc2927587eb758754babf98adb764c3bbdccd024 (diff) | |
download | SheMov-e223bc238ea3e2dbeaabcc4c9218558d26273de5.tar.gz SheMov-e223bc238ea3e2dbeaabcc4c9218558d26273de5.tar.bz2 SheMov-e223bc238ea3e2dbeaabcc4c9218558d26273de5.zip |
Fix crash in deleteFiles
This was a hard one. SmDirWatcher raced against the model. Stop and quit
the watcher before actually deleting files. That can take a while if
file operations are in progress, so show the busy cursor.
Diffstat (limited to 'smdirmodel.cpp')
-rw-r--r-- | smdirmodel.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/smdirmodel.cpp b/smdirmodel.cpp index 32bc241..b9394d8 100644 --- a/smdirmodel.cpp +++ b/smdirmodel.cpp @@ -215,3 +215,14 @@ TimerHandler::~TimerHandler(){ mTimer->start(); } } + +WatcherHandler::WatcherHandler(SmDirWatcher *watcher) : mWatcher(watcher){ + mWatcher->quit(); + mWatcher->wait(); + mWatcher->blockSignals(true); +} + +WatcherHandler::~WatcherHandler(){ + mWatcher->blockSignals(false); + mWatcher->start(); +} |