mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-27 21:24:47 +01:00
Bad line count when incorrect line in mapfile is skipped.
This commit is contained in:
parent
a809c81fd6
commit
8a44b7d290
@ -19,8 +19,9 @@ QList<Map*> MapList::load(const QString &fileName)
|
||||
return mapList;
|
||||
}
|
||||
|
||||
int ln = 1;
|
||||
int ln = 0;
|
||||
while (!file.atEnd()) {
|
||||
ln++;
|
||||
QByteArray line = file.readLine();
|
||||
QList<QByteArray> list = line.split('\t');
|
||||
if (list.size() != 2) {
|
||||
@ -33,8 +34,6 @@ QList<Map*> MapList::load(const QString &fileName)
|
||||
|
||||
mapList.append(new Map(QString::fromUtf8(ba1.data(), ba1.size()),
|
||||
QString::fromLatin1(ba2.data(), ba2.size())));
|
||||
|
||||
ln++;
|
||||
}
|
||||
|
||||
return mapList;
|
||||
|
Loading…
Reference in New Issue
Block a user