mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-05-02 06:36:07 -04:00
Clean up group deletion.
This commit is contained in:
parent
cc8d6424e2
commit
5dc21a191b
3 changed files with 23 additions and 24 deletions
|
@ -175,6 +175,20 @@ void TestGroup::testDeleteSignals()
|
|||
QCOMPARE(spyEntryAboutToRemove.count(), 1);
|
||||
QCOMPARE(spyEntryRemoved.count(), 1);
|
||||
delete group;
|
||||
|
||||
Database* db2 = new Database();
|
||||
Group* groupRoot2 = db2->rootGroup();
|
||||
Group* group2 = new Group();
|
||||
group2->setParent(groupRoot2);
|
||||
Entry* entry2 = new Entry();
|
||||
entry2->setGroup(group2);
|
||||
QSignalSpy spyEntryAboutToRemove2(group2, SIGNAL(entryAboutToRemove(Entry*)));
|
||||
QSignalSpy spyEntryRemoved2(group2, SIGNAL(entryRemoved()));
|
||||
|
||||
delete group2;
|
||||
QCOMPARE(spyEntryAboutToRemove2.count(), 0);
|
||||
QCOMPARE(spyEntryRemoved2.count(), 0);
|
||||
|
||||
}
|
||||
|
||||
KEEPASSX_QTEST_CORE_MAIN(TestGroup)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue