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>
This commit is contained in:
Dirk Hohndel 2015-11-14 09:39:20 -08:00
parent 97fa132202
commit b688f417de

View file

@ -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);