Properly block modified signal during Database destruction (#6438)

fixes #6393
This commit is contained in:
Aetf 2021-05-27 21:50:15 -04:00 committed by GitHub
parent 66c3026cf5
commit 81a66c439c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 370 additions and 179 deletions

View file

@ -110,7 +110,7 @@ void TestDatabase::testSignals()
QVERIFY(ok);
QCOMPARE(spyFilePathChanged.count(), 1);
QSignalSpy spyModified(db.data(), SIGNAL(databaseModified()));
QSignalSpy spyModified(db.data(), SIGNAL(modified()));
db->metadata()->setName("test1");
QTRY_COMPARE(spyModified.count(), 1);
@ -143,7 +143,7 @@ void TestDatabase::testEmptyRecycleBinOnDisabled()
// Prevents assertion failures on CI systems when the data dir is not writable
db->setReadOnly(false);
QSignalSpy spyModified(db.data(), SIGNAL(databaseModified()));
QSignalSpy spyModified(db.data(), SIGNAL(modified()));
db->emptyRecycleBin();
// The database must be unmodified in this test after emptying the recycle bin.
@ -159,7 +159,7 @@ void TestDatabase::testEmptyRecycleBinOnNotCreated()
QVERIFY(db->open(filename, key, nullptr, false));
db->setReadOnly(false);
QSignalSpy spyModified(db.data(), SIGNAL(databaseModified()));
QSignalSpy spyModified(db.data(), SIGNAL(modified()));
db->emptyRecycleBin();
// The database must be unmodified in this test after emptying the recycle bin.
@ -175,7 +175,7 @@ void TestDatabase::testEmptyRecycleBinOnEmpty()
QVERIFY(db->open(filename, key, nullptr, false));
db->setReadOnly(false);
QSignalSpy spyModified(db.data(), SIGNAL(databaseModified()));
QSignalSpy spyModified(db.data(), SIGNAL(modified()));
db->emptyRecycleBin();
// The database must be unmodified in this test after emptying the recycle bin.