diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-06-19 19:23:56 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-06-19 19:23:56 +0200 |
commit | 8f06f8a31682760b385ba740db28429d7914730a (patch) | |
tree | 85e83037d358f451bf353349ef14e87575221d58 /common/modelresult.h | |
parent | ba16fd400dfd3468e90b9fe2683a4d9606fc99ee (diff) | |
download | sink-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.h | 2 |
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 | ||
31 | template <class T, class Ptr> | 32 | template <class T, class Ptr> |
32 | class ModelResult : public QAbstractItemModel | 33 | class 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 | }; |