mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-05-31 12:24:26 -04: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:
parent
d4f02a78a7
commit
027362be76
11 changed files with 90 additions and 41 deletions
|
@ -28,7 +28,7 @@
|
|||
Database::Database()
|
||||
{
|
||||
m_metadata = new Metadata(this);
|
||||
m_rootGroup = 0;
|
||||
setRootGroup(new Group());
|
||||
|
||||
m_cipher = KeePass2::CIPHER_AES;
|
||||
m_compressionAlgo = CompressionGZip;
|
||||
|
@ -47,11 +47,10 @@ const Group* Database::rootGroup() const
|
|||
|
||||
void Database::setRootGroup(Group* group)
|
||||
{
|
||||
if (group != 0) {
|
||||
group->setParent(this);
|
||||
}
|
||||
Q_ASSERT(group);
|
||||
|
||||
m_rootGroup = group;
|
||||
m_rootGroup->setParent(this);
|
||||
}
|
||||
|
||||
Metadata* Database::metadata()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue