diff --git a/src/map/IMG/gmapdata.cpp b/src/map/IMG/gmapdata.cpp index 14e9c11e..712eb65c 100644 --- a/src/map/IMG/gmapdata.cpp +++ b/src/map/IMG/gmapdata.cpp @@ -52,8 +52,10 @@ bool GMAPData::readXML(const QString &path, QString &dataDir, QString &typFile) { QFile file(path); - if (!file.open(QFile::ReadOnly | QFile::Text)) + if (!file.open(QFile::ReadOnly | QFile::Text)) { + _errorString = file.errorString(); return false; + } QXmlStreamReader reader(&file); if (reader.readNextStartElement()) { diff --git a/src/map/bsbmap.cpp b/src/map/bsbmap.cpp index 861f4bd7..eeb44742 100644 --- a/src/map/bsbmap.cpp +++ b/src/map/bsbmap.cpp @@ -395,7 +395,7 @@ BSBMap::BSBMap(const QString &fileName, QObject *parent) QFile file(fileName); if (!file.open(QIODevice::ReadOnly)) { - _errorString = fileName + ": " + file.errorString(); + _errorString = file.errorString(); return; } diff --git a/src/map/oruxmap.cpp b/src/map/oruxmap.cpp index 7d82fb1a..bb0ffdca 100644 --- a/src/map/oruxmap.cpp +++ b/src/map/oruxmap.cpp @@ -366,8 +366,10 @@ bool OruxMap::readXML(const QString &path, const QString &dir) { QFile file(path); - if (!file.open(QFile::ReadOnly | QFile::Text)) + if (!file.open(QFile::ReadOnly | QFile::Text)) { + _errorString = file.errorString(); return false; + } QXmlStreamReader reader(&file); if (reader.readNextStartElement()) { diff --git a/src/map/qctmap.cpp b/src/map/qctmap.cpp index e424c2d4..6d05ef24 100644 --- a/src/map/qctmap.cpp +++ b/src/map/qctmap.cpp @@ -327,7 +327,7 @@ QCTMap::QCTMap(const QString &fileName, QObject *parent) _mapRatio(1.0), _valid(false) { if (!_file.open(QIODevice::ReadOnly)) { - _errorString = fileName + ": " + _file.errorString(); + _errorString = _file.errorString(); return; }