From 316ea082b9308c3d32ab2aa099ad1b3cf2a6d11f Mon Sep 17 00:00:00 2001 From: Agoston Szepessy Date: Mon, 22 Dec 2025 20:30:07 -0800 Subject: [PATCH] Use `CustomData` for storing excluded groups This isn't part of the kdbx format so we can't write it there directly. --- src/core/Group.cpp | 9 +++------ src/core/Group.h | 1 - 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/core/Group.cpp b/src/core/Group.cpp index 03ff7e7ae..422c4bbb1 100644 --- a/src/core/Group.cpp +++ b/src/core/Group.cpp @@ -46,7 +46,6 @@ 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); @@ -1284,12 +1283,13 @@ void Group::setPreviousParentGroup(const Group* group) void Group::setExcludeFromReports(bool excluded) { - set(m_data.excludeFromReports, excluded); + customData()->set(CustomData::ExcludeFromReportsLegacy, excluded ? TRUE_STR : FALSE_STR); } bool Group::excludeFromReports() const { - return m_data.excludeFromReports; + return customData()->contains(CustomData::ExcludeFromReportsLegacy) + && customData()->value(CustomData::ExcludeFromReportsLegacy) == TRUE_STR; } bool Group::GroupData::operator==(const Group::GroupData& other) const @@ -1338,8 +1338,5 @@ 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 2b539985b..0fb633035 100644 --- a/src/core/Group.h +++ b/src/core/Group.h @@ -68,7 +68,6 @@ public: Group::MergeMode mergeMode; QString tags; QUuid previousParentGroupUuid; - bool excludeFromReports; bool operator==(const GroupData& other) const; bool operator!=(const GroupData& other) const;