1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-06-28 03:59:15 +02:00

Do not make unnecessary checks when loading IMG maps and TrekBuddy atlases

This commit is contained in:
2022-06-09 00:38:25 +02:00
parent ca0089e486
commit e7d6c3f76a
7 changed files with 36 additions and 37 deletions

View File

@ -149,18 +149,3 @@ GMAPData::~GMAPData()
{
qDeleteAll(_files);
}
bool GMAPData::isGMAP(const QString &path)
{
QFile file(path);
if (!file.open(QFile::ReadOnly | QFile::Text))
return false;
QXmlStreamReader reader(&file);
if (reader.readNextStartElement()
&& reader.name() == QLatin1String("MapProduct"))
return true;
return false;
}

View File

@ -14,8 +14,6 @@ public:
GMAPData(const QString &fileName);
~GMAPData();
static bool isGMAP(const QString &path);
private:
bool readXML(const QString &path, QString &dataDir, QString &typFile,
QString &baseMap);