From 3b55b5186511394710e59880458d883d6b8da59c Mon Sep 17 00:00:00 2001 From: Agoston Szepessy Date: Sun, 21 Dec 2025 22:01:03 -0800 Subject: [PATCH] Add option to exclude Group from reports --- src/core/Group.cpp | 14 ++++++++++++++ src/core/Group.h | 3 +++ 2 files changed, 17 insertions(+) diff --git a/src/core/Group.cpp b/src/core/Group.cpp index 8b6cd75c5..03ff7e7ae 100644 --- a/src/core/Group.cpp +++ b/src/core/Group.cpp @@ -46,6 +46,7 @@ Group::Group() m_data.autoTypeEnabled = Inherit; m_data.searchingEnabled = Inherit; m_data.mergeMode = Default; + m_data.excludeFromReports = false; connect(m_customData, &CustomData::modified, this, &Group::modified); connect(this, &Group::modified, this, &Group::updateTimeinfo); @@ -1281,6 +1282,16 @@ void Group::setPreviousParentGroup(const Group* group) setPreviousParentGroupUuid(group ? group->uuid() : QUuid()); } +void Group::setExcludeFromReports(bool excluded) +{ + set(m_data.excludeFromReports, excluded); +} + +bool Group::excludeFromReports() const +{ + return m_data.excludeFromReports; +} + bool Group::GroupData::operator==(const Group::GroupData& other) const { return equals(other, CompareItemDefault); @@ -1327,5 +1338,8 @@ bool Group::GroupData::equals(const Group::GroupData& other, CompareItemOptions if (::compare(mergeMode, other.mergeMode, options) != 0) { return false; } + if (::compare(excludeFromReports, other.excludeFromReports, options) != 0) { + return false; + } return true; } diff --git a/src/core/Group.h b/src/core/Group.h index 01c0b2120..2b539985b 100644 --- a/src/core/Group.h +++ b/src/core/Group.h @@ -68,6 +68,7 @@ public: Group::MergeMode mergeMode; QString tags; QUuid previousParentGroupUuid; + bool excludeFromReports; bool operator==(const GroupData& other) const; bool operator!=(const GroupData& other) const; @@ -107,6 +108,7 @@ public: QString resolveCustomDataString(const QString& key, bool checkParent = true) const; const Group* previousParentGroup() const; QUuid previousParentGroupUuid() const; + bool excludeFromReports() const; bool equals(const Group* other, CompareItemOptions options) const; @@ -140,6 +142,7 @@ public: void setMergeMode(MergeMode newMode); void setPreviousParentGroup(const Group* group); void setPreviousParentGroupUuid(const QUuid& uuid); + void setExcludeFromReports(bool exclude); bool canUpdateTimeinfo() const; void setUpdateTimeinfo(bool value);