Skip to content
Permalink
Browse files
Be case tolerant
  • Loading branch information
nyalldawson committed Nov 1, 2021
1 parent 28411f6 commit 30b1ff2e65e974a7627b98e955f6f5403ddb46bf
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/providers/wms/qgswmscapabilities.cpp
@@ -1163,15 +1163,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 30b1ff2

Please sign in to comment.