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
diff options
context:
space:
mode:
authorJonathan White <droidmonkey@users.noreply.github.com>2017-03-08 06:38:18 +0300
committerGitHub <noreply@github.com>2017-03-08 06:38:18 +0300
commit31494ec32796ed723cd5b772bae014cc6e8afe6c (patch)
tree5cfb9a0a97fb66bc9b9458834a41e890bf2bf93d /tests/TestEntryModel.cpp
parenta1e1a333085f8d9c4d258d2cce08fc26bcf9f098 (diff)
Enhance attribute entry and add protected attributes (#220)
* Allow protected attributes to be hidden * Entry area is resizable * Added test cases for protected attributes
Diffstat (limited to 'tests/TestEntryModel.cpp')
-rw-r--r--tests/TestEntryModel.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/TestEntryModel.cpp b/tests/TestEntryModel.cpp
index d5a16ebab..e0c8bb490 100644
--- a/tests/TestEntryModel.cpp
+++ b/tests/TestEntryModel.cpp
@@ -181,6 +181,12 @@ void TestEntryModel::testAttributesModel()
QCOMPARE(spyAboutToRemove.count(), 1);
QCOMPARE(spyRemoved.count(), 1);
+ // test attribute protection
+ QString value = entryAttributes->value("2nd");
+ entryAttributes->set("2nd", value, true);
+ QVERIFY(entryAttributes->isProtected("2nd"));
+ QCOMPARE(entryAttributes->value("2nd"), value);
+
QSignalSpy spyReset(model, SIGNAL(modelReset()));
entryAttributes->clear();
model->setEntryAttributes(0);