Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
changes based on @nyalldawson review
  • Loading branch information
Samweli committed Dec 30, 2019
1 parent 4733102 commit 24a3146
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/providers/wms/qgswmscapabilities.cpp
Expand Up @@ -771,19 +771,19 @@ void QgsWmsCapabilities::parseDimension( const QDomElement &element, QgsWmsDimen
if ( !element.attribute( QStringLiteral( "multipleValues" ) ).isNull() )
{
QString multipleValuesAttribute = element.attribute( QStringLiteral( "multipleValues" ) );
dimensionProperty.multipleValues = ( multipleValuesAttribute == QLatin1String( "1" ) || multipleValuesAttribute == QLatin1String( "true" ) ) ? true : false ;
dimensionProperty.multipleValues = ( multipleValuesAttribute == QLatin1String( "1" ) || multipleValuesAttribute == QLatin1String( "true" ) );
}

if ( !element.attribute( QStringLiteral( "nearestValue" ) ).isNull() )
{
QString nearestValueAttribute = element.attribute( QStringLiteral( "nearestValue" ) );
dimensionProperty.nearestValue = ( nearestValueAttribute == QLatin1String( "1" ) || nearestValueAttribute == QLatin1String( "true" ) ) ? true : false ;
dimensionProperty.nearestValue = ( nearestValueAttribute == QLatin1String( "1" ) || nearestValueAttribute == QLatin1String( "true" ) );
}

if ( !element.attribute( QStringLiteral( "current" ) ).isNull() )
{
QString currentAttribute = element.attribute( QStringLiteral( "current" ) );
dimensionProperty.current = ( currentAttribute == QLatin1String( "1" ) || currentAttribute == QLatin1String( "true" ) ) ? true : false ;
dimensionProperty.current = ( currentAttribute == QLatin1String( "1" ) || currentAttribute == QLatin1String( "true" ) );
}

dimensionProperty.extent = element.text();
Expand Down
6 changes: 3 additions & 3 deletions src/providers/wms/qgswmscapabilities.h
Expand Up @@ -178,13 +178,13 @@ struct QgsWmsDimensionProperty
QString extent;

//! Optional, determines whether multiple values of the dimension can be requested
bool multipleValues;
bool multipleValues = false;

//! Optional, whether nearest value of the dimension will be returned, if requested.
bool nearestValue;
bool nearestValue = false;

//! Optional, valid only for temporal exents, determines whether data are normally kept current.
bool current;
bool current = false;

};

Expand Down

0 comments on commit 24a3146

Please sign in to comment.