summaryrefslogtreecommitdiffstats
path: root/consistencycheck.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2013-09-14 13:01:21 +0200
committerArno <am@disconnect.de>2013-09-14 13:01:21 +0200
commit612776e7976f1a901849c61ae9142dd49b8e3f5c (patch)
tree9244987862d4b5f462bfb621d39d8bd2b5c29a95 /consistencycheck.cpp
parentab474b97614825636831a81c7ea8097ef7b14af9 (diff)
downloadSheMov-612776e7976f1a901849c61ae9142dd49b8e3f5c.tar.gz
SheMov-612776e7976f1a901849c61ae9142dd49b8e3f5c.tar.bz2
SheMov-612776e7976f1a901849c61ae9142dd49b8e3f5c.zip
Behave on qApp->quit()
Sometimes there was a warning that a thread was being destroyed while still running. This was SmDirWatcher::run(). read() blocks until new data is ready, so run() never exited. Fix it by poll()ing the inotify_descriptor. Return immediately if no data is ready. Also fix a small memory leak. Delete ConsistencyChecker when the dialog is destructed.
Diffstat (limited to 'consistencycheck.cpp')
-rw-r--r--consistencycheck.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/consistencycheck.cpp b/consistencycheck.cpp
index 7e463a2..1583093 100644
--- a/consistencycheck.cpp
+++ b/consistencycheck.cpp
@@ -101,6 +101,10 @@ ConsistencyCheck::ConsistencyCheck(QWidget *parent, Qt::WindowFlags f) : SmDialo
setMinimumWidth(600);
}
+ConsistencyCheck::~ConsistencyCheck(){
+ mChecker->deleteLater();
+}
+
void ConsistencyCheck::setProgressBarMax(int max){
mProgress->reset();
mProgress->setMaximum(max);