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:
@ -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();
|
||||
|
Reference in New Issue
Block a user