mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-06 21:44:32 -04:00
Disconnect entry from database, when removed.
This commit is contained in:
parent
89f138a868
commit
34204f3281
2 changed files with 6 additions and 0 deletions
|
@ -323,6 +323,7 @@ void Group::removeEntry(Entry* entry)
|
||||||
Q_EMIT entryAboutToRemove(entry);
|
Q_EMIT entryAboutToRemove(entry);
|
||||||
|
|
||||||
entry->disconnect(this);
|
entry->disconnect(this);
|
||||||
|
entry->disconnect(m_db);
|
||||||
m_entries.removeAll(entry);
|
m_entries.removeAll(entry);
|
||||||
Q_EMIT modified();
|
Q_EMIT modified();
|
||||||
Q_EMIT entryRemoved();
|
Q_EMIT entryRemoved();
|
||||||
|
|
|
@ -88,6 +88,11 @@ void TestModified::testSignals()
|
||||||
QCOMPARE(spyModified.count(), spyCount);
|
QCOMPARE(spyModified.count(), spyCount);
|
||||||
QCOMPARE(spyModified2.count(), spyCount2);
|
QCOMPARE(spyModified2.count(), spyCount2);
|
||||||
|
|
||||||
|
entry2->setTitle("test2");
|
||||||
|
spyCount2++;
|
||||||
|
QCOMPARE(spyModified.count(), spyCount);
|
||||||
|
QCOMPARE(spyModified2.count(), spyCount2);
|
||||||
|
|
||||||
Group* g3 = new Group();
|
Group* g3 = new Group();
|
||||||
g3->setParent(root);
|
g3->setParent(root);
|
||||||
spyCount++;
|
spyCount++;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue