1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +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()) {
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;
} else
reader.skipCurrentElement();

View File

@ -182,7 +182,8 @@ void WMTS::layer(QXmlStreamReader &reader, CTX &ctx)
if (s == ctx.setup.style())
ctx.hasStyle = true;
} 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;
} else
reader.skipCurrentElement();