diff options
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 29 |
1 files changed, 0 insertions, 29 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"); |