Skip to content
Permalink
Browse files
Be case tolerant
  • Loading branch information
nyalldawson committed Oct 21, 2021
1 parent df8b975 commit 39a7ad3c5876bc3db0ffb9659992e502735723b4
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/providers/wms/qgswmscapabilities.cpp
@@ -1107,15 +1107,15 @@ void QgsWmsCapabilities::parseLayer( const QDomElement &element, QgsWmsLayerProp
layerProperty.orderId = ++mLayerCount;

QString queryableAttribute = element.attribute( QStringLiteral( "queryable" ) );
layerProperty.queryable = ( queryableAttribute == QLatin1String( "1" ) || queryableAttribute == QLatin1String( "true" ) );
layerProperty.queryable = queryableAttribute == QLatin1String( "1" ) || queryableAttribute.compare( QLatin1String( "true" ), Qt::CaseInsensitive ) == 0;

layerProperty.cascaded = element.attribute( QStringLiteral( "cascaded" ) ).toUInt();

QString opaqueAttribute = element.attribute( QStringLiteral( "opaque" ) );
layerProperty.opaque = ( opaqueAttribute == QLatin1String( "1" ) || opaqueAttribute == QLatin1String( "true" ) );
layerProperty.opaque = opaqueAttribute == QLatin1String( "1" ) || opaqueAttribute.compare( QLatin1String( "true" ), Qt::CaseInsensitive ) == 0;

QString noSubsetsAttribute = element.attribute( QStringLiteral( "noSubsets" ) );
layerProperty.noSubsets = ( noSubsetsAttribute == QLatin1String( "1" ) || noSubsetsAttribute == QLatin1String( "true" ) );
layerProperty.noSubsets = noSubsetsAttribute == QLatin1String( "1" ) || noSubsetsAttribute.compare( QLatin1String( "true" ), Qt::CaseInsensitive ) == 0;

layerProperty.fixedWidth = element.attribute( QStringLiteral( "fixedWidth" ) ).toUInt();
layerProperty.fixedHeight = element.attribute( QStringLiteral( "fixedHeight" ) ).toUInt();

0 comments on commit 39a7ad3

Please sign in to comment.