Move attributes and attachments handking from Entry into own classes.

This commit is contained in:
Felix Geyer 2012-04-14 15:38:20 +02:00
parent dabb1800c6
commit d4a94a8996
12 changed files with 477 additions and 226 deletions

View file

@ -79,14 +79,14 @@ void TestKeePass2Reader::testProtectedStrings()
QCOMPARE(entry->title(), QString("Sample Entry"));
QCOMPARE(entry->username(), QString("Protected User Name"));
QCOMPARE(entry->password(), QString("ProtectedPassword"));
QCOMPARE(entry->attributeValue("TestProtected"), QString("ABC"));
QCOMPARE(entry->attributeValue("TestUnprotected"), QString("DEF"));
QCOMPARE(entry->attributes()->value("TestProtected"), QString("ABC"));
QCOMPARE(entry->attributes()->value("TestUnprotected"), QString("DEF"));
QVERIFY(!db->metadata()->protectTitle());
QVERIFY(db->metadata()->protectUsername());
QVERIFY(db->metadata()->protectPassword());
QVERIFY(entry->isAttributeProtected("TestProtected"));
QVERIFY(!entry->isAttributeProtected("TestUnprotected"));
QVERIFY(entry->attributes()->isProtected("TestProtected"));
QVERIFY(!entry->attributes()->isProtected("TestUnprotected"));
delete db;
delete reader;