mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-05-04 15:45:10 -04:00
Add custom icons when merging. (#1008)
* Adding missing custom icons on merge. * qDebug when adding icon * Adding test for merge custom icons.
This commit is contained in:
parent
0d5fec6dfc
commit
242faa138b
7 changed files with 33 additions and 18 deletions
|
@ -420,6 +420,29 @@ void TestMerge::testMergeAndSync()
|
|||
delete dbSource;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom icons should be brought over when merging.
|
||||
*/
|
||||
void TestMerge::testMergeCustomIcons()
|
||||
{
|
||||
Database* dbDestination = new Database();
|
||||
Database* dbSource = createTestDatabase();
|
||||
|
||||
Uuid customIconId = Uuid::random();
|
||||
QImage customIcon;
|
||||
|
||||
dbSource->metadata()->addCustomIcon(customIconId, customIcon);
|
||||
// Sanity check.
|
||||
QVERIFY(dbSource->metadata()->containsCustomIcon(customIconId));
|
||||
|
||||
dbDestination->merge(dbSource);
|
||||
|
||||
QVERIFY(dbDestination->metadata()->containsCustomIcon(customIconId));
|
||||
|
||||
delete dbDestination;
|
||||
delete dbSource;
|
||||
}
|
||||
|
||||
Database* TestMerge::createTestDatabase()
|
||||
{
|
||||
Database* db = new Database();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue