summaryrefslogtreecommitdiffstats
path: root/common/modelresult.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-09-26 11:58:38 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-09-26 11:58:38 +0200
commitbe8dba1827ec54ec11d9a3ef143db9ad7f7f38df (patch)
tree4c441927d9e1851126143e5f8170d48fa87df17b /common/modelresult.cpp
parent52ad48c8bd755a2fde249296d6017853538f478f (diff)
downloadsink-be8dba1827ec54ec11d9a3ef143db9ad7f7f38df.tar.gz
sink-be8dba1827ec54ec11d9a3ef143db9ad7f7f38df.zip
The threading reduction is working.
Diffstat (limited to 'common/modelresult.cpp')
-rw-r--r--common/modelresult.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/modelresult.cpp b/common/modelresult.cpp
index d13bba9..add84aa 100644
--- a/common/modelresult.cpp
+++ b/common/modelresult.cpp
@@ -289,6 +289,12 @@ template <class T, class Ptr>
289void ModelResult<T, Ptr>::modify(const Ptr &value) 289void ModelResult<T, Ptr>::modify(const Ptr &value)
290{ 290{
291 auto childId = qHash(*value); 291 auto childId = qHash(*value);
292 if (!mEntities.contains(childId)) {
293 //Happens because the DatabaseQuery emits modifiations also if the item used to be filtered.
294 SinkTrace() << "Tried to modify a value that is not yet part of the model";
295 add(value);
296 return;
297 }
292 auto id = parentId(value); 298 auto id = parentId(value);
293 // Ignore updates we get before the initial fetch is done 299 // Ignore updates we get before the initial fetch is done
294 if (!mEntityChildrenFetched.contains(id)) { 300 if (!mEntityChildrenFetched.contains(id)) {