diff options
author | Jonathan White <droidmonkey@users.noreply.github.com> | 2017-03-08 06:38:18 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-08 06:38:18 +0300 |
commit | 31494ec32796ed723cd5b772bae014cc6e8afe6c (patch) | |
tree | 5cfb9a0a97fb66bc9b9458834a41e890bf2bf93d /tests/TestEntryModel.cpp | |
parent | a1e1a333085f8d9c4d258d2cce08fc26bcf9f098 (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.cpp | 6 |
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); |