mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
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:
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user