mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	mobile: remove getCurrentPosition interface
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									bea552bf0d
								
							
						
					
					
						commit
						ea751928aa
					
				
					 2 changed files with 0 additions and 30 deletions
				
			
		|  | @ -999,17 +999,6 @@ bool QMLManager::checkLocation(DiveSiteChange &res, struct dive *d, QString loca | ||||||
| 			qDebug() << "parsed GPS, using it"; | 			qDebug() << "parsed GPS, using it"; | ||||||
| 			// there are valid GPS coordinates - just use them
 | 			// there are valid GPS coordinates - just use them
 | ||||||
| 			setupDivesite(res, d, ds, lat, lon, qPrintable(location)); | 			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 { | 		} else { | ||||||
| 			// just something we can't parse, so tell the user
 | 			// just something we can't parse, so tell the user
 | ||||||
| 			appendTextToLog(QString("wasn't able to parse gps string '%1'").arg(gps)); | 			appendTextToLog(QString("wasn't able to parse gps string '%1'").arg(gps)); | ||||||
|  | @ -1655,24 +1644,6 @@ int QMLManager::addDive() | ||||||
| 	return diveId; | 	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() | void QMLManager::applyGpsData() | ||||||
| { | { | ||||||
| 	appendTextToLog("Applying GPS fiexs"); | 	appendTextToLog("Applying GPS fiexs"); | ||||||
|  |  | ||||||
|  | @ -223,7 +223,6 @@ public slots: | ||||||
| 	void finishSetup(); | 	void finishSetup(); | ||||||
| 	QString getNumber(const QString& diveId); | 	QString getNumber(const QString& diveId); | ||||||
| 	QString getDate(const QString& diveId); | 	QString getDate(const QString& diveId); | ||||||
| 	QString getCurrentPosition(); |  | ||||||
| 	QString getGpsFromSiteName(const QString& siteName); | 	QString getGpsFromSiteName(const QString& siteName); | ||||||
| 	QString getVersion() const; | 	QString getVersion() const; | ||||||
| 	void deleteGpsFix(quint64 when); | 	void deleteGpsFix(quint64 when); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue