mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 11:45:53 +01:00
Report an error on HiDPI maps when HiDPI support is not enabled
This commit is contained in:
parent
9fe10f10b8
commit
f376f7139b
@ -1,5 +1,6 @@
|
|||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QXmlStreamReader>
|
#include <QXmlStreamReader>
|
||||||
|
#include "config.h"
|
||||||
#include "onlinemap.h"
|
#include "onlinemap.h"
|
||||||
#include "wmtsmap.h"
|
#include "wmtsmap.h"
|
||||||
#include "wmsmap.h"
|
#include "wmsmap.h"
|
||||||
@ -160,12 +161,16 @@ void MapSource::map(QXmlStreamReader &reader, Config &config)
|
|||||||
attr.value("password").toString());
|
attr.value("password").toString());
|
||||||
reader.skipCurrentElement();
|
reader.skipCurrentElement();
|
||||||
} else if (reader.name() == "tilePixelRatio") {
|
} else if (reader.name() == "tilePixelRatio") {
|
||||||
|
#ifdef ENABLE_HIDPI
|
||||||
bool res;
|
bool res;
|
||||||
qreal val = reader.readElementText().toDouble(&res);
|
qreal val = reader.readElementText().toDouble(&res);
|
||||||
if (!res)
|
if (!res)
|
||||||
reader.raiseError("Invalid tilePixelRatio");
|
reader.raiseError("Invalid tilePixelRatio");
|
||||||
else
|
else
|
||||||
config.tileRatio = val;
|
config.tileRatio = val;
|
||||||
|
#else // ENABLE_HIDPI
|
||||||
|
reader.raiseError("HiDPI maps not supported");
|
||||||
|
#endif // ENABLE_HIDPI
|
||||||
} else
|
} else
|
||||||
reader.skipCurrentElement();
|
reader.skipCurrentElement();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user