core: move GPX parsing into core

This shouldn't be part of the desktop UI code; there's still the issue that we
really shouldn't hand code XML parsing, but I'll leave that for later.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2020-01-22 13:25:58 -08:00
parent 1ecd5065a0
commit ee5a156498
6 changed files with 177 additions and 160 deletions

View file

@ -235,7 +235,7 @@ void LocationInformationWidget::on_GPSbutton_clicked()
ImportGPS GPSDialog(this, fileName, &ui); // Create a GPS import QDialog
GPSDialog.coords.start_dive = current_dive->when; // initialise
GPSDialog.coords.end_dive = dive_endtime(current_dive);
if (!GPSDialog.getCoordsFromFile()) { // Get coordinates from GPS file
if (getCoordsFromGPXFile(&GPSDialog.coords, fileName) == 0) { // Get coordinates from GPS file
GPSDialog.updateUI(); // If successful, put results in Dialog
if (!GPSDialog.exec()) // and show QDialog
return;