diff --git a/src/core/Group.cpp b/src/core/Group.cpp index 17f06605..778eb746 100644 --- a/src/core/Group.cpp +++ b/src/core/Group.cpp @@ -323,6 +323,7 @@ void Group::removeEntry(Entry* entry) Q_EMIT entryAboutToRemove(entry); entry->disconnect(this); + entry->disconnect(m_db); m_entries.removeAll(entry); Q_EMIT modified(); Q_EMIT entryRemoved(); diff --git a/tests/TestModified.cpp b/tests/TestModified.cpp index fa196038..5b116279 100644 --- a/tests/TestModified.cpp +++ b/tests/TestModified.cpp @@ -88,6 +88,11 @@ void TestModified::testSignals() QCOMPARE(spyModified.count(), spyCount); QCOMPARE(spyModified2.count(), spyCount2); + entry2->setTitle("test2"); + spyCount2++; + QCOMPARE(spyModified.count(), spyCount); + QCOMPARE(spyModified2.count(), spyCount2); + Group* g3 = new Group(); g3->setParent(root); spyCount++;