Add ability to delete groups via gui.

This commit is contained in:
Florian Geyer authored and Felix Geyer committed 2012-04-22 00:11:17 +02:00
1 parent 19bacd6737
commit 8467e7756d
11 files changed
+153 -29

No files matched your search

+12
View File
@@ -44,6 +44,11 @@ Entry::~Entry()
{
if (m_group) {
m_group->removeEntry(this);
DeletedObject delEntry;
delEntry.deletionTime = QDateTime::currentDateTimeUtc();
delEntry.uuid = m_uuid;
m_group->addDeletedObject(delEntry);
}
qDeleteAll(m_history);
@@ -356,7 +361,14 @@ void Entry::setGroup(Group* group)
{
if (m_group) {
m_group->removeEntry(this);
if (m_group->database() != group->database()) {
DeletedObject delEntry;
delEntry.deletionTime = QDateTime::currentDateTimeUtc();
delEntry.uuid = m_uuid;
m_group->addDeletedObject(delEntry);
}
}
group->addEntry(this);
m_group = group;
QObject::setParent(group);