Remove obsolete read only state from database. (#7324)

This commit is contained in:
Patrick Klein 2022-01-29 03:26:53 +01:00 committed by GitHub
parent c914c116e4
commit bce8c84c26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 28 additions and 120 deletions

View file

@ -112,7 +112,7 @@ void TestKdbx3::testNonAscii()
key->addKey(QSharedPointer<PasswordKey>::create(QString::fromUtf8("\xce\x94\xc3\xb6\xd8\xb6")));
KeePass2Reader reader;
auto db = QSharedPointer<Database>::create();
QVERIFY(db->open(filename, key, nullptr, false));
QVERIFY(db->open(filename, key, nullptr));
QVERIFY(db.data());
QVERIFY(!reader.hasError());
QCOMPARE(db->metadata()->name(), QString("NonAsciiTest"));
@ -126,7 +126,7 @@ void TestKdbx3::testCompressed()
key->addKey(QSharedPointer<PasswordKey>::create(""));
KeePass2Reader reader;
auto db = QSharedPointer<Database>::create();
QVERIFY(db->open(filename, key, nullptr, false));
QVERIFY(db->open(filename, key, nullptr));
QVERIFY(db.data());
QVERIFY(!reader.hasError());
QCOMPARE(db->metadata()->name(), QString("Compressed"));
@ -140,7 +140,7 @@ void TestKdbx3::testProtectedStrings()
key->addKey(QSharedPointer<PasswordKey>::create("masterpw"));
KeePass2Reader reader;
auto db = QSharedPointer<Database>::create();
QVERIFY(db->open(filename, key, nullptr, false));
QVERIFY(db->open(filename, key, nullptr));
QVERIFY(db.data());
QVERIFY(!reader.hasError());
QCOMPARE(db->metadata()->name(), QString("Protected Strings Test"));
@ -167,5 +167,5 @@ void TestKdbx3::testBrokenHeaderHash()
auto key = QSharedPointer<CompositeKey>::create();
key->addKey(QSharedPointer<PasswordKey>::create(""));
auto db = QSharedPointer<Database>::create();
QVERIFY(!db->open(filename, key, nullptr, false));
QVERIFY(!db->open(filename, key, nullptr));
}