1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-07-17 12:24:24 +02:00

Fixed POI crash on vector reallocation

Improved error reporting
This commit is contained in:
2015-11-26 19:13:59 +01:00
parent d1bf74f43b
commit 4e543782ec
11 changed files with 135 additions and 129 deletions

View File

@ -92,20 +92,12 @@ bool Parser::parse(QVector<TrackPoint> &data)
if (_reader.name() == "gpx")
gpx(data);
else
_reader.raiseError(QObject::tr("Not a GPX file."));
_reader.raiseError("Not a GPX file.");
}
return !_reader.error();
}
QString Parser::errorString() const
{
return QObject::tr("%1\nLine %2")
.arg(_reader.errorString())
.arg(_reader.lineNumber());
}
bool Parser::loadFile(QIODevice *device, QVector<TrackPoint> &data)
{
_reader.clear();