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:
Tamino Bauknecht
2025-09-14 18:02:22 +02:00
committed by GitHub
parent 9a40182a62
commit c0ea6f65f9
20 changed files with 952 additions and 276 deletions

View File

@@ -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)) {