diff --git a/core/parse-gpx.cpp b/core/parse-gpx.cpp index 11e332091..72ea6e64d 100644 --- a/core/parse-gpx.cpp +++ b/core/parse-gpx.cpp @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include "core/parse-gpx.h" #include "core/subsurface-time.h" +#include "core/qthelper.h" #include #include @@ -43,7 +44,7 @@ int getCoordsFromGPXFile(struct dive_coords *coords, QString fileName) while (!gpxReader.atEnd()) { gpxReader.readNext(); if (gpxReader.isStartElement()) { - if (gpxReader.name() == "trkpt") { + if (nameCmp(gpxReader, "trkpt") == 0) { trkpt_found = true; line++; foreach (const QXmlStreamAttribute &attr, gpxReader.attributes()) { @@ -53,7 +54,7 @@ int getCoordsFromGPXFile(struct dive_coords *coords, QString fileName) lon = attr.value().toString().toDouble(); } } - if (gpxReader.name() == "time" && trkpt_found) { // Ignore the