summaryrefslogtreecommitdiffstats
path: root/common/modelresult.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-06-19 19:23:56 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-06-19 19:23:56 +0200
commit8f06f8a31682760b385ba740db28429d7914730a (patch)
tree85e83037d358f451bf353349ef14e87575221d58 /common/modelresult.h
parentba16fd400dfd3468e90b9fe2683a4d9606fc99ee (diff)
downloadsink-8f06f8a31682760b385ba740db28429d7914730a.tar.gz
sink-8f06f8a31682760b385ba740db28429d7914730a.zip
Don't use a static for the threadboundary
Otherwise we risk calling into already destroyed models.
Diffstat (limited to 'common/modelresult.h')
-rw-r--r--common/modelresult.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/modelresult.h b/common/modelresult.h
index 64431da..7924e2d 100644
--- a/common/modelresult.h
+++ b/common/modelresult.h
@@ -27,6 +27,7 @@
27#include <functional> 27#include <functional>
28#include "query.h" 28#include "query.h"
29#include "resultprovider.h" 29#include "resultprovider.h"
30#include "threadboundary.h"
30 31
31template <class T, class Ptr> 32template <class T, class Ptr>
32class ModelResult : public QAbstractItemModel 33class ModelResult : public QAbstractItemModel
@@ -76,4 +77,5 @@ private:
76 Sink::Query mQuery; 77 Sink::Query mQuery;
77 std::function<void(const Ptr &)> loadEntities; 78 std::function<void(const Ptr &)> loadEntities;
78 typename Sink::ResultEmitter<Ptr>::Ptr mEmitter; 79 typename Sink::ResultEmitter<Ptr>::Ptr mEmitter;
80 async::ThreadBoundary threadBoundary;
79}; 81};