subsurface/mobile-widgets
Berthold Stoeger 0249e12589 Import: split process_imported_dives() function
Split the process_imported_dives() function in two:
1) process_imported_dives() processes the dives and generates
   a list of dives and trips to be added and removed.
2) add_imported_dives() calls process_imported_dives() and
   does the actual removal / addition of dives and trips.

The goal is to split preparation and actual work, to
make dive import undo-able.

The code adds extra checks to never merge into the same
dive twice, as this would lead to a double-free() bug.
This should in principle never happen, as dives that
compare equal according to is_same_dive() are merged
in the imported-dives list, but perhaps in some pathologival
corner-cases is_same_dive() turns out to be non-transitive.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-01-09 20:58:04 -08:00
..
qml Import: add trip_table argument to DiveImportedModel::repopulate() 2019-01-09 20:58:04 -08:00
qmlmanager.cpp Import: split process_imported_dives() function 2019-01-09 20:58:04 -08:00
qmlmanager.h Mobile: add helper function to fill in the BT name 2018-12-21 14:52:02 -08:00
qmlprefs.cpp Mobile: set units system in "No cloud mode" 2018-09-19 14:41:11 -07:00
qmlprefs.h mobile-widgets: replace qmlprefs::theme with qPrefDisplay::theme 2018-09-12 20:18:32 -07:00