diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-04-15 06:01:14 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-04-15 13:22:16 -0700 |
commit | 71d74f9e3c7cb49ab93aef035dbf7735b5ae3454 (patch) | |
tree | 668579dde6e2bec4e566ebc35892d1310c2fd40f /core/pluginmanager.cpp | |
parent | c111c4bb022229e66fb15cf8a7967bf79180a441 (diff) | |
download | subsurface-71d74f9e3c7cb49ab93aef035dbf7735b5ae3454.tar.gz |
QML UI: rewrite the commitChanges function
I couldn't figure out how to break this down into small, useful commits.
Part of the problem is that I kept going while working on this and as you
can see from looking at the commit, diff tries so hard to find small code
fragments that moved around, that the diff overall becomes quite
unreadable and it seemed impossible to recreate the sequence of steps
after the fact.
It all started with adding the parsing for the GPS coordinates. But while
testing that code I found several issues with the rest of the function.
Most importantly it seemed ridiculous that we carefully tried to match the
texts that the DiveObjectHelper would create for the various fields,
instead of just using the DiveObjectHelper to do just that. And once I had
converted that I once again realized just how long and hard to understand
that function was getting and decided to break out some of the more
complex parts into their own helper functions.
But of course all this didn't happen in this logical, structured, ordered
way. Instead I did all of these things at the same time, testing,
rearranging, etc.
So in the end I went with one BIG commit that does all of this in one fell
swoop.
This adds four helper functions to deal with start time/date, duration,
location and gps coordinates, and depth of the dive.
To avoid mistakes when dealing with the GPS coordinates, there's another
helper to encapsulate the creation of the dive site and we switched to a
current GPS location.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/pluginmanager.cpp')
0 files changed, 0 insertions, 0 deletions