diff --git a/src/tcxparser.cpp b/src/tcxparser.cpp index b7b1c272..c51c85a6 100644 --- a/src/tcxparser.cpp +++ b/src/tcxparser.cpp @@ -65,20 +65,6 @@ void TCXParser::trackpointData(Trackpoint &trackpoint) } } -void TCXParser::routepointData(Waypoint &waypoint) -{ - while (_reader.readNextStartElement()) { - if (_reader.name() == "Position") - waypoint.setCoordinates(position()); - else if (_reader.name() == "AltitudeMeters") - waypoint.setElevation(number()); - else if (_reader.name() == "Time") - waypoint.setTimestamp(time()); - else - _reader.skipCurrentElement(); - } -} - void TCXParser::waypointData(Waypoint &waypoint) { while (_reader.readNextStartElement()) { @@ -108,17 +94,6 @@ void TCXParser::trackpoints(QVector &track) } } -void TCXParser::routepoints(QVector &route) -{ - while (_reader.readNextStartElement()) { - if (_reader.name() == "Trackpoint") { - route.append(Waypoint()); - routepointData(route.back()); - } else - _reader.skipCurrentElement(); - } -} - void TCXParser::lap() { while (_reader.readNextStartElement()) { @@ -134,8 +109,8 @@ void TCXParser::course() { while (_reader.readNextStartElement()) { if (_reader.name() == "Track") { - _routes.append(QVector()); - routepoints(_routes.back()); + _tracks.append(QVector()); + trackpoints(_tracks.back()); } else if (_reader.name() == "CoursePoint") { _waypoints.append(Waypoint()); waypointData(_waypoints.back()); diff --git a/src/tcxparser.h b/src/tcxparser.h index b8e31c52..6958c62d 100644 --- a/src/tcxparser.h +++ b/src/tcxparser.h @@ -26,9 +26,7 @@ private: void activity(); void lap(); void trackpoints(QVector &track); - void routepoints(QVector &route); void trackpointData(Trackpoint &trackpoint); - void routepointData(Waypoint &waypoint); void waypointData(Waypoint &waypoint); Coordinates position(); qreal number();