diff options
author | Arno <am@disconnect.de> | 2010-11-05 15:20:44 +0100 |
---|---|---|
committer | Arno <am@disconnect.de> | 2010-11-05 15:20:44 +0100 |
commit | 8230ea0228bd300316529c852858f7105ee75a3d (patch) | |
tree | 3ce0da30007449722bb233cb22b309e25ed13eec /consistencycheck.h | |
parent | b8a793f4a1afcd27cf03da7b620dd7a4f7f5813f (diff) | |
download | SheMov-8230ea0228bd300316529c852858f7105ee75a3d.tar.gz SheMov-8230ea0228bd300316529c852858f7105ee75a3d.tar.bz2 SheMov-8230ea0228bd300316529c852858f7105ee75a3d.zip |
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.
Diffstat (limited to 'consistencycheck.h')
-rw-r--r-- | consistencycheck.h | 10 |
1 files changed, 7 insertions, 3 deletions
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; |