diff options
author | Arno <am@disconnect.de> | 2013-06-25 20:02:41 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2013-06-25 20:02:41 +0200 |
commit | eb697d7a3b7fc8b8af052b6f025610dd85eb176b (patch) | |
tree | 04c410b656baf129d3e5bfcdb4ead80f15fba4ea /archivemodel.h | |
parent | ae1582fa29de82c28872f826fa6f8b154bea88dc (diff) | |
download | SheMov-eb697d7a3b7fc8b8af052b6f025610dd85eb176b.tar.gz SheMov-eb697d7a3b7fc8b8af052b6f025610dd85eb176b.tar.bz2 SheMov-eb697d7a3b7fc8b8af052b6f025610dd85eb176b.zip |
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.
Diffstat (limited to 'archivemodel.h')
-rw-r--r-- | archivemodel.h | 3 |
1 files changed, 1 insertions, 2 deletions
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 <QHash> #include <QSqlDatabase> #include <QThread> #include <QDataStream> @@ -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: |