From b1fa002beff0026d7d82e1c6cecd27c1116cbe1c Mon Sep 17 00:00:00 2001 From: Agoston Szepessy Date: Mon, 22 Dec 2025 20:51:21 -0800 Subject: [PATCH] Add tooltips and info for group exclusions --- src/core/DatabaseStats.cpp | 6 +++++- src/core/DatabaseStats.h | 1 + src/gui/reports/ReportsWidgetBrowserStatistics.cpp | 6 +++++- src/gui/reports/ReportsWidgetHealthcheck.cpp | 7 ++++++- src/gui/reports/ReportsWidgetHibp.cpp | 4 +--- src/gui/reports/ReportsWidgetStatistics.cpp | 5 +++++ 6 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/core/DatabaseStats.cpp b/src/core/DatabaseStats.cpp index cf2364b08..fbe985cf6 100644 --- a/src/core/DatabaseStats.cpp +++ b/src/core/DatabaseStats.cpp @@ -76,6 +76,10 @@ void DatabaseStats::gatherStats(const QList& groups) ++groupCount; + if (group->excludeFromReports()) { + ++excludedGroups; + } + for (const auto* entry : group->entries()) { // Don't count anything in the recycle bin if (entry->isRecycled()) { @@ -107,7 +111,7 @@ void DatabaseStats::gatherStats(const QList& groups) ++weakPasswords; } - if (entry->excludeFromReports()) { + if (entry->excludeFromReports() || group->excludeFromReports()) { ++excludedEntries; } diff --git a/src/core/DatabaseStats.h b/src/core/DatabaseStats.h index 2c0ad7c76..d6446e834 100644 --- a/src/core/DatabaseStats.h +++ b/src/core/DatabaseStats.h @@ -30,6 +30,7 @@ public: int entryCount = 0; // Number of entries (across all groups) int expiredEntries = 0; // Number of expired entries int excludedEntries = 0; // Number of known bad entries + int excludedGroups = 0; // Number of excluded groups from reports int weakPasswords = 0; // Number of weak or poor passwords int shortPasswords = 0; // Number of passwords 8 characters or less in size int uniquePasswords = 0; // Number of unique passwords diff --git a/src/gui/reports/ReportsWidgetBrowserStatistics.cpp b/src/gui/reports/ReportsWidgetBrowserStatistics.cpp index 22f58e86e..8feedf670 100644 --- a/src/gui/reports/ReportsWidgetBrowserStatistics.cpp +++ b/src/gui/reports/ReportsWidgetBrowserStatistics.cpp @@ -159,7 +159,11 @@ void ReportsWidgetBrowserStatistics::addStatisticsRow(bool hasUrls, row[3]->setToolTip(allowedUrlsToolTip); row[4]->setToolTip(deniedUrlsToolTip); if (excluded) { - row[0]->setToolTip(tr("This entry is being excluded from reports")); + if (group->excludeFromReports()) { + row[0]->setToolTip(tr("The group for this entry is being excluded from reports")); + } else { + row[0]->setToolTip(tr("This entry is being excluded from reports")); + } } // Store entry pointer per table row (used in double click handler) diff --git a/src/gui/reports/ReportsWidgetHealthcheck.cpp b/src/gui/reports/ReportsWidgetHealthcheck.cpp index e50b5418f..a6062aee2 100644 --- a/src/gui/reports/ReportsWidgetHealthcheck.cpp +++ b/src/gui/reports/ReportsWidgetHealthcheck.cpp @@ -219,7 +219,12 @@ void ReportsWidgetHealthcheck::addHealthRow(QSharedPointer healt // Set tooltips row[0]->setToolTip(tip); if (excluded) { - row[1]->setToolTip(tr("This entry is being excluded from reports")); + if (group->excludeFromReports()) { + row[1]->setToolTip(tr("The group for this entry is being excluded from reports")); + } + else { + row[1]->setToolTip(tr("This entry is being excluded from reports")); + } } row[4]->setToolTip(health->scoreDetails()); diff --git a/src/gui/reports/ReportsWidgetHibp.cpp b/src/gui/reports/ReportsWidgetHibp.cpp index 0d6860009..04ac4dab3 100644 --- a/src/gui/reports/ReportsWidgetHibp.cpp +++ b/src/gui/reports/ReportsWidgetHibp.cpp @@ -169,9 +169,7 @@ void ReportsWidgetHibp::makeHibpTable() if (entry->excludeFromReports()) { row[1]->setToolTip(tr("This entry is being excluded from reports")); - } - - if(entry->group()->excludeFromReports()) { + } else if(entry->group()->excludeFromReports()) { row[1]->setToolTip(tr("The group for this entry is being excluded from reports")); } diff --git a/src/gui/reports/ReportsWidgetStatistics.cpp b/src/gui/reports/ReportsWidgetStatistics.cpp index 0aced6ae5..276389dc3 100644 --- a/src/gui/reports/ReportsWidgetStatistics.cpp +++ b/src/gui/reports/ReportsWidgetStatistics.cpp @@ -121,6 +121,11 @@ void ReportsWidgetStatistics::calculateStats() stats->excludedEntries > 0, tr("Excluding entries from reports, e. g. because they are known to have a poor password, isn't " "necessarily a problem but you should keep an eye on them.")); + addStatsRow(tr("Groups excluded from reports"), + QString::number(stats->excludedGroups), + stats->excludedGroups > 0, + tr("Excluding entire groups from reports isn't necessarily a problem but please exercise caution" + "when excluding entire groups.")); addStatsRow(tr("Average password length"), tr("%1 character(s)", "", stats->averagePwdLength()).arg(stats->averagePwdLength()), stats->isAvgPwdTooShort(),