From 87dc464d49f76b07afd516ebe59e366c6a77cbb5 Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Sun, 24 May 2015 22:59:00 +0200 Subject: [PATCH] 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 --- qthelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qthelper.cpp b/qthelper.cpp index a05de95..0354a60 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(); -- 1.9.5 (Apple Git-50.3)