From f376f7139b09d95f1afb504a7c1e72a7f155da9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Mon, 20 Aug 2018 18:46:44 +0200 Subject: [PATCH] Report an error on HiDPI maps when HiDPI support is not enabled --- src/map/mapsource.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/map/mapsource.cpp b/src/map/mapsource.cpp index ac2796f4..b0c8ff95 100644 --- a/src/map/mapsource.cpp +++ b/src/map/mapsource.cpp @@ -1,5 +1,6 @@ #include #include +#include "config.h" #include "onlinemap.h" #include "wmtsmap.h" #include "wmsmap.h" @@ -160,12 +161,16 @@ void MapSource::map(QXmlStreamReader &reader, Config &config) attr.value("password").toString()); reader.skipCurrentElement(); } else if (reader.name() == "tilePixelRatio") { +#ifdef ENABLE_HIDPI bool res; qreal val = reader.readElementText().toDouble(&res); if (!res) reader.raiseError("Invalid tilePixelRatio"); else config.tileRatio = val; +#else // ENABLE_HIDPI + reader.raiseError("HiDPI maps not supported"); +#endif // ENABLE_HIDPI } else reader.skipCurrentElement(); }