Skip to content

Commit

Permalink
using camel case for all provider uri params
Browse files Browse the repository at this point in the history
  • Loading branch information
Samweli committed Apr 29, 2020
1 parent 9fdf50f commit b8fee83
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
10 changes: 5 additions & 5 deletions src/gui/raster/qgsrasterlayerproperties.cpp
Expand Up @@ -1279,13 +1279,13 @@ void QgsRasterLayerProperties::updateSourceStaticTime()

if ( mReferenceTime->isChecked() )
{
QString reference_time = mReferenceDateTimeEdit->dateTime().toString( Qt::ISODateWithMs );
uri[ QStringLiteral( "reference_time" ) ] = reference_time;
QString referenceTime = mReferenceDateTimeEdit->dateTime().toString( Qt::ISODateWithMs );
uri[ QStringLiteral( "referenceTime" ) ] = referenceTime;
}
else
{
if ( uri.contains( QStringLiteral( "reference_time" ) ) )
uri.remove( QStringLiteral( "reference_time" ) );
if ( uri.contains( QStringLiteral( "referenceTime" ) ) )
uri.remove( QStringLiteral( "referenceTime" ) );
}
bool enableTime = !mDisableTime->isChecked();

Expand Down Expand Up @@ -1347,7 +1347,7 @@ void QgsRasterLayerProperties::setSourceStaticTimeState()
tr( "There is no reference time in the layer's capabilities." ) : QString();
mReferenceTimeLabel->setText( referenceTimeLabelText );

const QString referenceTime = uri.value( QStringLiteral( "reference_time" ) ).toString();
const QString referenceTime = uri.value( QStringLiteral( "referenceTime" ) ).toString();

mReferenceTime->setChecked( !referenceTime.isEmpty() );

Expand Down
2 changes: 1 addition & 1 deletion src/providers/wms/qgswmsdataitems.h
Expand Up @@ -61,7 +61,7 @@ class QgsWMSItemBase
* - "timeDimensionExtent": the layer's time dimension extent it is available
* - "referencetimeDimensionExtent": reference time extent for the bi-temporal dimension layers
* - "time": time value of the current layer data from the provider
* - "reference_time": reference time value of the current of the layer data, this is applicable for the
* - "referenceTime": reference time value of the current of the layer data, this is applicable for the
* bi-temporal dimension layers
* - "allowTemporalUpdates": whether to allow updates on temporal parameters on this uri
* - "temporalSource": the source of the layer's temporal range, can be either "provider" or "project"
Expand Down
6 changes: 3 additions & 3 deletions src/providers/wms/qgswmsprovider.cpp
Expand Up @@ -1157,10 +1157,10 @@ void QgsWmsProvider::addWmstParameters( QUrlQuery &query )
}

// If the data provider has bi-temporal properties and they are enabled
if ( uri.contains( QStringLiteral( "reference_time" ) ) &&
!uri.value( QStringLiteral( "reference_time" ) ).toString().isEmpty() )
if ( uri.contains( QStringLiteral( "referenceTime" ) ) &&
!uri.value( QStringLiteral( "referenceTime" ) ).toString().isEmpty() )
{
QString time = uri.value( QStringLiteral( "reference_time" ) ).toString();
QString time = uri.value( QStringLiteral( "referenceTime" ) ).toString();

QDateTime dateTime = QDateTime::fromString( time, Qt::ISODateWithMs );

Expand Down
1 change: 0 additions & 1 deletion src/providers/wms/qgswmssourceselect.cpp
Expand Up @@ -1053,7 +1053,6 @@ void QgsWMSSourceSelect::collectDimensions( QStringList &layers, QgsDataSourceUr
if ( uri.param( QLatin1String( "type" ) ) == QLatin1String( "wmst" ) )
{
uri.setParam( QLatin1String( "temporalSource" ), QLatin1String( "provider" ) );
uri.setParam( QLatin1String( "enableTime" ), QLatin1String( "yes" ) );
}

}
Expand Down

0 comments on commit b8fee83

Please sign in to comment.