From 1b1d3a18a8fffdd61f533fd4b0bde4f75d683212 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 27 Jul 2013 07:18:32 +0200 Subject: Cleanup closeEvent Don't try to delete all the prepared statements manually. Get rid of the ~destructors and just close the QSqlDatabase. close() deletes all Statements. Also, quit() all QThreads on closeEvent() except CompleterProducer. When the experimental archive view gets merged, that QThread is gone. No need to bother... --- smdirwatcher.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'smdirwatcher.h') diff --git a/smdirwatcher.h b/smdirwatcher.h index b0edd2f..77d0d97 100644 --- a/smdirwatcher.h +++ b/smdirwatcher.h @@ -34,6 +34,7 @@ class SmDirWatcher : public QThread { public slots: void run(); + void stop(); void setDir(const QString &dir); private: @@ -57,6 +58,7 @@ class SmDataColletor : public QThread { public slots: void setCheckForPresent(bool present); void run(); + void stop() { mCancel = true; } signals: void newData(const QList,int); @@ -73,6 +75,7 @@ class SmDataColletor : public QThread { int mMode; const int mNumFields; bool mCheckForPresent; + bool mCancel; QMutex mCheckForPresentMx; QSqlQuery *mPicPresentQ; QSqlQuery *mMovPresentQ; -- cgit v1.2.3-70-g09d2