mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-13 08:46:06 -04:00
Minor changes to Group API to make it more explicit
* Include check for group as recycle bin directly into the Group::isRecycled() function * Return the original root group from Database::setRootGroup(...) to force memory management transfer
This commit is contained in:
parent
ee1268c518
commit
6f112b11e4
14 changed files with 46 additions and 70 deletions
|
@ -1544,9 +1544,9 @@ Database* TestMerge::createTestDatabase()
|
|||
|
||||
Database* TestMerge::createTestDatabaseStructureClone(Database* source, int entryFlags, int groupFlags)
|
||||
{
|
||||
Database* db = new Database();
|
||||
// the old root group is deleted by QObject::parent relationship
|
||||
db->setRootGroup(source->rootGroup()->clone(static_cast<Entry::CloneFlag>(entryFlags),
|
||||
static_cast<Group::CloneFlag>(groupFlags)));
|
||||
auto db = new Database();
|
||||
auto oldGroup = db->setRootGroup(source->rootGroup()->clone(static_cast<Entry::CloneFlag>(entryFlags),
|
||||
static_cast<Group::CloneFlag>(groupFlags)));
|
||||
delete oldGroup;
|
||||
return db;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue