Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorXavier Valls <xaviervallspla@gmail.com>2021-05-22 20:16:47 +0300
committerGitHub <noreply@github.com>2021-05-22 20:16:47 +0300
commit66c3026cf537ce964312b5e207dda62803da02f9 (patch)
tree0e2fac86a83f7b139c1e130b18b5293924cf0b62 /src/gui
parentfd0bdaae801ebe8651161b73a4e051b60f21c58a (diff)
Add a checkbox to health report allowing to exclude expired entries (#6534)
* Fixes #5032
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/reports/ReportsWidgetHealthcheck.cpp4
-rw-r--r--src/gui/reports/ReportsWidgetHealthcheck.ui7
2 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/reports/ReportsWidgetHealthcheck.cpp b/src/gui/reports/ReportsWidgetHealthcheck.cpp
index 2f7b962c0..ad88cdc35 100644
--- a/src/gui/reports/ReportsWidgetHealthcheck.cpp
+++ b/src/gui/reports/ReportsWidgetHealthcheck.cpp
@@ -156,6 +156,7 @@ ReportsWidgetHealthcheck::ReportsWidgetHealthcheck(QWidget* parent)
connect(m_ui->healthcheckTableView, SIGNAL(customContextMenuRequested(QPoint)), SLOT(customMenuRequested(QPoint)));
connect(m_ui->healthcheckTableView, SIGNAL(doubleClicked(QModelIndex)), SLOT(emitEntryActivated(QModelIndex)));
connect(m_ui->showKnownBadCheckBox, SIGNAL(stateChanged(int)), this, SLOT(calculateHealth()));
+ connect(m_ui->excludeExpired, SIGNAL(stateChanged(int)), this, SLOT(calculateHealth()));
}
ReportsWidgetHealthcheck::~ReportsWidgetHealthcheck()
@@ -263,7 +264,8 @@ void ReportsWidgetHealthcheck::calculateHealth()
// Display the entries
m_rowToEntry.clear();
for (const auto& item : health->items()) {
- if (item->exclude && !showExcluded) {
+ auto excluded = item->exclude || (item->entry->isExpired() && m_ui->excludeExpired->isChecked());
+ if (excluded && !showExcluded) {
// Exclude this entry from the report
continue;
}
diff --git a/src/gui/reports/ReportsWidgetHealthcheck.ui b/src/gui/reports/ReportsWidgetHealthcheck.ui
index 72e4fc328..b9f27c4c3 100644
--- a/src/gui/reports/ReportsWidgetHealthcheck.ui
+++ b/src/gui/reports/ReportsWidgetHealthcheck.ui
@@ -52,6 +52,13 @@
</widget>
</item>
<item>
+ <widget class="QCheckBox" name="excludeExpired">
+ <property name="text">
+ <string>Exclude expired entries from the report</string>
+ </property>
+ </widget>
+ </item>
+ <item>
<widget class="QCheckBox" name="showKnownBadCheckBox">
<property name="text">
<string>Also show entries that have been excluded from reports</string>