summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-11-14 09:39:20 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-11-14 09:39:20 -0800
commitb688f417de4ea246c4e7387232f9b9b8ca9b5318 (patch)
treee628439347f08095c67fbb133788d1c525b4bfe8
parent97fa1322025746d04813315992b7d87d6b782ce0 (diff)
downloadsubsurface-b688f417de4ea246c4e7387232f9b9b8ca9b5318.tar.gz
Location service: send dive site name
Right now this always sends the default name for GPS fixes created by the location service. There isn't much point in making this configurable. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-mobile/gpslocation.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/qt-mobile/gpslocation.cpp b/qt-mobile/gpslocation.cpp
index 02b211631..7ce60b4a6 100644
--- a/qt-mobile/gpslocation.cpp
+++ b/qt-mobile/gpslocation.cpp
@@ -246,6 +246,10 @@ void GpsLocation::uploadToServer()
data.addQueryItem("dive_time", dt.toString("hh:mm"));
data.addQueryItem("dive_latitude", QString::number(geoSettings->value(QString("gpsFix%1_lat").arg(i)).toInt() / 1000000.0));
data.addQueryItem("dive_longitude", QString::number(geoSettings->value(QString("gpsFix%1_lon").arg(i)).toInt() / 1000000.0));
+ QString name(geoSettings->value(QString("gpsFix%1_name").arg(i)).toString());
+ if (name.isEmpty())
+ name = "Auto-created dive";
+ data.addQueryItem("dive_name", name);
status(data.toString(QUrl::FullyEncoded).toUtf8());
QNetworkRequest request;
request.setUrl(url);