From e107abba238edec769f787c3cd0bb45920509e6e Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 14 Apr 2018 13:26:30 -0700 Subject: Debug location saving Signed-off-by: Dirk Hohndel --- mobile-widgets/qmlmanager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index a9c855eab..19cc3f4c4 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -841,6 +841,7 @@ bool QMLManager::checkLocation(DiveObjectHelper *myDive, struct dive *d, QString bool diveChanged = false; uint32_t uuid = 0; struct dive_site *ds = get_dive_site_for_dive(d); + qDebug() << "checkLocation" << location << "gps" << gps << "dive had" << myDive->location() << "gps" << myDive->gas(); if (myDive->location() != location) { diveChanged = true; if (!ds) @@ -855,13 +856,16 @@ bool QMLManager::checkLocation(DiveObjectHelper *myDive, struct dive *d, QString if (myDive->gps() != gps) { double lat, lon; if (parseGpsText(gps, &lat, &lon)) { + qDebug() << "parsed GPS, using it"; // there are valid GPS coordinates - just use them setupDivesite(d, ds, lat, lon, qPrintable(myDive->location())); diveChanged = true; } else if (gps == GPS_CURRENT_POS) { + qDebug() << "gps was our default text for no GPS"; // user asked to use current pos QString gpsString = getCurrentPosition(); if (gpsString != GPS_CURRENT_POS) { + qDebug() << "but now I got a valid location" << gpsString; if (parseGpsText(qPrintable(gpsString), &lat, &lon)) { setupDivesite(d, ds, lat, lon, qPrintable(myDive->location())); diveChanged = true; -- cgit v1.2.3-70-g09d2