aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vrátil <dvratil@kde.org>2016-09-07 13:48:53 (GMT)
committerDaniel Vrátil <dvratil@kde.org>2016-09-07 13:48:53 (GMT)
commit9f8129f817291a2cafb7e7a935fa689f91e0543d (patch)
tree1be724e59e288d96b07da81a5c942dd0acff628e
parentcd374d5aedab0c996d170cbdfffd98d3036fba0c (diff)
Monitor: fix parent col retrieval for Item Remove notifications
-rw-r--r--src/core/monitor_p.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/monitor_p.cpp b/src/core/monitor_p.cpp
index 9830539..769f204 100644
--- a/src/core/monitor_p.cpp
+++ b/src/core/monitor_p.cpp
@@ -333,9 +333,6 @@ bool MonitorPrivate::fetchItems() const
bool MonitorPrivate::ensureDataAvailable(const Protocol::ChangeNotification &msg)
{
bool allCached = true;
- if (msg.isRemove()) {
- return allCached; // the actual object is gone already, nothing to fetch there
- }
if (msg.type() == Protocol::Command::TagChangeNotification) {
return tagCache->ensureCached({ static_cast<const Protocol::TagChangeNotification&>(msg).id() }, mTagFetchScope);
@@ -380,6 +377,11 @@ bool MonitorPrivate::ensureDataAvailable(const Protocol::ChangeNotification &msg
if (parentDestCollection > -1 && !collectionCache->ensureCached(parentDestCollection, mCollectionFetchScope)) {
allCached = false;
}
+
+ }
+
+ if (msg.isRemove()) {
+ return allCached;
}
if (msg.type() == Protocol::Command::ItemChangeNotification && fetchItems()) {