From 612776e7976f1a901849c61ae9142dd49b8e3f5c Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 14 Sep 2013 13:01:21 +0200 Subject: 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. --- consistencycheck.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'consistencycheck.cpp') 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); -- cgit v1.2.3-70-g09d2