diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2018-04-14 13:26:30 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-04-14 13:37:44 -0700 |
commit | e107abba238edec769f787c3cd0bb45920509e6e (patch) | |
tree | e62c13d38473f4fa127fdaa03efa963f86595d37 | |
parent | 1de4321ca133498ae2e56e86363ba46cfa61dc3f (diff) | |
download | subsurface-e107abba238edec769f787c3cd0bb45920509e6e.tar.gz |
Debug location saving
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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; |