mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-27 23:07:11 -05:00
Add a checkbox to health report allowing to exclude expired entries (#6534)
* Fixes #5032
This commit is contained in:
parent
fd0bdaae80
commit
66c3026cf5
@ -156,6 +156,7 @@ ReportsWidgetHealthcheck::ReportsWidgetHealthcheck(QWidget* parent)
|
|||||||
connect(m_ui->healthcheckTableView, SIGNAL(customContextMenuRequested(QPoint)), SLOT(customMenuRequested(QPoint)));
|
connect(m_ui->healthcheckTableView, SIGNAL(customContextMenuRequested(QPoint)), SLOT(customMenuRequested(QPoint)));
|
||||||
connect(m_ui->healthcheckTableView, SIGNAL(doubleClicked(QModelIndex)), SLOT(emitEntryActivated(QModelIndex)));
|
connect(m_ui->healthcheckTableView, SIGNAL(doubleClicked(QModelIndex)), SLOT(emitEntryActivated(QModelIndex)));
|
||||||
connect(m_ui->showKnownBadCheckBox, SIGNAL(stateChanged(int)), this, SLOT(calculateHealth()));
|
connect(m_ui->showKnownBadCheckBox, SIGNAL(stateChanged(int)), this, SLOT(calculateHealth()));
|
||||||
|
connect(m_ui->excludeExpired, SIGNAL(stateChanged(int)), this, SLOT(calculateHealth()));
|
||||||
}
|
}
|
||||||
|
|
||||||
ReportsWidgetHealthcheck::~ReportsWidgetHealthcheck()
|
ReportsWidgetHealthcheck::~ReportsWidgetHealthcheck()
|
||||||
@ -263,7 +264,8 @@ void ReportsWidgetHealthcheck::calculateHealth()
|
|||||||
// Display the entries
|
// Display the entries
|
||||||
m_rowToEntry.clear();
|
m_rowToEntry.clear();
|
||||||
for (const auto& item : health->items()) {
|
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
|
// Exclude this entry from the report
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -51,6 +51,13 @@
|
|||||||
</attribute>
|
</attribute>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="excludeExpired">
|
||||||
|
<property name="text">
|
||||||
|
<string>Exclude expired entries from the report</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="showKnownBadCheckBox">
|
<widget class="QCheckBox" name="showKnownBadCheckBox">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user