1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-30 22:51:16 +01:00

Strip the format parameters for format comparsion

This commit is contained in:
Martin Tůma 2020-03-01 13:26:19 +01:00
parent 12827edcb2
commit 45a6cdeda0
2 changed files with 4 additions and 2 deletions

View File

@ -37,7 +37,8 @@ void WMS::getMap(QXmlStreamReader &reader, CTX &ctx)
{ {
while (reader.readNextStartElement()) { while (reader.readNextStartElement()) {
if (reader.name() == "Format") { if (reader.name() == "Format") {
if (reader.readElementText() == ctx.setup.format()) QString format(reader.readElementText());
if (format.left(format.indexOf(';')) == ctx.setup.format())
ctx.formatSupported = true; ctx.formatSupported = true;
} else } else
reader.skipCurrentElement(); reader.skipCurrentElement();

View File

@ -182,7 +182,8 @@ void WMTS::layer(QXmlStreamReader &reader, CTX &ctx)
if (s == ctx.setup.style()) if (s == ctx.setup.style())
ctx.hasStyle = true; ctx.hasStyle = true;
} else if (reader.name() == "Format") { } else if (reader.name() == "Format") {
if (reader.readElementText() == ctx.setup.format()) QString format(reader.readElementText());
if (format.left(format.indexOf(';')) == ctx.setup.format())
ctx.hasFormat = true; ctx.hasFormat = true;
} else } else
reader.skipCurrentElement(); reader.skipCurrentElement();