aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
Diffstat (limited to 'mobile-widgets')
-rw-r--r--mobile-widgets/qmlmanager.cpp29
-rw-r--r--mobile-widgets/qmlmanager.h1
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);