summaryrefslogtreecommitdiffstats
path: root/qthelper.cpp
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2015-05-24 22:59:00 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-05-26 12:14:40 -0700
commit44f5a728225a09cf4a0dd8e82234cd53270de61c (patch)
tree6eac0de2154c3004fae3a62b5b91b7ace8fbd18a /qthelper.cpp
parentffa6a23590baff7272939fb2819789166ad95f38 (diff)
downloadsubsurface-44f5a728225a09cf4a0dd8e82234cd53270de61c.tar.gz
Allow a comma in decimal GPS coordinates
this is the format used by Google maps and thus this... Fixes #875 Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qthelper.cpp')
-rw-r--r--qthelper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qthelper.cpp b/qthelper.cpp
index a05de95f1..0354a6031 100644
--- a/qthelper.cpp
+++ b/qthelper.cpp
@@ -190,7 +190,7 @@ static bool parseCoord(const QString& txt, int& pos, const QString& positives,
* Parse special coordinate formats that cannot be handled by parseCoord.
*/
static bool parseSpecialCoords(const QString& txt, double& latitude, double& longitude) {
- QRegExp xmlFormat("(-?\\d+(?:\\.\\d+)?)\\s+(-?\\d+(?:\\.\\d+)?)");
+ QRegExp xmlFormat("(-?\\d+(?:\\.\\d+)?),?\\s+(-?\\d+(?:\\.\\d+)?)");
if (xmlFormat.exactMatch(txt)) {
latitude = xmlFormat.cap(1).toDouble();
longitude = xmlFormat.cap(2).toDouble();