mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Database merge confirmation dialog (#10173)
* Add Entry::calculateDifference() This new function contains the logic that was previously in EntryHistoryModel::calculateHistoryModifications(). It allows the re-use to display the differences in case of a merge. * Introduce Database Merge Confirmation Dialog Adds a dialog allowing a user to review the changes of a merge operation. This dialog displays the changes and allows the user to abort the merge without modifying the database. Fixes #1152 * Added dry run option to Merger * Changed behavior when actual merge differs from dry run to just output a warning to console * Fixed KeeShare conflicting with merge operations in the middle of a merge --------- Co-authored-by: Jonathan White <support@dmapps.us>
This commit is contained in:
@@ -87,10 +87,10 @@ int Merge::executeWithDatabase(QSharedPointer<Database> database, QSharedPointer
|
||||
}
|
||||
|
||||
Merger merger(db2.data(), database.data());
|
||||
QStringList changeList = merger.merge();
|
||||
auto changeList = merger.merge();
|
||||
|
||||
for (auto& mergeChange : changeList) {
|
||||
out << "\t" << mergeChange << Qt::endl;
|
||||
for (const auto& mergeChange : changeList) {
|
||||
out << "\t" << mergeChange.toString() << Qt::endl;
|
||||
}
|
||||
|
||||
if (!changeList.isEmpty() && !parser->isSet(Merge::DryRunOption)) {
|
||||
|
||||
Reference in New Issue
Block a user