diff --git a/src/server/aggregatedfetchscope.h b/src/server/aggregatedfetchscope.h --- a/src/server/aggregatedfetchscope.h +++ b/src/server/aggregatedfetchscope.h @@ -93,6 +93,8 @@ void setFetchRemoteId(bool fetchRemoteId); bool fetchGID() const; void setFetchGID(bool fetchGid); + bool fetchTags() const; + void setFetchTags(bool fetchTags); bool fetchRelations() const; void setFetchRelations(bool fetchRelations); bool fetchVirtualReferences() const; diff --git a/src/server/aggregatedfetchscope.cpp b/src/server/aggregatedfetchscope.cpp --- a/src/server/aggregatedfetchscope.cpp +++ b/src/server/aggregatedfetchscope.cpp @@ -263,6 +263,9 @@ if (newScope.fetchGID() != oldScope.fetchGID()) { setFetchGID(newScope.fetchGID()); } + if (newScope.fetchTags() != oldScope.fetchTags()) { + setFetchTags(newScope.fetchTags()); + } if (newScope.fetchRelations() != oldScope.fetchRelations()) { setFetchRelations(newScope.fetchRelations()); } @@ -294,6 +297,7 @@ d->mCachedScope.setFetch(ItemFetchScope::Flags, fetchFlags()); d->mCachedScope.setFetch(ItemFetchScope::RemoteID, fetchRemoteId()); d->mCachedScope.setFetch(ItemFetchScope::GID, fetchGID()); + d->mCachedScope.setFetch(ItemFetchScope::Tags, fetchTags()); d->mCachedScope.setFetch(ItemFetchScope::Relations, fetchRelations()); d->mCachedScope.setFetch(ItemFetchScope::VirtReferences, fetchVirtualReferences()); d->mCachedScopeValid = true; @@ -475,6 +479,19 @@ d->updateBool(fetchGid, d->fetchGID); } +bool AggregatedItemFetchScope::fetchTags() const +{ + LOCKED_D(const AggregatedItemFetchScope) + // Aggregation: return true if there's at least one subscriber who wants tags + return d->fetchTags > 0; +} + +void AggregatedItemFetchScope::setFetchTags(bool fetchTags) +{ + LOCKED_D(AggregatedItemFetchScope) + d->updateBool(fetchTags, d->fetchTags); +} + bool AggregatedItemFetchScope::fetchRelations() const { LOCKED_D(const AggregatedItemFetchScope)