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... --- smdirmodel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'smdirmodel.cpp') diff --git a/smdirmodel.cpp b/smdirmodel.cpp index 16caf02..23e76fa 100644 --- a/smdirmodel.cpp +++ b/smdirmodel.cpp @@ -30,6 +30,12 @@ SmDirModel::SmDirModel(const QStringList &headers, QObject *parent) : SmTreeMode connect(mCollector, SIGNAL(newData(QList,int)), this, SLOT(dirEvent(QList,int)), Qt::BlockingQueuedConnection); } +SmDirModel::~SmDirModel(){ + if(mWatch->isRunning()){ + mWatch->stop(); + } +} + QVariant SmDirModel::data(const QModelIndex &index, int role) const{ if(!index.isValid()){ return QVariant(); -- cgit v1.2.3-70-g09d2