diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2021-09-11 16:36:54 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-09-13 11:21:34 -0700 |
commit | ea751928aaf6b3d987d477d736ff9a490dccb99a (patch) | |
tree | 8553e330a1e0f607d5777cc46c7b17735e99989f | |
parent | bea552bf0d69e73be9a223369c72bcc122ddff08 (diff) | |
download | subsurface-ea751928aaf6b3d987d477d736ff9a490dccb99a.tar.gz |
mobile: remove getCurrentPosition interface
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 29 | ||||
-rw-r--r-- | mobile-widgets/qmlmanager.h | 1 |
2 files changed, 0 insertions, 30 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 31bf438d8..204f04d46 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -999,17 +999,6 @@ bool QMLManager::checkLocation(DiveSiteChange &res, struct dive *d, QString loca qDebug() << "parsed GPS, using it"; // there are valid GPS coordinates - just use them setupDivesite(res, d, ds, lat, lon, qPrintable(location)); - } 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(res, d, ds, lat, lon, qPrintable(location)); - } else { - appendTextToLog("couldn't get GPS location in time"); - } } else { // just something we can't parse, so tell the user appendTextToLog(QString("wasn't able to parse gps string '%1'").arg(gps)); @@ -1655,24 +1644,6 @@ int QMLManager::addDive() return diveId; } -QString QMLManager::getCurrentPosition() -{ - static bool hasLocationSource = false; - if (GpsLocation::instance()->hasLocationsSource() != hasLocationSource) { - hasLocationSource = !hasLocationSource; - setLocationServiceAvailable(hasLocationSource); - } - if (!hasLocationSource) - return tr("Unknown GPS location"); - - QString positionResponse = GpsLocation::instance()->currentPosition(); - if (positionResponse == GPS_CURRENT_POS) - connect(GpsLocation::instance(), &GpsLocation::acquiredPosition, this, &QMLManager::waitingForPositionChanged, Qt::UniqueConnection); - else - disconnect(GpsLocation::instance(), &GpsLocation::acquiredPosition, this, &QMLManager::waitingForPositionChanged); - return positionResponse; -} - void QMLManager::applyGpsData() { appendTextToLog("Applying GPS fiexs"); diff --git a/mobile-widgets/qmlmanager.h b/mobile-widgets/qmlmanager.h index 0f2db2e7a..1e1cad59b 100644 --- a/mobile-widgets/qmlmanager.h +++ b/mobile-widgets/qmlmanager.h @@ -223,7 +223,6 @@ public slots: void finishSetup(); QString getNumber(const QString& diveId); QString getDate(const QString& diveId); - QString getCurrentPosition(); QString getGpsFromSiteName(const QString& siteName); QString getVersion() const; void deleteGpsFix(quint64 when); |