diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-06-19 11:00:39 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-06-19 12:27:01 +0200 |
commit | 49b83e87e4da54cdd18ec04b10fdb4624389bd80 (patch) | |
tree | d87a11bcb14e6ef3811df53c06aeb1726616a26c /common/indexer.h | |
parent | b940489ed6afe413339a1c602d05f3b4f3133463 (diff) | |
download | sink-49b83e87e4da54cdd18ec04b10fdb4624389bd80.tar.gz sink-49b83e87e4da54cdd18ec04b10fdb4624389bd80.zip |
Fixed the thread index.
* Modifications could result in index changes because we lost the
threadId due to remove + add. A modify was necessary (although we can
ignore it for the email case).
* The ThreadIndexer would try to lookup and potentially index threads
for empty parent ids, which is clearly wrong.
Diffstat (limited to 'common/indexer.h')
-rw-r--r-- | common/indexer.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/indexer.h b/common/indexer.h index f0b32f5..b5b5422 100644 --- a/common/indexer.h +++ b/common/indexer.h | |||
@@ -33,6 +33,11 @@ public: | |||
33 | virtual ~Indexer() = default; | 33 | virtual ~Indexer() = default; |
34 | typedef QSharedPointer<Indexer> Ptr; | 34 | typedef QSharedPointer<Indexer> Ptr; |
35 | virtual void add(const ApplicationDomain::ApplicationDomainType &entity) = 0; | 35 | virtual void add(const ApplicationDomain::ApplicationDomainType &entity) = 0; |
36 | virtual void modify(const ApplicationDomain::ApplicationDomainType &oldEntity, const ApplicationDomain::ApplicationDomainType &newEntity) | ||
37 | { | ||
38 | remove(oldEntity); | ||
39 | add(newEntity); | ||
40 | } | ||
36 | virtual void remove(const ApplicationDomain::ApplicationDomainType &entity) = 0; | 41 | virtual void remove(const ApplicationDomain::ApplicationDomainType &entity) = 0; |
37 | virtual void commitTransaction() {}; | 42 | virtual void commitTransaction() {}; |
38 | virtual void abortTransaction() {}; | 43 | virtual void abortTransaction() {}; |