From b688f417de4ea246c4e7387232f9b9b8ca9b5318 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 14 Nov 2015 09:39:20 -0800 Subject: 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 --- qt-mobile/gpslocation.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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); -- cgit v1.2.3-70-g09d2