mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-12 00:11:37 -04:00
Reports: Add "Known Bad" flag for entries
* Fixes #4168 * Introduce a custom data element stored with an entry to indicate that it is a "Known Bad" entry. This flag causes database reports to skip these entries. * The current number of known bad entries is displayed in the statistics report. * Add context menu to reports to easily exclude entries.
This commit is contained in:
parent
ce8f32e797
commit
3c19fdd193
20 changed files with 620 additions and 279 deletions
|
@ -45,6 +45,7 @@
|
|||
#include "core/Entry.h"
|
||||
#include "core/Group.h"
|
||||
#include "core/Metadata.h"
|
||||
#include "core/PasswordHealth.h"
|
||||
#include "core/Tools.h"
|
||||
#include "crypto/Crypto.h"
|
||||
#include "crypto/kdf/AesKdf.h"
|
||||
|
@ -442,6 +443,17 @@ void TestGui::testEditEntry()
|
|||
QCOMPARE(entry->historyItems().size(), ++editCount);
|
||||
QVERIFY(!applyButton->isEnabled());
|
||||
|
||||
// Test the "known bad" checkbox
|
||||
editEntryWidget->setCurrentPage(1);
|
||||
auto knownBadCheckBox = editEntryWidget->findChild<QCheckBox*>("knownBadCheckBox");
|
||||
QVERIFY(knownBadCheckBox);
|
||||
QCOMPARE(knownBadCheckBox->isChecked(), false);
|
||||
knownBadCheckBox->setChecked(true);
|
||||
QTest::mouseClick(applyButton, Qt::LeftButton);
|
||||
QCOMPARE(entry->historyItems().size(), ++editCount);
|
||||
QCOMPARE(entry->customData()->contains(PasswordHealth::OPTION_KNOWN_BAD), true);
|
||||
QCOMPARE(entry->customData()->value(PasswordHealth::OPTION_KNOWN_BAD), TRUE_STR);
|
||||
|
||||
// Test entry colors (simulate choosing a color)
|
||||
editEntryWidget->setCurrentPage(1);
|
||||
auto fgColor = QString("#FF0000");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue