From eb697d7a3b7fc8b8af052b6f025610dd85eb176b Mon Sep 17 00:00:00 2001 From: Arno Date: Tue, 25 Jun 2013 20:02:41 +0200 Subject: Fix random crashes in ArchiveCollector This was a hard one, actually. Since we only returned a pointer from the ArchiveCollector, it worked _most_ of the time, but crashed at random when the view was reading the tree while the collector was updating it. So create a working copy constructor for SmRootItem and return a copy of the the tree when the collector is done. I bet that's also the reason for the random crashes in the filesystem view. --- archivemodel.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'archivemodel.h') diff --git a/archivemodel.h b/archivemodel.h index e4cfc5a..be69346 100644 --- a/archivemodel.h +++ b/archivemodel.h @@ -8,7 +8,6 @@ #ifndef ARCHIVEMODEL_H #define ARCHIVEMODEL_H -#include #include #include #include @@ -71,7 +70,7 @@ class ArchiveCollector : public QThread { Q_OBJECT public: explicit ArchiveCollector(int numFields, int order, QObject *parent = 0); - SmTreeItem *rootItem() { return mRootItem; } + SmTreeItem *rootItem(); int sortOrder() const { return mSortOrder; } signals: -- cgit v1.2.3-70-g09d2