1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-04-20 20:29:10 +02:00

Compare commits

...

2 Commits

Author SHA1 Message Date
048198dfe1 Removed duplicit map error debug output 2023-03-18 10:11:11 +01:00
a50fa28c08 Properly chceck for GCS/PCS files 2023-03-18 09:51:07 +01:00
3 changed files with 10 additions and 9 deletions

View File

@ -7,6 +7,7 @@
#include <QLibraryInfo>
#include <QSurfaceFormat>
#include <QImageReader>
#include <QFileInfo>
#ifdef Q_OS_ANDROID
#include <QCoreApplication>
#include <QJniObject>
@ -154,10 +155,13 @@ void App::loadDatums()
QString ellipsoidsFile(ProgramPaths::ellipsoidsFile());
QString gcsFile(ProgramPaths::gcsFile());
if (ellipsoidsFile.isNull())
if (!QFileInfo::exists(ellipsoidsFile)) {
qWarning("No ellipsoids file found.");
if (gcsFile.isNull())
ellipsoidsFile = QString();
} if (!QFileInfo::exists(gcsFile)) {
qWarning("No GCS file found.");
gcsFile = QString();
}
if (!ellipsoidsFile.isNull() && !gcsFile.isNull()) {
Ellipsoid::loadList(ellipsoidsFile);
@ -170,8 +174,9 @@ void App::loadPCSs()
{
QString pcsFile(ProgramPaths::pcsFile());
if (pcsFile.isNull())
if (!QFileInfo::exists(pcsFile)) {
qWarning("No PCS file found.");
else
qWarning("Maps based on a projection different from EPSG:3857 won't work.");
} else
PCS::loadList(pcsFile);
}

View File

@ -137,12 +137,9 @@ TreeNode<MapAction*> GUI::createMapActionsNode(const TreeNode<Map*> &node)
MapAction *a = new MapAction(map, _mapsActionGroup);
connect(a, &MapAction::loaded, this, &GUI::mapInitialized);
tree.addItem(a);
} else {
qWarning("%s: %s", qPrintable(map->path()),
qPrintable(map->errorString()));
} else
delete map;
}
}
return tree;
}

View File

@ -80,7 +80,6 @@ Map *MapList::loadFile(const QString &path, const Projection &proj, bool *isDir)
errors.append(it.key() + ": " + map->errorString());
++it;
}
} else {
for (it = _parsers.begin(); it != _parsers.end(); it++) {
map = it.value()(path, proj, isDir);