mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-24 15:25:31 -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
|
@ -1798,7 +1798,8 @@ void TestCli::testMergeWithKeys()
|
|||
entry->setPassword("secretsecretsecret");
|
||||
group->addEntry(entry);
|
||||
|
||||
sourceDatabase->setRootGroup(rootGroup);
|
||||
auto oldGroup = sourceDatabase->setRootGroup(rootGroup);
|
||||
delete oldGroup;
|
||||
|
||||
auto* otherRootGroup = new Group();
|
||||
otherRootGroup->setName("root");
|
||||
|
@ -1814,7 +1815,8 @@ void TestCli::testMergeWithKeys()
|
|||
otherEntry->setPassword("secretsecretsecret 2");
|
||||
otherGroup->addEntry(otherEntry);
|
||||
|
||||
targetDatabase->setRootGroup(otherRootGroup);
|
||||
oldGroup = targetDatabase->setRootGroup(otherRootGroup);
|
||||
delete oldGroup;
|
||||
|
||||
sourceDatabase->saveAs(sourceDatabaseFilename);
|
||||
targetDatabase->saveAs(targetDatabaseFilename);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue