From 7e3d21cb6a9e8142b7132fe8fdae7a844b505006 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 1 Jun 2013 11:33:56 +0200 Subject: Don't clean up after ourselves Don't delete threads and stuff in destructors. It leads to SIGARBRT when debugging. Now we get a warning on close, but who cares? --- filesystemwidget.h | 1 - smdirmodel.cpp | 5 ----- smdirmodel.h | 1 - smdirwatcher.cpp | 9 --------- smdirwatcher.h | 1 - 5 files changed, 17 deletions(-) diff --git a/filesystemwidget.h b/filesystemwidget.h index 62c42db..bc5dbcb 100644 --- a/filesystemwidget.h +++ b/filesystemwidget.h @@ -28,7 +28,6 @@ class FilesystemWidget : public QWidget { public: enum ClipboardMode { Copy, Cut, None }; FilesystemWidget(QWidget *parent = 0); - ~FilesystemWidget() {} FileView *fileView() { return mFileView; } FilesystemFileProxy *fileProxy() { return mFileProxy; } FileSystemModel *dirModel() { return mModel; } diff --git a/smdirmodel.cpp b/smdirmodel.cpp index 1a631ba..1d90573 100644 --- a/smdirmodel.cpp +++ b/smdirmodel.cpp @@ -30,11 +30,6 @@ SmDirModel::SmDirModel(const QStringList &headers, QObject *parent) : SmTreeMode connect(mCollector, SIGNAL(newData(QList,int)), this, SLOT(dirEvent(QList,int)), Qt::BlockingQueuedConnection); } -SmDirModel::~SmDirModel(){ - delete mWatch; - delete mRunTimer; -} - QVariant SmDirModel::data(const QModelIndex &index, int role) const{ if(!index.isValid()){ return QVariant(); diff --git a/smdirmodel.h b/smdirmodel.h index 8f000e4..8522662 100644 --- a/smdirmodel.h +++ b/smdirmodel.h @@ -27,7 +27,6 @@ class SmDirModel : public SmTreeModel { enum { NumFields = 9 }; enum FileDate { Access, Modified, Status }; explicit SmDirModel(const QStringList &headers, QObject *parent = 0); - ~SmDirModel(); virtual QVariant data(const QModelIndex &index, int role) const; virtual bool setData(const QModelIndex &index, const QVariant &value, int role); bool isDir(const QModelIndex &idx) const; diff --git a/smdirwatcher.cpp b/smdirwatcher.cpp index 09aead4..9883a85 100644 --- a/smdirwatcher.cpp +++ b/smdirwatcher.cpp @@ -37,15 +37,6 @@ SmDirWatcher::SmDirWatcher(int numFields, QObject *parent) : QThread(parent), mF mCollector->start(); } -SmDirWatcher::~SmDirWatcher(){ - mCollector->terminate(); - mCollector->wait(); - if(mFd && mDescr){ - inotify_rm_watch(mFd, mDescr); - } - delete mINdata; -} - void SmDirWatcher::setDir(const QString &dir){ if(mDescr){ inotify_rm_watch(mFd, mDescr); //generates IN_IGNORE ??? diff --git a/smdirwatcher.h b/smdirwatcher.h index 3a30360..5f3ef55 100644 --- a/smdirwatcher.h +++ b/smdirwatcher.h @@ -27,7 +27,6 @@ class SmDirWatcher : public QThread { enum DWEvent { None, Added, Deleted, Modified, Populate }; explicit SmDirWatcher(int numFields, QObject *parent = 0); SmDataColletor *collector() { return mCollector; } - ~SmDirWatcher(); signals: void dwEvent(const QString& file, int event); -- cgit v1.2.3-70-g09d2