From 04d9dcbe2139109e00d07488f6e45d0353a676e2 Mon Sep 17 00:00:00 2001 From: Arno Date: Fri, 28 Jun 2013 13:47:08 +0200 Subject: Implement destructor for ArchiveModel, get rid of 2 signals We need a destructor for ArchiveModel, because we have to stop the collectors first. Otherwise there will be random crashes all over the place on exit when the Threads are destroyed while they're still running. Also, get rid of the signals collectorDone and collectorAboutToBeDone. The latter was unused, and the former can be replaced with QAbstractItemModel::modelReset. --- archiveview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'archiveview.cpp') diff --git a/archiveview.cpp b/archiveview.cpp index e2cfac7..34fd169 100644 --- a/archiveview.cpp +++ b/archiveview.cpp @@ -51,7 +51,7 @@ ArchiveView::ArchiveView(QWidget *parent) : QWidget(parent), mConstructing(true) // item in the list, nothing will happen otherwise! mArchiveModel->setOrder(sortOrderName); connect(mSortOrder, SIGNAL(currentIndexChanged(QString)), mArchiveModel, SLOT(setOrder(QString))); - connect(mArchiveModel, SIGNAL(collectorDone()), this, SLOT(expandedItems())); + connect(mArchiveModel, SIGNAL(modelReset()), this, SLOT(expandedItems())); QLabel *l1 = new QLabel(tr("Filter")); mFilter = new QLineEdit; -- cgit v1.2.3-70-g09d2