From 8230ea0228bd300316529c852858f7105ee75a3d Mon Sep 17 00:00:00 2001 From: Arno Date: Fri, 5 Nov 2010 15:20:44 +0100 Subject: Let ConsistencyChecker run in QThread Until now ConsistencyChecker ran in the GUI-Thread. According to the docs the event loop of the QThread needs to be started to run something in the thread. So use a QTimer::singleShot() to start the check function. --- consistencycheck.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'consistencycheck.h') diff --git a/consistencycheck.h b/consistencycheck.h index 49b9a8e..2f934fc 100644 --- a/consistencycheck.h +++ b/consistencycheck.h @@ -29,7 +29,9 @@ class ConsistencyCheck : public QDialog { private slots: void startChecker(int checkerType); void addMessage(const QString &message); - void cancelExit(); + void checkerStarted(); + void checkerFinished(); + void cancelChecker(); void showErrorsChanged(int state); private: @@ -55,7 +57,10 @@ class ConsistencyChecker : public QThread { void check(); public slots: - void cancel(bool cancel); + void setCancel(bool cancel); + + private slots: + void dbCheck(); signals: void consistencyMsg(const QString &msg); @@ -64,7 +69,6 @@ class ConsistencyChecker : public QThread { void run(); private: - void dbCheck(); QString archivePath(const QString &fileName, const QString &md5sum) const; bool mCanceled; int mMode; -- cgit v1.2.3-70-g09d2