Notify entry/group parent on deletion.

Also make the root group pseudo static, i.e. it shouldn't be changed
after the database has been fully constructed.
This commit is contained in:
Felix Geyer
2011-07-09 21:54:01 +02:00
parent d4f02a78a7
commit 027362be76
11 changed files with 90 additions and 41 deletions

View File

@@ -18,6 +18,7 @@
#ifndef KEEPASSX_GROUP_H
#define KEEPASSX_GROUP_H
#include <QtCore/QPointer>
#include <QtGui/QIcon>
#include "core/Database.h"
@@ -90,8 +91,9 @@ private:
void setParent(Database* db);
void recSetDatabase(Database* db);
void cleanupParent();
Database* m_db;
QPointer<Database> m_db;
Uuid m_uuid;
QString m_name;
QString m_notes;
@@ -106,9 +108,10 @@ private:
QList<Group*> m_children;
QList<Entry*> m_entries;
Group* m_parent;
QPointer<Group> m_parent;
friend void Database::setRootGroup(Group* group);
friend Entry::~Entry();
friend void Entry::setGroup(Group *group);
};