From 44f5a728225a09cf4a0dd8e82234cd53270de61c Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Sun, 24 May 2015 22:59:00 +0200 Subject: 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 Signed-off-by: Dirk Hohndel --- qthelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); -- cgit v1.2.3-70-g09d2